ASP vs ASP. NET
ASP. NET yog Microsoft lub thev naus laus zis tam sim no rau kev tsim lub vev xaib dynamic. ASP. NET yog tus ua tiav rau lawv lub vev xaib yav dhau los rau tib lub hom phiaj, ASP (hu ua Classic ASP). ASP muab lub platform zoo rau Web programming, thaum ASP. NET muaj ntau yam tshiab uas ua rau nws yooj yim heev los tsim cov ntawv thov web dua li siv cov txheej txheem ib txwm siv.
ASP yog dab tsi?
ASP (Active Sever Pages) yog lub vev xaib thev naus laus zis tsim los ntawm Microsoft. ASP yog lawv thawj tus neeg rau zaub mov-sab sau ntawv cav rau cov vev xaib tsim tawm dynamically. Thaum xub thawj nws tsuas yog ib qho ntxiv rau IIS (Internet Information Services) los ntawm Windows NT 4.0. Tom qab ntawd, nws tau los ua ib qho khoom muag uas tau muab faib nrog Windows 2000 Server. Hauv ASP 2.0, programmers tau muab 6 yam khoom tseem ceeb los ua haujlwm nrog. Lawv yog Application, Session, Thov, Teb, Server thiab ASPError. Cov 6 cov khoom no encapsulated tus cwj pwm thiab tus cwj pwm ntawm cov ntsiab lus tseem ceeb tshaj plaws ntawm lub vev xaib programming. Piv txwv li, Session object siv tau los sawv cev rau kev sib kho raws li cov ncuav qab zib thiab tswj lub xeev ntawm nplooj ntawv mus rau nplooj ntawv. ASP cov vev xaib tuaj yeem nkag mus rau DLLs los ntawm COM (Component Object Model) thev naus laus zis. ASP nplooj ntawv web siv.asp cov ntaub ntawv txuas ntxiv. ASP programmers feem ntau siv VBScript los sau nplooj ntawv. Jscript thiab PerlScript yog lwm qhov kev xaiv ntawm Active scripts siv los sau ASP nplooj ntawv. Tom qab qhia txog ASP. NET, ASP raug xa mus rau Classic ASP lossis ASP Classic.
ASP. NET yog dab tsi?
Microsoft's ASP. NET yog tus ua tiav rau ASP. Nws tau tso tawm xyoo 2002 (nrog. NET Framework 1.0). ASP. NET yog lub web application moj khaum uas tuaj yeem siv los tsim cov vev xaib, web applications thiab web services. Vim ASP. NET khiav ntawm CLR (Common Language Runtime), programmers siv tau ib yam ntawm. NET hom lus (ie C, VB. NET, thiab lwm yam) los sau ASP. NET web applications. ASP. NET cov ntawv thov tuaj yeem ua cov lus SOAP los ntawm ASP. NET SOAP txuas ntxiv. Web Forms cov chav tseem ceeb ntawm kev txhim kho hauv ASP. NET. Web Forms feem ntau muaj.aspx cov ntaub ntawv txuas ntxiv. Cov Web Forms no yog tsim los ntawm static XHTML thiab server-sab scripts rau kev txhais Web tswj thiab cov neeg siv tswj. Tus qauv code-tom qab qhia hauv ASP. NET Framework 2.0 tso cai rau tus programmer khaws cov lej zoo li qub hauv.aspx nplooj ntawv, thaum tag nrho cov lej dynamic khaws cia hauv.aspx.vb lossis.aspx.cs lossis.aspx.fs cov ntaub ntawv (suav nrog VB. NET lossis C. NET lossis F. NET hom lus siv). Piv txwv li, cov ntaub ntawv code-tom qab yuav yog Home.aspx, thaum nws cov nplooj ntawv sib raug zoo yuav yog Home.aspx.cs (xws li siv C). Nov yog qhov kev coj ua hauv Microsoft Visual Studio, uas yog IDE uas tuaj yeem siv los tsim ASP. NET web applications.
Qhov txawv ntawm ASP thiab ASP. NET yog dab tsi?
Thaum piv nrog Classic ASP, ASP. NET ua rau nws yooj yim heev rau cov programmers los ntawm Windows programming mus rau Web programming los ntawm kev qhia txog lub tswv yim ntawm Web tswj (zoo ib yam li Windows Forms tswj). Tsis zoo li ASP, programmers raug txhawb kom siv qhov kev tshwm sim-tsav GUI qauv rau kev txhim kho lub vev xaib nrog ASP. NET. ASP. NET integrates thev naus laus zis xws li JavaScript los pab cov programmers los tsim cov xeev tsis tu ncua los ntawm kev siv cov khoom xws li ViewState.