|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
ASP在国内异常流行,因为国内大多使用的是盗版的Windows和盗版的SQLServer,而ASP+COM+SQLServer实际上也是一种不错的搭配,其性能也不输于PHP+MYSQL,特别是Windows系统和SQLServer都有图形界面,比APACHE和MYSQL易于维护,因此对于不重视知识产权的国家来说也是一种不错的选择。Microsofts.NETisabroadfamilyofproductsrepresentingthecompanysnextgenerationofservices,software,anddevelopmenttools.Atthecoreofthe.NETstrategylivestheCommonLanguageRuntime.TheCLRisaplatformforsoftwaredevelopmentthatprovidesservicesbyconsumingmetadata.Itisstandards-basedandcomponent-oriented.Likeanyplatform,theimportantpiecesaretheruntime,thelibrariesthatprovideaccesstothem,andthelanguagesthatcantargettheplatform.
Butwhatexactlyis.NET?Althoughtheprecisemeaningcanbealittlehardtoisolatebyreadingtheprolificmarketingliterature,alittlediggingrevealsthat.NETisinfactMicrosoftsgrandstrategyforhowalloftheirsoftware,systems,andserviceswillfittogether.Itincludesdevelopmenttools(likethenewversionofVisualStudio,dubbedVisualStudio.NET),futureversionsoftheirWindowsoperatingsystems,newInternet-basedservices(likeastepped-upversionoftheirPassportwebauthenticationservice),andanentirelynewbeastcalledtheCommonLanguageRuntime.
TheCommonLanguageRuntimeisthesinglemostimportantpieceofthe.NETproductstrategy,becauseitisinessencetheenginethatpullsthetrain-theCLRishowdeveloperswillwritesoftwareinthebravenew.NETworld(seefigure1).
TheCLRasadevelopmentplatform
TheCLRisadevelopmentplatform.Likeanyplatform,itprovidesaruntime,definesfunctionalityinsomelibraries,andsupportsasetofprogramminglanguages.
TheCLRisaplatformfordevelopingapplications.Aplatformisasetofprogrammaticservices,exposedthroughsomeAPItodevelopersusingoneormorelanguages.Developmentgenerallytargetsasingleplatform;
TheCLRisnotanoperatingsysteminthestrictsenseoftheterm-itdoesnot,forexample,provideafilesystem,relyinginsteadontheunderlyingOS(suchasWindows)toimplementthatfeature.
breakdownthefeaturesetoftheplatform(CLR)intothreefundamentalareas:theruntimethattheplatformoffers,thelibrariesitdefines,andthelanguagesImgoingtouse.Theseaspectsoftheplatformoverlap(seefigure2),andunderstandingeachofthemandthewaysinwhichtheyinteractiscrucialtobecominganeffectiveCLRprogrammer.
Runtime
Aruntimeprovidesservicestosoftwarethatyouwrite.TheCLRprovidesaruntime.
Aruntimeisapieceofcode,writtenbytheplatformvendor,whichprovidesyourcodewithasetofservices.Whatsortsofservices?Well,itdependsontheplatform-itmightbeanythingfromcheckingsecurityforyoutoimplementingafilesystemtoprovidingaccesstosomepieceofhardware.
Almosteveryprogramwrittenthesedaystakesadvantageofsomesortofruntime.Veryfewprogrammersstartaprojectbywritingtheirownfilesystemordatabaseengine.Rather,theymakeuseofalready-writtenpiecesofsoftware,likeWindows2000orOracle.Bothoftheseplatforms(yep,theyrebothplatforms)havearuntimethatprovidesservices.InthecaseofWindows2000,theruntimeistheoperatingsystemkernel,anditprovidesserviceslikethreadmanagement.InthecaseofOracle,theruntimeisthedatabaseengine,andtheservicesincludethingslikeaSQLengineandtransactions.Wesaythatwewritecodethat"runson"aplatformbecauseitusestheservicesprovidedbytheplatform.TheCLRprovidestheseservicesusingalayeredarchitecturethatisshowninfigure3.
Libraries
TheCLRsBaseClassLibraryallowustointeractwiththeruntime,andprovideadditionalusefulfunctionality.
Languages
TheCLRsupportsprogramminginoneofabouttwodozenlanguages.ThemostpopularofthesearelikelytobeC#andVisualBasic.NET.
Intwoareas,theCLRreallyshines:itssupportforcomponent-basedprogramming,anditsextensiveuseofopen,standards-basedtechnologies.
Components
TheCLRhasextensivesupportforcomponent-basedprogramming.
Afairlyrecenttrendinsoftwaredevelopmentisthatofcomponent-orientedprogramming,althoughtheideabehindcomponentdevelopmentisnotanewone.Infact,itsnotevenuniquetosoftwareengineering:westoleitfromthehardwareguys.Thebasicconceptisthatsystemsarebuiltoutofdiscretepartsthatcanbeassembledtomakealargerwhole.
Asoftwarecomponentisadiscretepieceoffunctionalitythatcanbepluggedintodifferentapplications.Forexample,Imightdevelopacalendarcomponentthatallowstheusertopickadayofthemonth.
Ofcourse,componentsdonothavetobevisual-areusablepieceoflogicforcalculatingsalestaxcouldalsobewrittenasacomponent.Theimp</p>在实现ERP等高端的ASP应用时,用户需要提供核心的经营资料,需要ASP商有很高的信用度。楼上说交互性不好,太牵强了吧。在微软提供的一套框架中,利用asp做网站,开发效率高,使用人数少,减少不必要的开销。交互性是互动方式,是有开发人员决定的。 |
|