0% found this document useful (0 votes)
42 views

WT Assignment 6

wt notes for third yera engineering students. hdjdbbdjdjdkkhhskdhdhjdjdkavsushsbsggd&dbsjshdhddqdbuajjskwbagsjsvshsksksfsbsjsgsksssjkwksjshdjdkskskkwwjwhueyehehehehekwkwkqkeyeywjajjabdbeheuwiqowoakhdhsuwiwjwjwjshshdjwjnxhjdjdjdjsjwiqkaggqjqhqhwhajjshdhshdh

Uploaded by

Om Pasalkar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
42 views

WT Assignment 6

wt notes for third yera engineering students. hdjdbbdjdjdkkhhskdhdhjdjdkavsushsbsggd&dbsjshdhddqdbuajjskwbagsjsvshsksksfsbsjsgsksssjkwksjshdjdkskskkwwjwhueyehehehehekwkwkqkeyeywjajjabdbeheuwiqowoakhdhsuwiwjwjwjshshdjwjnxhjdjdjdjsjwiqkaggqjqhqhwhajjshdhshdh

Uploaded by

Om Pasalkar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 11
a Assign ment Noié_ ee —— 1. | Write ao chert note on Ruby —>|| - Ruby isa geriplin language designed by Yukihiro Hoalsume}o also Known as Ped 22 = Ruby executes on Vooieky of plat Porras such as ulindas, Linuk, plac and 60 on - = Ruby isa pacre aah omiended one Jang a Ruby fedanea Sousce and it is ly ‘vous | on the web. 5 Ruby is similar to omalltalk python /Per] - = Ruby hase the pattern matching Peatare which is Simlov to the Perl. = Ruby con be easily conneckd Jo the dolabases Jike “ PlySQL, DB 2 and oracle. e Envizonment = Pow cxepsting the Ruby pregroms we need to ins tal] Rubyetack 7 =the Fabby chock can be downloaded and installed Pron bHtp i// {Pitnami.com [ shack |ruloy - =eon be downloaded on Windows] Linux or Plac0S platRorm - Eoglain in bie scalar types and their o There. ave three types of data types used dhose ave Scalar, Armays and hashes - —FRe scaler types ove further dassfied as Pica characky s}xin 1g. Numeric =Adlithe numeric dato types. in Ruby are derived from _ aon) =) 10 “42 Neminci class. Idven of Numeric class ave - AThe |mmediate chi "Pleat and Integer = — =the Toteger class ie feo child classeS-Pixnumand Bigourn - 1 the 92e of —the inleger dbjects which lies within ae bit fe called the Fixnum object 4 theobject which is qaecter Ha: in size of 32 bit js Pafied Cine Signum obj ech. — Fre numeric literal that eomtains the Fleeting point js called the Plat object. &al er s [Numeric] [chasosler teing | cot | [Thleger] [Binur] LRigum | chovocler oping _ the shin object Grsists of the sling literals that are aaa. but the alleotion of ch roolers . [— there ave Yooo dypes of eleings - Single quoted and double quoted sbing. - fh we isdn hota psint come. chonacley literally like apostrophes then the \ js used - fr ie is pattern matching a Explain in detail? marer| For_potlern matching “the cperater eviis used. : Tes, pollen gn be placed within / ee . 2a — Por example ! a ~ open the Tnjeraclive Ruby jnlerpscley and type the eee Gommands and lobserve the results. ixb (mam) :004:0> T=" Success” = _"Success’” ib Cmain):002:0 >T=~/ es/ =>4 jrb (main):003:0> S = "hello Prien how ore you” = "hello Priends how ase you” ‘ \ab (main): 006107 w= s-Sp)it C] L-\s*/) => Lthello, "Rriends”,"howrore,/you"] ib (main) 1007? 07 |-Ruby allows to save the matched part of the pattern in the voriable. later on wecan use this vosiable toget the desired part of the pattem. — there ave two methods sub and geub which ave for Searching the desived pattern and aeplaceng them. =the suv method searche the Pirst park ofthe palesn and. aeplace ite =e asub method is misimilar te sub but jt laces abt the m ing . ee eae ee Girt an overviews of Rails on wulby . Shatlesialaudevelopment Pramecoork of web-based applications, | Ao ils ove closely associated with Rudy it is offen oeffered as Ruby on Rails or Simply RoR. = Rails was developed by pavid Heinemeiy Hanssen i early — 9.000 amd was zelensed] jn Taly g004 — the web application can| be. developed Meniiimes fesler with Rawls that witha typical yeva. Promesosk . = Retls is based on pive archileclave — i.e. Plode) View Con}oe Ilex, = The pve omhitectere clearly Separates the logical and physicol pacts of the application in theee porte - Piodel, Views and Grivollen, —The Plade} posh is for deta and Gnskaints on doda. the xieco port prepares and peesents the resul os output. The Gofeoll ew Gyo |e the application. —Tre rast significant chasacleristic of Rails is its ch to @nnecting chest oriented software withaelationa) database. - Theeview and Grlwolier past of PiVe are Supporled by ActionPack Gemponen}s of Rails = Rails can be more Commonly used with Ajax. Tt mokes use of the Vavasesip} Romewak named poololype te Support Ajax and ‘neroction with sieeatph mode] Rai uses Mvc anchileclare, Consists of esi goma and bul By thaee parts of on pve system . = kdtle a short note on- Rails Application and databases. | For ceeating a dotabase applicotion crete a fold ev by Sone Suitoble Ura Ruby's diveclsry, hore coeoded a Polder named dbdeno by ae Comma: 4 sails nec dbdemo By this command a disectry dbdemo will be caeoded — oN severa| useful Gabdizectories such as app config, doc, db, script and So on - 2..Nos generate the. Grfsoller by the fallosing Gmmard ‘in dbdemo direc wails generate Contaoller mubook Sea Gatsoller named imyboosk Gnfrollery will be Created within the Rle mybook controlled .rb of conbaalley dinectory. 8 &. Now we wil) crete a database in the PysgL by Bellowing Command mysq| ~uL root =ps aa mph Ro passcoord if ang. Then the. mysq]__ _promph coill appear on the parmpl! inde: 4 Now creafe a database named -bookinfo development using CREATE DATABASE Gmman, u le tables fooks and ems Pollocoterg-Gontenshs! “Then c2eo+ S Now we will qonerote the mode] Piles that aot equared fae fis application. use. Hellaeing Command as For this. aa ene! mode] book thvoke achive aecord Crate, db) migrate [902002072042 Create beksob © Crecte app / models} book: eb ; a invoke testunit _ivoltet. | Create test /unit / book test 4 Geeake test | Poclares | books yr] 10% ‘iis ; a pres, | | These _Gmmand_ will generate the Piles namely book, on and | ond Subject.vb j in app | model dimechory . 6. Now ineer} the data Wee hie books and Subjec. Ys Neco open the Gnteeller Pile which js pxsent jn the Gonholler Polder. % The Welcom.rbhml Pile can be stored in app] views direclory, What io entespri se Dava Bean? Draw and explain Main Components of ETB architectave o_ T2e8 application Golainer Gntains the Components that can be used by the Clients fer execuling the business logic. “These. com ponen{s axe fon as Enlerprise Teva Beons( E78) -£7e mainly Gntains the business logic and business dala - = Using the technolegy bke Era thé sever side, distributed eva Components can be built. — ETB Components always jie in Some Gntainey which is Glled as E7R container. . Components of Ere —The EIB awohuner provides coe sewvicesto ETB Corn: ponent Ez ere ty +Feansachions = Plessaging * Pewsisten & e + Distibubions a + Gonectivs ty Wives [isa tii galt as a Appi ation Server(e.g.Ulild Fl i] | £38 Grldney aa client I obkject Application |? Bt ——F Esleapa Lnvedation avo abject] using INDI = Enlerprise object Vave. Bean 2 [ EnlerJova, Bean | The jdea behind developin ETB is to Por the Gmponents that “con be provide a_Remecork plugged inte asaver. —This ultimately hel ps to increase the Punetionality of T tre sewer. ETB isa managed Gmponen} that con be ceealed ,Conko lled and managed by its Container TOPE 5 Deo and explain the ale of ETa Gnlainer in eolerprise applications. f ; 7 -E7®8 Gntuiner js a Seves—side Compon ent that Gmprises | the business logic. 2 = If offers local and qemele access to the ec enterprise beans Ta other wards,we can say that it. vides a auntime —A single ETB Gntainey can have one or mee EIR modules emionment yr EIA applications within the. application server. —I} oaks as an -inkemediate action ‘and_enter prise appli cation. be}ween business Jo git | race; vaal| une a aa [The Pollowing Figure depicls the chuche of the E78 Grtainer. % EIB Grhsiner (Home/LocalHome =n» {inetances|} Persistenr ExBokjest and ia aan, ees ExBLocalokjec eck Enhty Bea Chent = - <1 Hore] LocalHo taskances | fect terface Storage | ie {EsBobjek a: Enhity Bean \erBlecatobjet) The typical behavior envisioned by the Java EE epecificottien xe Te developer usites an Enterprise TavaBean a Simple Gemponent and the EJB Gnlainer odds the necessary infrostructere Sor G@mmunications, transactions, and l dota access. —the ER - Grtainer povides lifecycle management Por the Component to ensure that its creation, usage and destruction are both efficient and in accord with the apentti cation. & Decide and explain Various aspects while decedin between local ‘and aemolte interface can be Greidi —>|-Th ETe, theclient can access the session bean access, add—or using the business inferface . - Depending upon the location of client, there ove two types of interfaces used - 4) Remote nlerface - t “The remote interface js used by client thet may be panera o_different machine than the bean. using |_gemole method “nlerface( Rex) the access to the bean can be made . 2) Lecal Tnlerface ~ The local jnferface cen be used by the dienh which je) Tunning on the same machine where the beanis aesiding - < Various aspects while deciding between local semole jnlerface cme vepreserted iW jhe Following table - Aspect Useof Remole Inlorface [Use of loca] tnlerface Tipe of client |tF the clients ave TIE the clients ave either applicotion clientsweb | web Components or Gmponen}s of EIAs EXBs executing onthe 7 executing om differen} Same machine . machine i Protoco| used [=f the Aix used for FTE the local Punction calls Q@mmuni certian ave. used for Communica} ioe> boose & tight | TH the clientand bean |-Lf there isa aequiatmen! Gupling~ are. les! Joosel y of tight Coupling beleee ca qT > J & Era Gmponen ‘ Performance, | clo co Performance dus pita preamace dove ty i | bre 7] Drow and explain Scenario of clien} One 1G) aemole ETB. list Gome of the ET@ clients. ; 2 |= An ET® client accesses the bucinese legic Cotained in the EJs, in this general way * 4. The E7@ client uses a naming service +o locate the ETB's heme interface. al 2.7The naming Service (usually the Tava Naming and . dg Directory Inferface, NOT) aelawns a 2eference Yo an object tak implements the E5816 home interface. a. Jhe Ede client makes a Call on the £IB's home interfece sho gain access fo the EIRIS wemole inkrface. Ziheeenaticlientimateteallsiieuthe Efe's business ynethods against the. remo te interface . Remote clients: - A cemole client je w client thet can-run on the same or a rele. machine and a Java. vistua| machine (AveD than the enterprise bean it accesses. | =A zemote client can be aweb Gmponenh an application client ,or another enterprise bean.-The location of the enlerprise bean is fransparent to the semote chen. Drow and 2: Application er Clogic tier) : = Also knoeon as the business logic Her, it processes user } aeests and executes appli cation logic - Tt conlaine the legic that mediates bekween the poesentation Her and the data Her. = r}6 main function is te pesfoem operations Bue execute business ules becel] eral wens inpa! ®. Dota her (storage Tier): _®e enon emo ern trex aeeponsible fer sleving pa x jnanagicg dota . — Zh includes dodabases, Pile systems, onany ther dota, Slorage mechanisms- pe ea pur pose. io to ensure data ersictence- and provide efficient methods for dada _cetsieva) and manipulations: seach Her has ite own «et of aesponsibi i ties, and they work Jogether 4o create q.6calable, maintainable, and Plexible ‘Stoo architecture.

You might also like