欢迎来到天天文库
浏览记录
ID:40919683
大小:131.00 KB
页数:10页
时间:2019-08-10
《外文翻译-Struts 开发的最佳实践》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、毕业设计(论文)译 文题目JavaEE5:强大的功能、高生产率和低复杂性学生姓名历光林学号2008114150专业信息管理与信息系统班级20081141指导教师李碧涛评阅教师李碧涛完成日期2011年11月31日BestpracticesforStrutsdevelopmentPalaniyappanThiagarajan,PagadalaSureshStruts:AbriefintroductionStruts,anopensourceframeworkyoucanusetobuildWebapplications,isbasedo
2、nthepopularModel-View-Controller(MVC2)designparadigm.TheframeworkisbuiltuponstandardtechnologieslikeJavaServlets,JavaBeans,ResourceBundles,andXML,anditprovidesflexibleandextensiblecomponents.StrutsimplementstheControllerlayerintheformof ActionServlet andrecommendsbuildi
3、ngtheViewlayerusingJSPtaglibraries.StrutsalsoprovidesawrapperaroundtheModellayerthroughAction classes.Figure1illustratestheStrutsframeworkbasedontheModel-View-Controllerdesign.Figure1.StrutsandMVC OverviewofStrutscomponentsFirst,we'llexplaintheStrutscomponentsintheconte
4、xtofbestpracticesandtheroleeachoneplaysinyourWebapplicationdevelopment.ActionEvery Action ofyourapplicationextendsStruts' org.apache.struts.action.Action.These Action classesprovideaninterfacetotheapplication'sModellayer,actingasawrapperaroundthebusinesslogic.Each Actio
5、n classmustprovideitscase-specificimplementationtothe perform() method.The perform() methodalwaysreturnsavalueoftype ActionForward.ActionFormEvery ActionForm ofyourapplicationextendsStruts' org.apache.struts.action.ActionForm. ActionFormsaresimpleJavaBeansthatencapsulat
6、eandvalidaterequestparameters.Tovalidateyourrequestdata,your ActionForm's validate() methodmustgiveacase-specificimplementation. ActionFormsserveasacarrierofrequestdatatothe Action class.AJSPobjectcombineswitharespective ActionForm toformyourapplication'sViewlayer,where
7、almosteveryformfieldoftheJSPobjectmapstoanattributeofthecorresponding ActionForm.JSPcustomtaglibrariesTheJSPcustomtaglibrariesareacollectionofactionspresentedastags.ThisisapowerfulfeatureoftheJSPSpecification1.1;itallowsyoutoseparatepresentationfromotherapplicationtiers
8、.ThelibrariesareeasytouseandyoucanreadtheminXML-likefashion.YoucaneasilymaintaintheJSPcomponentsbyminimizingth
此文档下载收益归作者所有