资源描述:
《基于Java技术的Web应用设计模型的比较研究-外文翻译》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、AComparativeStudyofWebApplicationDesignModelsUsingtheJavaTechnologiesAbstract.TheServlettechnologyhasbeenthemostwidelyusedtechnologyforbuildingscalableWebapplications.Intheevents,therearefourdesignmodelsfordevelopingWebapplicationsusingtheJavatechnologies:Model1,Model2
2、,Struts,andJavaServerFaces(JSF).Model1employsaseriesofJSPpages;Model2adoptstheModel-View-Controllerpattern;StrutsisaframeworkemployingtheModel2designmodel;andJSFisanewtechnologythatsupportsready-to-usecomponentsforrapidWebapplicationdevelopment.Model1isnotrecommendedfo
3、rmedium-sizedandlargeapplicationsasitintroducesmaintenancenightmare.Thispapercomparesandevaluatestheeaseofapplicationdevelopmentandtheperformanceofthethreedesignmodels(Model2,Struts,andJSF)bybuildingthreeversionsofanonlinestoreapplicationusingeachofthethreedesignmodels
4、,respectively.1IntroductionToday,Webapplicationsarethemostcommonapplicationsforpresentingdynamiccontents.ThereareanumberoftechnologiesforbuildingWebapplications,themostpopularofwhichistheServlettechnology.Thistechnologygainsitspopularityfromitssuperiorityoverothertechn
5、ologiessuchasCGIandPHP.Servletsarecumbersometodevelop,however,becausesendingHTMLtagsrequirestheprogrammertocomposethemintoaStringobjectandsendthisobjecttothebrowser.Also,aminorchangetotheoutputrequirestheservlettoberecompiled.Toaddressthisissue,SunMicrosystemsinventedJ
6、avaServerPages(JSP).JSPallowsHTMLtagstobeintertwinedwithJavacodeandeachpageistranslatedintoaservlet.AJSPpageisaservlet.However,compilationoccursautomaticallywhenthepageisfirstrequested.Asaresult,changingtheoutputdoesnotneedrecompilation.Inaddition,JSPenablestheseparati
7、onofpresentationfromthebusinesslogicthroughtheuseofJavaBeansandcustomtaglibraries.ThenormnowindevelopingJavabasedWebapplicationsistouseservletsalongwithJavaServerPages.Inthelaterdevelopment,thereareanumberofdesignmodelsforbuildingservlet/JSPapplications:Model1,Model2,S
8、truts,andJSF.Model1andModel2werefirstmentionedintheearlyspecificationsofJSP.Model1strictlyusesJSPpages,withnoservlets