web applica on frameworks
play

Web Applica+on Frameworks Jay Urbain, Ph.D. Credits: - PowerPoint PPT Presentation

Web Applica+on Frameworks Jay Urbain, Ph.D. Credits: www h6p://en.wikipedia.org/ Ma5 Raible: h6p://raibledesigns.com h6p://www.techempower.com/benchmarks 1 2


  1. Web ¡Applica+on ¡Frameworks ¡ ¡ Jay ¡Urbain, ¡Ph.D. ¡ Credits: ¡ ¡ www ¡ h6p://en.wikipedia.org/ ¡ Ma5 ¡Raible: ¡ h6p://raibledesigns.com ¡ h6p://www.techempower.com/benchmarks ¡ ¡ 1 ¡

  2. 2

  3. Frameworks ¡ • An ¡ applica+on ¡framework ¡consists ¡of ¡a ¡ so9ware ¡framework ¡ used ¡to ¡implement ¡the ¡standard ¡structure ¡(architecture) ¡of ¡ an ¡applicaEon. ¡ • The ¡ so9ware ¡framework ¡ providing ¡generic ¡funcEonality ¡can ¡ be ¡selecEvely ¡changed ¡to ¡ ¡provide ¡ applica&on-­‑specific ¡ soHware. ¡ ¡ 3

  4. ApplicaEon ¡Frameworks ¡ • ApplicaEon ¡frameworks ¡became ¡popular ¡with ¡the ¡rise ¡ of ¡graphical ¡user ¡interfaces ¡(GUIs), ¡since ¡these ¡tended ¡to ¡ promote ¡a ¡standard ¡ structure ¡for ¡applicaEons. ¡ ¡ • Simpler ¡to ¡create ¡automaEc ¡GUI ¡creaEon ¡tools ¡when ¡using ¡a ¡ standard ¡framework, ¡since ¡this ¡defines ¡the ¡underlying ¡code ¡ structure ¡of ¡the ¡applicaEon ¡in ¡advance. ¡ • Apple ¡Computer ¡developed ¡one ¡of ¡the ¡first ¡commercial ¡ applicaEon ¡frameworks, ¡MacApp ¡(first ¡released ¡in ¡1985), ¡for ¡ the ¡Macintosh. ¡ ¡ 4

  5. Many ¡ApplicaEon ¡Frameworks… ¡ Cocoa ¡for ¡Mac ¡OS ¡X ¡is ¡an ¡applicaEon ¡framework ¡based ¡upon ¡ • the ¡OPENSTEP ¡framework ¡developed ¡at ¡NeXT. ¡ Free-­‑soHware ¡frameworks ¡exist ¡as ¡part ¡of ¡the ¡Mozilla, ¡OpenOffice.org, ¡ • GNOME, ¡KDE, ¡NetBeans, ¡and ¡Eclipse ¡projects. ¡ MicrosoH ¡markets ¡a ¡number ¡of ¡framework ¡for ¡developing ¡Windows ¡ • applicaEons. ¡ A ¡number ¡of ¡frameworks ¡can ¡build ¡ cross-­‑pla0orm ¡ applicaEons ¡for ¡Linux, ¡ • Macintosh, ¡and ¡Windows ¡from ¡the ¡same ¡source ¡code: ¡Qt, ¡the ¡widget ¡ toolkits ¡wxWidgets, ¡FOX ¡toolkit, ¡or ¡Eclipse ¡RCP. ¡ Oracle ¡ApplicaEon ¡Development ¡Framework ¡(Oracle ¡ADF) ¡aids ¡in ¡ • producing ¡Java-­‑oriented ¡systems. ¡ Nega&ves? ¡ • 5

  6. Web ¡ApplicaEon ¡Framework ¡(WAF) ¡ • WAF ¡is ¡a ¡soHware ¡framework ¡designed ¡to ¡support ¡the ¡ development ¡of ¡dynamic ¡websites, ¡web ¡applicaEons, ¡web ¡ services, ¡and ¡web ¡resources. ¡ ¡ • Aims ¡to ¡alleviate ¡the ¡overhead ¡associated ¡with ¡common ¡ acEviEes ¡performed ¡in ¡web ¡development. ¡ ¡ • Many ¡frameworks ¡provide ¡libraries ¡for ¡database ¡access, ¡ templaEng, ¡and ¡session ¡management. ¡ • OHen ¡promote ¡code ¡reuse. ¡ ¡ 6

  7. A ¡li6le ¡Web ¡history… ¡ World ¡Wide ¡Web ¡ was ¡not ¡ inherently ¡dynamic. ¡Early ¡hypertext ¡consisted ¡of ¡ • hand-­‑coded ¡HTML ¡that ¡was ¡published ¡on ¡web ¡servers. ¡ ¡ ¡ – Any ¡modificaEons ¡to ¡published ¡pages ¡needed ¡to ¡be ¡performed ¡by ¡the ¡ pages' ¡author. ¡ ¡ To ¡provide ¡a ¡dynamic ¡web ¡page ¡that ¡reflected ¡user ¡inputs, ¡the ¡Common ¡ • Gateway ¡Interface ¡(CGI) ¡standard ¡was ¡introduced ¡for ¡interfacing ¡external ¡ applicaEons ¡with ¡web ¡servers. ¡ – CGI ¡could ¡adversely ¡affect ¡server ¡load, ¡though, ¡since ¡each ¡request ¡had ¡ to ¡start ¡a ¡separate ¡process. ¡ 7

  8. … ¡a ¡li6le ¡more ¡Web ¡history… ¡ Programmers ¡wanted ¡Eghter ¡integraEon ¡with ¡the ¡web ¡server ¡to ¡enable ¡ • high ¡traffic ¡web ¡applicaEons. ¡ ¡ – The ¡Apache ¡HTTP ¡Server ¡supports ¡modules ¡that ¡can ¡extend ¡the ¡web ¡ server ¡with ¡arbitrary ¡code ¡execuEons ¡(e.g., ¡as ¡Mod ¡Perl). ¡ – Some ¡web ¡servers ¡(e.g., ¡Apache ¡Tomcat) ¡were ¡specifically ¡designed ¡to ¡ handle ¡dynamic ¡content ¡by ¡execuEng ¡code ¡wri6en ¡in ¡some ¡languages ¡ (e.g., ¡Java). ¡ – Around ¡the ¡same ¡Eme, ¡new ¡languages ¡were ¡being ¡developed ¡ specifically ¡for ¡use ¡on ¡the ¡web ¡such ¡as ¡ColdFusion, ¡PHP ¡and ¡AcEve ¡ Server ¡Pages. ¡ 8

  9. … ¡the ¡end ¡of ¡history. ¡ Majority ¡of ¡languages ¡available ¡for ¡creaEng ¡dynamic ¡web ¡pages ¡ • have ¡libraries ¡to ¡help ¡with ¡common ¡tasks. ¡ Eventually ¡more ¡mature, ¡" full ¡stack " ¡frameworks ¡appeared ¡that ¡ • aggregated ¡libraries ¡and ¡provide ¡a ¡ structure ¡(architectural ¡approach) ¡ useful ¡for ¡web ¡development. ¡ ¡ Examples: ¡ ¡ • – ASP.NET, ¡Java ¡EE ¡(Servlets), ¡WebObjects, ¡web2py, ¡OpenACS, ¡Catalyst, ¡ Mojolicious, ¡Ruby ¡on ¡Rails, ¡Django, ¡Zend ¡Framework, ¡Yii, ¡ CakePHP ¡and ¡ Symfony, ¡etc. ¡ 9

  10. Types ¡of ¡framework ¡architectures ¡ Model–view–controller ¡(MVC) ¡ ¡ Many ¡frameworks ¡follow ¡the ¡MVC ¡architectural ¡pa6ern ¡to ¡separate ¡ • the ¡data ¡model ¡with ¡business ¡rules ¡ from ¡the ¡user ¡interface. ¡ ¡ Considered ¡a ¡good ¡pracEce ¡as ¡it ¡modularizes ¡code, ¡promotes ¡code ¡reuse, ¡ • and ¡allows ¡mulEple ¡interfaces ¡to ¡be ¡applied. ¡ ¡ In ¡web ¡applicaEons, ¡this ¡permits ¡different ¡views ¡to ¡be ¡presented, ¡such ¡ • as ¡web ¡pages ¡for ¡humans, ¡and ¡web ¡service ¡interfaces ¡for ¡mobile ¡and ¡other ¡ remote ¡applicaEons. ¡ 10

  11. Push-­‑based ¡vs. ¡pull-­‑based ¡ architectures ¡ ¡ Push-­‑based ¡ Most ¡MVC ¡frameworks ¡follow ¡a ¡ push-­‑based ¡architecture ¡also ¡called ¡" ac&on-­‑ • based ." ¡ ¡ These ¡frameworks ¡use ¡ ac&ons ¡(commands) ¡that ¡do ¡the ¡required ¡processing, ¡ • and ¡then ¡" push " ¡the ¡data ¡to ¡the ¡view ¡layer ¡to ¡render ¡the ¡results. ¡ This ¡is ¡the ¡approach ¡we ¡have ¡followed ¡in ¡class ¡with ¡our ¡MVC ¡ • implementa&on. ¡ Examples: ¡ ¡EStruts, ¡Django, ¡Ruby ¡on ¡Rails, ¡Symfony, ¡Yii, ¡Spring ¡MVC, ¡Stripes, ¡ • Play, ¡CodeIgniter, ¡and ¡Struts2. ¡ 11

  12. Push-­‑based ¡vs. ¡pull-­‑based ¡ architectures ¡ ¡ Pull-­‑based ¡ An ¡alternaEve ¡to ¡a ¡ push-­‑based ¡architecture, ¡is ¡a ¡ pull-­‑based ¡architecture. ¡ • SomeEmes ¡called ¡" component-­‑based ." ¡ These ¡frameworks ¡ start ¡with ¡the ¡view ¡layer , ¡which ¡can ¡then ¡" pull " ¡results ¡ • from ¡mulEple ¡controllers/sources ¡as ¡needed. ¡In ¡this ¡architecture, ¡mulEple ¡ controllers ¡can ¡be ¡involved ¡with ¡a ¡single ¡view. ¡ ¡ Typically, ¡more ¡“page” ¡centric. ¡ • Examples: ¡LiH, ¡Tapestry, ¡JBoss ¡Seam, ¡JavaServer ¡Faces, ¡and ¡Wicket. ¡ • 12

  13. Three-­‑Eer ¡architectures ¡ • Three ¡Eer ¡applicaEons ¡are ¡structured ¡around ¡three ¡logical ¡ Eers: ¡presentaEon ¡(client), ¡business ¡logic ¡(applicaEon), ¡and ¡ data ¡(database). ¡ ¡ Three ¡Eer ¡is ¡a ¡different, ¡but ¡complimentary ¡abstracEon ¡from ¡ MVC. ¡ • View ¡ – PresentaEon ¡can ¡be ¡generated ¡server-­‑ ¡or ¡client ¡slide. ¡ • Model ¡ – Business ¡logic ¡ – Data ¡ • Controller ¡ – Client ¡interacEon, ¡separates ¡Model ¡from ¡View ¡ 13

  14. WAF ¡Features ¡ • Web ¡template ¡system ¡ – Code ¡that ¡generates ¡the ¡HTML ¡can ¡do ¡this ¡based ¡on ¡variables ¡in ¡a ¡ template, ¡or ¡on ¡code. ¡ • Caching ¡ – Reduce ¡bandwidth, ¡server ¡load, ¡and ¡latency. ¡ ¡ – A ¡web ¡cache ¡stores ¡copies ¡of ¡documents ¡passing ¡through ¡it. ¡ ¡ – Subsequent ¡requests ¡may ¡be ¡saEsfied ¡from ¡the ¡cache ¡if ¡certain ¡ condiEons ¡are ¡met. ¡ ¡ • Security ¡ – ¡AuthenEcaEon ¡and ¡authorizaEon ¡frameworks ¡that ¡enable ¡the ¡web ¡ server ¡to ¡idenEfy ¡the ¡users ¡of ¡the ¡applicaEon, ¡and ¡restrict ¡access ¡to ¡ funcEons ¡based ¡on ¡some ¡defined ¡criteria ¡respecEvely. ¡ 14

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend