爱飞 发表于 2015-1-16 22:31:32

ASP网站制作之jsp强于asp,但不是asp.net

因为ASP脚本语言非常简单,因此其代码也简单易懂,结合HTML代码,可快速地完成网站的应用程序。还无法完全实现一些企业级的功能:完全的集群、负载均横。ByCoreyRoth,SeniorWebDeveloper
SpecialtoZDNet

Forawhile,theJava2EnterpriseEdition(J2EE)architecturelookedlikethebestwaytodevelopmulti-tieredapplications.JavaServerPages(JSP)andservletshadmanyadvantagesovertheActiveServerPages(ASP)andComponentObjectModel(COM+)platforms.However,IthinkthatisabouttochangewithMicrosoft.Netonthehorizon.Microsoft.Netisprovidingasimilarplatformbutwithmorefunctionality,anditquitepossiblycouldhavethefoundationforbeingcross-platformatsomestage.AccordingtoSun,JSPisbetterthanASPforthefollowingreasons:Ithasplatformandserverindependence,ithasextensibleJSPtagsandASPisinterpreted.Luckily,ASP.Netchangesallofthis.
ThebiggestargumentwhyJavaissuperioristhatitisacross-platformenvironment.Havingcross-platformisgreat,butatwhatcost?Javaisslowbydesign.WithJava,everytimeyourunyourprogramitgoesthroughtheJavaVirtualMachine,aninterpreter,whichthenconvertstheJavabytecodestonativecode.MicrosoftmayenduphavingsupportforplatformindependencewiththewayprogramsarecompiledwithMicrosoft.Net.

Whenaprogramiscompiledwith.Net,itiscompiledintoaDLLorEXEinMicrosoftIntermediateLanguage(MSIL)format,aprocessorindependentassemblylanguage.MSILdoesnotcontainanydependenciesonanyparticularoperatingsystemorarchitecture.ThefirsttimethisEXEisexecuted,itusesJustInTime(JIT)compilationtoconverttheMSILintonativecode.Sothefirsttimeyourunit,itmaybeslower,butsubsequentexecutionswillbefaster.Asyoucansee,thishasthepotentialforadaptationtoacross-platformsituation,butMicrosofthasntmadeanypromisesofthatyet.

Now,IdontknowifMicrosoftwilleveractuallyconvert.Nettoworkonotherplatforms,buttheyareputtingthesupportinthereforit.Myresponsetocross-platformis:Whocares?ForJava,allthatmeansisthatitworkson50differenttypesofUnix.AsfarasIamconcerned,theIntelplatformistheonlyonethatisworthbotheringwith.DesignwiseitmaybeinferiortotheSparcorAlpha,buttheIntelplatformistheonlyoneMicrosoftdevelopsfor.

Oftagsandscripts
ASP3.0doesnothaveextensibletags,anadvantagethatJSPhasheldoverASPforquitesometime.NowwithASP.Net,extensibletagsareavailable.ThroughtheuseofWebForms,ASP.Netisabletododatabinding,formvalidationandmorewithoutthedeveloperhavingtowriteanyscriptatall.DevelopersevenhavetheabilitytowritetheirowncustomWebFormcontrolstosuittheirownneeds.

AnotherprobleminthepastwithASPwasthatitwasaninterpretedlanguage,whereasJSPpagesarecompiledintoservletsthefirsttimetheJSPpageisaccessed.WhatSunneglectstomentionisthattheservletisstillinterpretedwiththeJavaVirtualMachine.WithASP.Net,pageswillnowbeprecompiledtoMSILandthenuseJITcompiling,justlikeJSP.Thedifferenceis.Netgetscompiledonceintonativecode,andservletsareinterpretedeverytimetheyareexecuted.Inthelongrun,Ithinkthiswillresultin.Netcodebeingmoreefficient.

Microsofts.Netmaynotbeperfect.Sinceitstillisinbeta,itmaychangequiteabitbeforeitisactuallyreleased.However,Ithinkitisagreatalternativetowhatwehadbefore.Inthepast,usingCOMandtheMicrosoftTransactionServer(MTS)wasanightmarefordevelopersandusingJ2EEwasslowerthandeath.Iadmitforalongtime,theJ2EEplatformwassuperiortoASPandCOM+.With.Netcomingsoon,Sunshouldbelookingfornewwaystoimproveitsplatformandremaincompetitive.Otherwise,itmaybelosingfuturedevelopers.

CoreyRothisaSeniorWebDeveloperforWordSpinners,aTulsa,OK-basedWebdevelopmentcompany.HehasfiveyearsofexperienceindevelopingWebsites,andstartedhisWebdevelopmentcareeratCreativeLabs.CoreyisalsoconsideredalocalexpertinMicrosofttechnologies,includingActiveServerPages,COM+andMicrosoftSiteServer.

Disclaimer:YourTurnisacommentarycolumnwrittenbyaZDNetNewsreader.Theopinionsexpressedhereinarethoseoftheauthor,notthoseofZDNet,ZDNetNewsnoritseditors.

强大的可扩展性。ASP具有强大的扩展性,可以实现与多种网络、硬件设备的连接:通过专用的通讯线路远程接入企业;通过远程拨号服务器为远程拨号客户提供服务;通过WAP为移动电话互联网客户服务。

因胸联盟 发表于 2015-1-19 16:09:16

我们必须明确一个大方向,不要只是停留在因为学而去学,我们应有方向应有目标.

若相依 发表于 2015-1-26 22:34:59

你可以通过继承已有的对象最大限度保护你以前的投资。并且C#和C++、Java一样提供了完善的调试/纠错体系。

精灵巫婆 发表于 2015-2-4 21:29:19

掌握asp的特性而且一定要知道为什么。

再见西城 发表于 2015-2-10 15:00:23

另外因为asp需要使用组件,所以了解一点组件的知识(ADODB也是组件)

灵魂腐蚀 发表于 2015-3-1 13:35:02

你可以通过继承已有的对象最大限度保护你以前的投资。并且C#和C++、Java一样提供了完善的调试/纠错体系。

冷月葬花魂 发表于 2015-3-10 17:47:37

另外因为asp需要使用组件,所以了解一点组件的知识(ADODB也是组件)

小女巫 发表于 2015-3-17 09:09:52

代码逻辑混乱,难于管理:由于ASP是脚本语言混合html编程,所以你很难看清代码的逻辑关系,并且随着程序的复杂性增加,使得代码的管理十分困难,甚至超出一个程序员所能达到的管理能力,从而造成出错或这样那样的问题。

不帅 发表于 2015-3-24 05:12:01

学习是为了用的,是为了让你的程序产生价值,把握住这个原则会比较轻松点。除此之外,课外时间一定要多参加一些社会实践活动,来锻炼自己的能力。
页: [1]
查看完整版本: ASP网站制作之jsp强于asp,但不是asp.net