外文翻译

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

咸宁学院本科毕业论文:外文翻译1外文资料所译外文资料:①作者:DanMalks②书名:ProfessionalJSP③出版时间:2000.7.26④所译章节:Chapter1212.1IntroductoryGoodWebapplicationdesigntriestoseparatebusinessobjects,presentation,andmanipulationoftheobjectsintodistinctlayers.OnebenefitofusingJavaServerPagestechnologyisthatitallowsustoseparatetheroleofaWebdesignermoreclearlyfromthatofasoftwaredeveloper.Whileonasmall-scaleproject,oneindividualmayoccupybothroles,onalargerproject,theyarelikelytobeseparateanditisbeneficialtoseparatetheirworkflowsasmuchaspossible.DesigningthearchitectureforyourWebapplicationiscrucialtothisseparation.12.2JSParchitectureWewillexamineavarietyofwaystoarchitectasystemwithJavaServerPages,servlets,andJavaBeans.Wewillseeaseriesofdifferentarchitectures,eachadevelopmentoftheonebefore.Thediagrambelowshowsthisprocessinoutline;theindividualpartsofthediagramwillbeexplainedinturnlaterinthisarticle.JSParchitecture:咸宁学院本科毕业论文:外文翻译2WhenSunintroducedJavaServerPages,somewerequicktoclaimthatservletshadbeenreplacedasthepreferredrequesthandlingmechanisminWeb-enabledenterprisearchitectures.AlthoughJSPisakeycomponentoftheJava2PlatformEnterpriseEdition(J2EE)specification,servingasthepreferredrequesthandlerandresponsemechanism,wemustinvestigatefurthertounderstanditsrelationshipwithservlets.OthersectionsofProfessionalJSPexplaintheimplementationdetailsofJSPsourcetranslationandcompilationintoaservlets.UnderstandingthatJSPisbuiltontopoftheservletAPI,andusesservletsemantics,raisessomeinterestingquestions.Shouldwenolongerdevelopstand-aloneservletsinourWeb-enabledsystems?IstheresomewaytocombineservletsandJSPs?Ifso,wheredoweplaceourJavacode?Arethereanyothercomponentsinvolvedintherequestprocessing,suchasJavaBeans?Ifso,wheredotheyfitintothearchitectureandwhattypeofroledotheyfulfill?Itisimportanttounderstandthat,althoughJSPtechnologywillbeapowerfulsuccessortobasicservlets,theyhaveanevolutionaryrelationshipandcanbeusedinacooperativeandcomplementarymanner.Giventhispremise,wewillinvestigatehowthesetwotechnologies,eachaJavaStandardExtension,canbeusedco-operativelyalongwithothercomponents,suchasJavaBeans,tocreateJava-basedWeb-enabledsystems.WewillexaminearchitecturalissuesastheyrelatetoJSPandservletsanddiscusssomeeffectivedesignswhilelookingatthe咸宁学院本科毕业论文:外文翻译3tradeoffsofeach.Beforejumpingdirectlyintoadiscussionofspecificarchitectures,though,wewillbrieflyexaminetheneedtodevelopavarietyofarchitectures.12.3CodefactoringandroleseparationOneofthemainreasonswhytheJavaServerPagestechnologyhasevolvedintowhatitistoday(andit'sstillevolving)istheoverwhelmingtechnicalneedtosimplifyapplicationdesignbyseparatingdynamiccontentfromstatictemplatedisplaydata.ThefoundationforJSPwaslaiddownwiththeinitialdevelopmentoftheJavaWebServerfromSun,whichusedpagecompilationandfocusedonembeddingHTMLinsideJavacode.Asapplicationscametobebasedmoreonbusinessobjectsandn-tierarchitectures,thefocuschangedtoseparatingHTMLfromJavacode,whilestillmaintainingtheintegrityandflexibilitythetechnologyprovided.InChapter5,JSPSessions,inProfessionalJSP,wesawhowbeansandobjectscanbeboundtodifferentcontextsjustbydefiningacertainscope.Goodapplicationdesignbuildsonthisideaandtriestoseparatetheobjects,thepresentation,andthemanipulationoftheobjectsintodistinct,distinguishablelayers.AnotherbenefitofusingJSPisthatitallowsustomorecleanlyseparatetherolesofaWebproduction/HTMLdesignerindividualfromasoftwaredeveloper.RememberthatacommondevelopmentscenariowithservletswastoembedtheHTMLpresentationmarkupwithintheJavacodeoftheservletitself,whichcanbetroublesome.Inourdiscussion,wewillconsidertheservletsolelyasacontainerforJavacode,whileourentireHTMLpresentationtemplateisencapsulatedwithinaJSPsourcepage.ThequestionthenarisesastohowmuchJavacodeshouldremainembeddedwithinourJSPsourcepages,andifitistakenoutoftheJSPsourcepage,whereshoulditreside?Let'sinvestigatethisfurther.OnanyWeb-basedproject,multiplerolesandresponsibilitieswillexist.Forexample,anindividualwhodesignsHTMLpagesfulfillsaWebproductionrolewhilesomeonewhowritessoftwareintheJavaprogramminglanguagefulfillsasoftwaredevelopmentrole.Onsmall-scaleprojectstheserolesmightbefilledbythesameindividual,ortwoindividualsworkingcloselytogether.Onalargerproject,theywilllikelybefilledbymultipleindividuals,whomightnothaveoverlappingskillsets,andarelessproductiveifmadetoodependentontheworkflowoftheother.IfcodethatcouldbefactoredouttoamediatingservletisincludedinsteadwithinHTMLmarkup,thenthepotentialexistsforindividualsinthesoftwaredevelopmentroleandthoseintheWebproductionroletobecomemoredependentthannecessaryontheprogressand咸宁学院本科毕业论文:外文翻译4workflowoftheother.Suchdependenciesmaycreateamoreerror-proneenvironment,whereinadvertentchangestocodebyotherteammembersbecomemorecommon.Thisgivesussomeinsightintoonereasonwhywecontinuetodevelopbasicservlets:theyareanappropriatecontainerforourcommonJavacodethathasbeenfactoredoutofourJSPpages,givingoursoftwaredevelopmentteamanareaoffocusthatisaslooselycoupledtoourJSPpagesaspossible.Certainly,therewillbeaneedforthesesameindividualstoworkwiththeJSPsourcepages,butthedependenc

1 / 11
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功