0% found this document useful (0 votes)
15 views17 pages

FSWD - Mod 1

django fullstack module 1

Uploaded by

fakemefakerules
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
15 views17 pages

FSWD - Mod 1

django fullstack module 1

Uploaded by

fakemefakerules
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
Modute - 1 oll Define wel prammework. List_ond explain the web frame worb3. : saa aL 1 +) AL web. framework heles developers bail -web pre- waitten = Code” closbs apprications by provi Lob) best » Practices Yor: ats Types of, bie iemachaa sbigto Front-End FrameborksC client - side) 2] Back- End: Frameworks. (Server-side) S]_ Futl-stocls Frameworks. W]___ Micro-brane wa cs 7] Front-End Frare works: J Rront-Eny Frome worse ax. designed .t0_ handle she USEC dn tenho cei C UB) and veers experience (VR) aspectS Of web application BH 4) ae provid tools: type is. a. software tvo| bat voit Og cto! sCveadte! respansive. interactive § dyoamic user intterefence S's rity t ool +) Popular Front-End Fromennriss Reset, Angular Vuea{s 2] Backend Frameworks 4) Bock-Endl_ frameworks ars sedponsible or bondling te server—side. Reais Gatabase_tn teract{ons, user authentication § app\tcation logic 4+] Te _ provides -wols__do roanage yeque ts, responses, Server _Corpmnunicatton. -}__ popular BackEnt Frome wort: 7 Django spring Expres-j8 , Bebe on Roils. i 3) Pull -Stalk Prameworks A) Sorpe framework wen bots)” frost~esd 6 back-end “capa bitities, lfowing cevelopirs to! build full Stats application’ using” OL Single -pramewor's. 4)_Tt_proviey tools fo manage bot aid erversidle s 3h Web spelt 4) popula» Pull-staok. Tee edo Next.js_. mekeo2. nevi. ad>=140° [2 4] Microframenor6S ewer) eater h +] Micro fare works ag igo weriglt brane wonls, scthat- provisles «mi a spunctional iy cub of toe box. spopestat-: Mtcrerarme voor BS. mabe PA Flos, Stoatra : a Ust_and explain the benebits 0} Welo ~yrarne worke. —the bedefits of Web framenorlss Or wif. Fastey Developrnevel \\\\\\\ A] Pre-built Components: .¢, sesor\é cde Gpeadt up. the -clevelogarnenct execu r 2) Simplifred _Mosntenance ¢ TEA moduler code fs Caster “4D__ maintain and Update [3] Enhanced Beauty : Builth ion Security features protect against Corpmon vudneratr&tes 4) .-Seataboitity :.5Pramenorks ax .dergned ol: handle grow. soailng: PE senisees “to Sicale' applications -| 5]! Consistancy 2. Standordired: coding | practice ¢ best practices heeds 5) cleaner code. 6] Cross= browser Conpatibitiry : Prameworkg 2 ensury Consistente performance ~_O.cvoss lorowsers sO Corpmunity: Suppo! ae provide ~ gesowrces ; pluglos i &: pete e) SEO Friendliness a sae aon yrendwing & SEO ‘boos © tepprove Seale bagine ve inky 1.9} Delor gra q “Teitica 2 Sanit! steals for kde ing. G,_ testing. ensue Code reLiolet —clelang ging gee 7 Eeplaio’ the hist Ok. Sang peor is 4) Django pereattel Ib “the year a} 2003 by Adriad Holo vets Simon _will'son, was “boe cut of need fr a vapiol ‘cevold pment Aeanbe work. J St was rekea'satio. a8 Spen' - sotace” sofeooss io July $005 and named alter -faz2— guitarist Dyango _Refhordt. Sey milestones "ib | Dyango's,\ bistery —«! 1H) 2008+ Django’ 1.0 was aéleared ) whi is (Stable a). 20103 Django 1.2 totroduced iSupport for wo lgrastions } for Mmaniiging” Clataloase “Seberve sehen ges: 3) +2010 3 “Dyango Lips was: released , which ts “long - tereo Support OTS) version! af) B018 3 Dyno £9, hich nest LTS version wos aslented mss oie + J 201-3 Django 210 tobeduced signifrcane cBanges Lise © Support ‘ors pytpen:2 GO Sitpligred URL routing System, 61 2030"'% Pjango 30 Cudas: RUST; addi Support =for asyne views a otber * fgtnon eatin =e J. O23 1 1 Bjagge GO was aulensed ping on Fenpuo ving Performance, ecunirby Ok framework a) Djongo's oriyibe 19 Contey t-dviven news envirormedy tnftuence Tes Stvengibs, cetabase riven alte though Mo Aumains versifle +o voutous Web applications” \W\\\ what ts view. function 2 Explain with an» ekample? AL In difangg, +O view» function is ai 'p {thoo *-tancboo that oreceives ia. web) reg uct. boo! rete! 2 [ suseb? reponse aa od yseandy jecdh | #)usthis. response, Can be a Simple — LHITMe page Qkedirect; a 404") ertoy' page's yi Example of view function 4) Consider @ Simple change view Sancti thot izeturos Hello tvor li + “mer: age 4rorn sjange-bictp— ieofaor — det hhelloworid. geen Lxcnigot 2330 =! siketuro: HtepResponsel "elo. seria) Ip the example, we're. cleating: ivi tie 4] _dmpporting eepeesponse 2 The HitpResponse class is imported {rom HetEEEsce Sango https is wl to Creat? the Yes ponse. oak will be Sent Bock fo the sheplewt., > nm A) _Detioing -tpe Junction * the bellorwortd —funchon ctake _requet as Q pasarnettr, “This ‘wequest 0 bject Contains. petadlatO: about ane veguere: Hee A)__4enerating “the Responses ttttpResponse C_)__ Creotey On. HITP.. response with “ite: rféxt- which: i6 pas do parameter and. tbat will be-seut: bacts. 10 be usen's. browser. 5 a: gis 4 Sum maize" thes: Clnaimis” “cobsteot “Of, “Viens fanction 2 | A.J, Django a dynamic. -conkot- sie 1refers to Qn view “fan ction «that generates ‘and Serves CootenX that changes _basecl_on varsoug feic tors. 4) Be - examples we cab creak a dyoamfe content of view —Panct® thatis clisplay the: Cruvent dose and _-tirne. tases rom django whtep ieopore Teees one t irpport dadetime- Pinfiniyset _furyn £4 eta ef cuspent—datetime Crequest) Hows datetime deitetime;nots()« ‘weips "417 Current cate § time is 7, seturo | HttpRespopseC rep) vi oro! Rohe ¥ . wy + r [Link] 3 e25 $07 fangesurts_tmport”’ path - i for + = lsopere views es udpatterog 2 Dos: Fe bet poto Citine 7) views. SEE :, tad. Crnetel' | Views, pelle.) i kT In: the aboie code eee at view function Cursntdetctime that réburns g cake £: HME os a0 HIM response . fo his we tmported dutePine module, 4J the _uvipateens lonfiguraneo maps tre URt ‘time/ / +to_this view. ¥ —a Describe: sos. mes Of. mappigg “Uris to viees ate : , | — [ada Django mapping LURLS _do.views .fpxtolves iit tassocioding” Speeife VYRL. patterns witb view Lanctoos sthot generate. yesponses. an A] Simple, "Hello, werd" Examples fo Show he mapping uebls to vies we : views. py wlll ‘i sro danger http. Import. MttpRerponse : ae Lllessotd Creguesit pave}. 2 AJ Ip the example 'f iemport tttpRepense {ror django. http which Creates He Eletp response. We write a view function failed bellor ter _rohich seturns® a response with belfor world) ‘i> Use _Uripatteros which _enaps hello} to tbe giver view £ncnon ivy Accessing _ellof em the Site displays “Hello world |" AlLustvatt + hove \Dyango processes 2 weg west sflovo_of Django Request _% Response. A) when Dyango Processe: a request pte qollsues Qs Seistemansir sequence af Steps to baindle: =the inroming vequert Ff generates eeyponse: =) Meret a sistep =i by shee {glu trate of bois Dyango process) a request: i]_A request comes _to to Noelfof pie 21] Django: sletermine the root URL cong ou Ver patter fe 3 Bjange Rooks Hy] fe Le find a erect calls the associated ts -Convertia.._-to~ proper HTTP. sponse, Jo_o web Pege- 6] __Htep Response Which resets —____|hat_values =the’ _tho port. saa aa woS 95|__Epbin wh exareple Loose Coupling ‘and voLconp. Mey proitosophies Al loose coupling js ao softies opment Sppreach | coy vier aging — pieces ieces ——— Ss] interehang cable. ete ; wha | AIT sww0' pieces “of, code: axe loosely cbiipled, charger | |made -to one of, the, pieces will bave Lutte or | no_effects'.dn “Hoe. pthes. 1 : a6 arr AJ fo a Django tech application the URL definitions and: tthe vie ' functions they 'Cafl pie looser’ Coupled “This lets you Swilch out _obe nprece witpouk afgecting the other. c tale ball ; Nps (i Manother —time.-pagel $ ", Caren’ —dotartroe) A] Considee-” the curser datetione. view, you =I wanted to change “the URL for -the application — Say) to rove. iE" apron [time/ to Leuseordt= time eee could” makeia. quick change the vite ORE Conf. without thaving tou iSbreg. about ahs. view sel la) oa this era gle ithe es fg “available: “at! two’ uric. G's a Contzived: exarsple.' URLCones" ‘and views ‘are Loose. | Coupling fp action.” 4 * = “4 ~ | 10]. | =A Guick, saad! Abdi Yok Brror ra A)_whenever we ‘try 40 Faun the Django develo ‘Server_and visitieg @ Page. ‘such “as http + tna. 0.0 +1 38000 /hebtowor ta” you Showd: See a-" Page net und " messages | + AJ Dyan, dis plays as messnpe betouyse you 404 error A) ft —teus “et wabich URL cong Bango Wed | seqiues ted a AUR pe aeees Bot” defined f> qe PBL HS Page gee baypet Hebe Explais tit ld coud) vey patterns, 2 a ‘ *)Wildental URL patterns are used to __rmatch . “ielnam je. Segroents fo" _urts’ attoning 4oc sped ble Fount. passing dena to vieus 0} 4) AN URt peettero ig op regular: express ton’, Therepore. tue Can Uure_\ctf fo mate Sone or chore oltgits -tor__cthead hours exarople. urlpodterns = pedterns('' ae Cv" tiene /plas | \at/4 ' , [Link]’, ee. ) A) This peo Ue pattern will _roateh ony URL Such og Aime) plus/2, /25, [1 /iao000 exc. *) If we want to allow ether one ~or- tw0 da fe Upte 94, oumbers and -theo tne. regula. enprensioo we ue \d{t, 24 CV'A time/plus/i 1,23 /g! hous -alpecc! ), alllovo; ext Ble ORL Roustiog Ry Capturiag URL Sepmnenté. Assigoroeut Yo! > 1g/ 04) 2024 |_Exiplaf) | mie’. D. etter, 3y urls. p. piel he uy HTML Cte) Biles. oe =H modets py Cthe coutabase tables ) 2 _d jgngo. db import mods class 800k Crocckts .Model)+ Pare = models.G har Field Croax-leng' = 52) pub-date= models. Date Ferd C) : | te ut cist C-+he business Logic) jango-ehortcuts “irpport vender. to “response sb Modets — fmport Book “def Latest books Crequest): 5 “book -Llist = Book) [Link]. oy l'-p ebb ecte")T 16 US gotten genderstos response (* Latest Is. htm t',_ {oo0l5 ig E's) book =| list}) © #- urls, Py Ce, vee Configuration) impoat: Views yal dingo. Conf rls/ defaults eppont an urlpatterng: =) patterns (ody me Cita able bo. : ; inlay) |i H [Link] (the. -termplate) Zhimiy Chead >, Ctitles Books of Se chtakase table, represented bya, rathenctass. This Class «ts. catled-a" toodet» + 43 The, [Link]-file contaios. the. bustiness | “log the. page sThe «toxtest-boobsc) fuck ‘[Link] a view A) The surispy: file Specifies ewhfey view Pg Called “|_cpor a glvep URL pattern. In “thfe case, He URL/ Latest / alll be. thandted by the latest books) fur. ‘ 4 ie iene eoaseee hte Bile. is: an. 4TMe Aeroplate —that __ describes: the’. design. -of the page: +] a ‘togetter “ese, pieces doosely + follow 4 ted Modet- view Code which — |S] Clickable Source , Code _WtS erroneous twit @ines _ befor — ine “point | Bi SJ "switch fo “copy ard al view" provides | 1). easily 7 = Chi ca pa version. ) 6 "Shoe this saa eee on a public wteso web site" atlows:' Shaulng the. -tracebock vi. http?//wwwrdpastescom /. fy T] "Request information” ti fncludes “details about =the focoming Wweb* sequesty ‘Such as GET and POST’ iaforroation ; 1Codki'es , anol. CGI headus. 83 Sattar facluces He Lests rofatl settings efor the Django fnstallation and. other Conpradiations. ” Explain Dynamic and a word about peeth, UeLS. Dynaric, Vets *) Dyoom ic URLs i» Django allow vets “iy itoclude Vouale parts that are determined at ruotine. +) This dynamic _Segrmets Can be. captured and passed cto_ view function. OS porarnesers *) Bet potty Clortiele/< intr article cas / 5 Views. article — detail) . Pretey Upts ae 5 URts Avoid query sti a cle Sebaniie Segments. £1 thea irgprove the. Chavivy ond SE0 a} URLs ALEK? path (‘article (2024) ongere, S ypeusse auticle — detoul ) «7 usiag, Syoamic vRts allows jor Hert ble. routing engine optim) zation, 155] what || Abe _Django framework» | Bjoogo ee *) Ke “tea high ~ Level pylon web _freirne wo a*Ass gpraentt Nore is Djorgo {came work? wibat one the fects — thet enables raptel development: of, Secure and _mainfrarnable network. [ate te a_stree_iand open. Ceatur ss ~*A) versatile bd inst A) Secure) ni tine Pa cvest oe ‘ +) Scalable A) maintenance *) portable «I Vergati le ® 2. Django: allows domains. fs, versatile in nature which _ Ht_+to butld ap plications Jor different - difqerot A), ‘Secure t- Django stakes secusé- Seaioaity and helps Cevelopers *'to avoid Many Coromon | Securé-by Mistakes Such a8 Sou fojection ; {cross ste scripting requert forgery. ete. +) Scalable + Django {8 scolatole ty natu and hos + obttity: to gules la. und Slenibl swtted trom small -to lasge Scale apprication project! +) portable : Django. 5 1a. p {frame woo. Pts teins 10r)* allrpost ott platforre Almost ot tna { lavors windows ‘ediats and Moc versions Support Doge. on bared web

You might also like