jsp技术概述与应用框架外文翻译.doc

上传人:wj 文档编号:102536 上传时间:2022-10-03 格式:DOC 页数:21 大小:111KB
下载 相关 举报
jsp技术概述与应用框架外文翻译.doc_第1页
第1页 / 共21页
jsp技术概述与应用框架外文翻译.doc_第2页
第2页 / 共21页
jsp技术概述与应用框架外文翻译.doc_第3页
第3页 / 共21页
jsp技术概述与应用框架外文翻译.doc_第4页
第4页 / 共21页
jsp技术概述与应用框架外文翻译.doc_第5页
第5页 / 共21页
点击查看更多>>
下载资源
资源描述

jsp技术概述与应用框架外文翻译.doc

《jsp技术概述与应用框架外文翻译.doc》由会员分享,可在线阅读,更多相关《jsp技术概述与应用框架外文翻译.doc(21页珍藏版)》请在冰豆网上搜索。

jsp技术概述与应用框架外文翻译.doc

外文原文

OverviewofJSPTechnologyandJSPapplicationframeworks

Autor:

ZambonGiulio/SeklerMichael

Source:

Springer-VerlagNewYorkInc

1.BenefitsofJSP

JSPpagesaretranslatedintoservlets.So,fundamentally,anytaskJSPpagescanperformcouldalsobeaccomplishedbyservlets.However,thisunderlyingequivalencedoesnotmeanthatservletsandJSPpagesareequallyappropriateinallscenarios.Theissueisnotthepowerofthetechnology,itistheconvenience,productivity,andmaintainabilityofoneortheother.Afterall,anythingyoucandoonaparticularcomputerplatformintheJavaprogramminglanguageyoucouldalsodoinassemblylanguage.Butitstillmatterswhichyouchoose.JSPprovidesthefollowingbenefitsoverservletsalone:

•ItiseasiertowriteandmaintaintheHTML.YourstaticcodeisordinaryHTML:

noextrabackslashes,nodoublequotes,andnolurkingJavasyntax.

•YoucanusestandardWeb-sitedevelopmenttools.EvenHTMLtoolsthatknownothingaboutJSPcanbeusedbecausetheysimplyignoretheJSPtags.

•Youcandivideupyourdevelopmentteam.TheJavaprogrammerscanworkonthedynamiccode.TheWebdeveloperscanconcentrateonthepresentationlayer.Onlargeprojects,thisdivisionisveryimportant.Dependingonthesizeofyourteamandthecomplexityofyourproject,youcanenforceaweakerorstrongerseparationbetweenthestaticHTMLandthedynamiccontent.

Now,thisdiscussionisnottosaythatyoushouldstopusingservletsanduseonlyJSPinstead.Bynomeans.Almostallprojectswilluseboth.Forsomerequestsinyourproject,youwilluseservlets.Forothers,youwilluseJSP.Forstillothers,youwillcombinethemwiththeMVCarchitecture.Youwanttheappropriatetoolforthejob,andservlets,bythemselves,donotcompleteyourtoolkit.

2.AdvantagesofJSPOverCompetingTechnologies

Anumberofyearsago,Martywasinvitedtoattendasmall20-personindustryroundtablediscussiononsoftwaretechnology.SittingintheseatnexttoMartywasJamesGosling,inventoroftheJavaprogramminglanguage.Sittingseveralseatsawaywasahigh-levelmanagerfromaverylargesoftwarecompanyinRedmond,Washington.Duringthediscussion,themoderatorbroughtupthesubjectofJini,whichatthattimewasanewJavatechnology.Themoderatoraskedthemanagerwhathethoughtofit,andthemanagerrespondedthatitwastooearlytotell,butthatitseemedtobeanexcellentidea.Hewentontosaythattheywouldkeepaneyeonit,andifitseemedtobecatchingon,theywouldfollowhiscompany'susual"embraceandextend"strategy.Atthispoint,Goslinglightheartedlyinterjected"Youmeandisgraceanddistend."

Now,thegrievancethatGoslingwasairingwasthathefeltthatthiscompanywouldtaketechnologyfromothercompaniesandsubornitfortheirownpurposes.Butguesswhat?

Theshoeisontheotherfoothere.TheJavacommunitydidnotinventtheideaofdesigningpagesasamixtureofstaticHTMLanddynamiccodemarkedwithspecialtags.Forexample,ColdFusiondidityearsearlier.EvenASP(aproductfromtheverysoftwarecompanyoftheaforementionedmanager)popularizedthisapproachbeforeJSPcamealonganddecidedtojumponthebandwagon.Infact,JSPnotonlyadoptedthegeneralidea,itevenusedmanyofthesamespecialtagsasASPdid..So,thequestionbecomes:

whyuseJSPinsteadofoneoftheseothertechnologies?

Ourfirstresponseisthatwearenotarguingthateveryoneshould.Severalofthoseothertechnologiesarequitegoodandarereasonableoptionsinsomesituations.Inothersituations,however,JSPisclearlybetter.Hereareafewofthereasons.

2.1Versus.NETandActiveServerPages(ASP)

.NETiswell-designedtechnologyfromMicrosoft.ASP.NETisthepartthatdirectlycompeteswithservletsandJSP.TheadvantagesofJSParetwofold.First,JSPisportabletomultipleoperatingsystemsandWebservers;youaren'tlockedintodeployingonWindowsandIIS.Althoughthecore.NETplatformrunsonafewnon-Windowsplatforms,theASPpartdoesnot.YoucannotexpecttodeployseriousASP.NETapplicationsonmultipleserversandoperatingsystems.Forsomeapplications,thisdifferencedoesnotmatter.Forothers,itmattersgreatly.Second,forsomeapplicationsthechoiceoftheunderlyinglanguagemattersgreatly.Forexample,although.NET'sC#languageisverywelldesignedandissimilartoJava,fewerprogrammersarefamiliarwitheitherthecoreC#syntaxorthemanyauxiliarylibraries.Inaddition,manydevelopersstillusetheoriginalversionofASP.Withthisversion,JSPhasaclearadvantageforthedynamiccode.WithJSP,thedynamicpartiswritteninJava,notVBScriptoranotherASP-specificlanguage,soJSPismorepowerfulandbettersuitedtocomplexapplicationsthatrequirereusablecomponents.

Youcouldmakethesameargum

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 人文社科 > 法律资料

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1