ASP NET入门C#版毕业论文外文翻译.docx
- 文档编号:25565650
- 上传时间:2023-06-09
- 格式:DOCX
- 页数:13
- 大小:27.05KB
ASP NET入门C#版毕业论文外文翻译.docx
《ASP NET入门C#版毕业论文外文翻译.docx》由会员分享,可在线阅读,更多相关《ASP NET入门C#版毕业论文外文翻译.docx(13页珍藏版)》请在冰豆网上搜索。
ASPNET入门C#版毕业论文外文翻译
BeginningASP.NET2.0inC#
ASP(ActiveServerPages)isarelativelynewtechnologythat’salreadyleaptthroughseveralstagesofevolution.Itwasintroducedaboutsevenyearsagoasaneasywaytoadddynamiccontenttoordinarywebpages.Sincethen,it’sgrownintosomethingmuchmoreambitious:
aplatformforcreatingadvancedwebapplications,includinge-commerceshops,data-drivenportalsites,andjustaboutanythingelseyoucanfindontheInternet.ASP.NET2.0isthelatestversionofASP,anditrepresentsthemostdramaticchangeyet.WithASP.NET,developersnolongerneedtopastetogetherajumbleofHTMLandscriptcodeinordertoprogramtheWeb.Instead,youcancreatefull-scalewebapplicationsusingnothingbutcodeandadesigntoolsuchasVisualStudio2005.Thecostofallthisinnovationisthelearningcurve.Notonlydoyouneedtolearnhowtouseanadvanceddesigntool(VisualStudio)andatoolkitofobjects(the.NETFramework),youalsoneedtomasteraprogramminglanguagesuchasC#.TheInternetbeganinthelate1960sasanexperiment.Itsgoalwastocreateatrulyresilientinformationnetwork—onethatcouldwithstandthelossofseveralcomputerswithoutpreventingtheothersfromcommunicating.Drivenbypotentialdisasterscenarios(suchasnuclearattack),theU.S.DepartmentofDefenseprovidedtheinitialfunding.TheearlyInternetwasmostlylimitedtoeducationalinstitutionsanddefensecontractors.Itflourishedasatoolforacademiccollaboration,allowingresearchersacrosstheglobetoshareinformation.Intheearly1990s,modemswerecreatedthatcouldworkoverexistingphonelines,andtheInternetbegantoopenuptocommercialusers.In1993,thefirstHTMLbrowserwascreated,andtheInternetrevolutionbegan.Itwouldbedifficulttodescribeearlywebsitesaswebapplications.Instead,thefirstgenerationofwebsitesoftenlookedmorelikebrochures,consistingmostlyoffixedHTMLpagesthatneededtobeupdatedbyhand.BasicHTMLpageisalittlelikeaword-processingdocument—itcontainsformattedcontentthatcanbedisplayedonyourcomputer,butitdoesn’tactuallydoanything.ThefollowingexampleshowsHTMLatitssimplest,withadocumentthatcontainsaheadingandsinglelineoftext:
AnHTMLdocumenthastwotypesofcontent:
thetextandthetagsthattellthebrowserhowtoformatit.Thetagsareeasilyrecognizable,becausetheyoccurinsideangledbrackets(<>).HTMLdefinestagsfordifferentlevelsofheadings,paragraphs,hyperlinks,italicandboldformatting,horizontallines,andsoon.Forexample,
SomeText
tellsthebrowsertodisplaySomeTextintheHeading1style,whichusesalarge,boldfont.Figure1-1showsthesimpleHTMLpageinabrowser.HTML2.0introducedthefirstseedofwebprogrammingwithatechnologycalledHTMLforms.HTMLformsexpandHTMLsothatitincludesnotonlyformattingtagsbutalsotagsforgraphicalwidgets,orcontrols.Thesecontrolsincludecommoningredientssuchasdrop-downlists,textboxes,andbuttons.Here’sasamplewebpagecreatedwithHTMLformcontrols:HTMLformsallowwebapplicationdeveloperstodesignstandardinputpages.WhentheuserclickstheSubmitbuttononthepageshowninFigure1-2,allthedataintheinputcontrols(inthiscase,thetwocheckboxes)ispatchedtogetherintoonelongstringandsenttothewebserver.Ontheserverside,acustomapplicationreceivesandprocessesthedata.Amazinglyenough,thecontrolsthatwerecreatedforHTMLformsmorethantenyearsagoarestillthebasicfoundationthatyou’llusetobuilddynamicASP.NETpages!
Thedifferenceisthetypeofapplicationthatrunsontheserverside.Inthepast,whentheuserclickedabuttononaformpage,theinformationmighthavebeene-mailedtoasetaccountorsenttoanapplicationontheserverthatusedthechallengingCGI(CommonGatewayInterface)standard.Today,you’llworkwiththemuchmorecapableandelegantASP.NETplatform.TounderstandwhyASP.NETwascreated,ithelpstounderstandtheproblemsofotherwebdevelopmenttechnologies.WiththeoriginalCGIstandard,forexample,thewebservermustlaunchacompletelyseparateinstanceoftheapplicationforeachwebrequest.Ifthewebsiteispopular,thewebservermuststruggleundertheweightofhundredsofseparatecopiesoftheapplication,eventuallybecomingavictimofitsownsuccessorcounterthisproblem,MicrosoftdevelopedISAPI(InternetServerApplicationProgrammingInterface),ahigher-levelprogrammingmodel.ISAPIsolvedtheperformanceproblembutatthecostofsignificantcomplexity.EvenafterISAPIdevelopersmasterthetrickyC++programminglanguage,theystilllieawakeatnightworryingaboutconfoundingissuessuchasmultithreading.ISAPIprogrammingisdefinitelynotforthefainthearted.SAPIneverreallywentaway.Instead,Microsoftusedittobuildhigher-leveldevelop-mintplatforms,suchasASPandASP.NET.Bothofthesetechnologiesallowdeveloperstoprogramdynamicwebpageswithoutworryingaboutthelow-levelimplementationdetails.Forthatreason,bothplatformshavebecomeincrediblysuccessful.TheoriginalASPplatformgarneredahugeaudienceofnearlyonemilliondevelopers.WhenASP.NETwasfirstreleased,itgeneratedevenmoreinterestasthecenterpieceofthe.NETFrame-work.Infact,ASP.NET1.0wasenthusiasticallyputtoworkindozensoflarge-scalecommercialwebsitesevenwhenitwasonlyinlatebeta.Despitehavingsimilarunderpinnings,ASPandASP.NETareradicallydifferent.ASPisascript-basedprogramminglanguagethatrequiresathoroughunderstandingofHTMLandagooddealofpainfulcoding.ASP.NET,ontheotherhand,isanobject-orientedpro-gammingmodelthatletsyouputtogetherawebpageaseasilyasyouwouldbuildaWindowsapplication.Inmanyrespects,it’seasiertolearnASP.NETthantomasterASP,eventhoughASP.NETisfarmorepowerful.Atthesametimethatserver-sidewebdevelopmentwasmovingthroughanalphabetsoupoftechnologies,anewtypeofprogrammingwasgainingpopularity.Developersbegantoexperimentwiththedifferentwaystheycouldenhancewebpagesbyembed-dingmultimediaandminiatureappletsbuiltwithJavaScript,DHTML(DynamicHTML),andJavacode.Theseclient-sidetechnologiesdon’tinvolveanyserverprocessing.Instead,thecompleteapplicationisdownloadedtotheclientbrowser,whichexecutesitlocally.Thegreatestproblemwithclient-sidetechnologiesisthattheyaren’tsupportedequallybyallbrowsersandoperatingsystems.Oneofthereasonsthatwebdevelopmentissopopularinthefirstplaceisbecausewebapplicationsdon’trequiresetupCDs,down-loads,andothertedious(anderror-prone)deploymentsteps.Instead,awebapplicationcanbeusedonanycomputerthathasInternetaccess.Butwhendevelopersuseclient-sidetechnologies,theyencounterafewfamiliarheadaches.Suddenly,cross-browsercompatibilitybecomesaproblem.Developersareforcedtotesttheirwebsiteswithdiffer-netoperatingsystemsandbrowsers,andtheymightevenneedtodistributebrowserupdatestotheirclients.Inotherwords,theclient-sidemodelsacrificessomeofthemostimportantbenefitsofwebdevelopment.orthatreason,ASP.NETisdesignedasaserver-sidetechnology.AllASP.NETcodeexecutesontheserver.Whenthecodeisfinishedexecuting,theuserreceivesanordinaryHTMLpage,whichcanbeviewedinanybrowser.Figure1-3showsthedifferencebetweentheserver-sideandclient-sidemodel.Thesearesomeotherreasonsforavoidingclient-sideprogramming:
Isolation:
Client-sidecodecan’taccessserver-sideresources.Forexample,aclient-sideapplicationhasnoeasywaytoreadafileorinteractwithadatabaseontheserver(atleastnotwithoutrunningintoproblemswithsecurityandbrowsercompatibility).Security:
Enduserscanviewclient-sidecode.Andoncemalicioususersunderstandhowanapplicationworks,theycanoftentamperwithit.mecases,ASP.NETallowsyoutocombinethebestofclient-sideprogrammingwithserver-sideprogramming.Forexample,thebestASP.NETcontrolscanintelligentlydetectthefeaturesoftheclientbrowser.IfthebrowsersupportsJavaScript,thesecontrolswillreturnawebpagethatincorporatesJavaScriptforaricher,moreresponsiveuserinterface.However,nomatterwhatthecapabilitiesofthebrowser,yourcodeisalwaysexecutedontheserver.Statelimitations:
Toensureoptimumperformance,theWebisbuiltonstatelessprotocols,whichmeansassoonasapageissenttoauser,theconnectionisclosedandanyuser-specificinformationisdiscarded.ASPincludesasessionstatefeaturethatallowsprogrammerstoworkaroundthisproblem.Usingsessionstate,awebapplicationcanretaintemporaryinformationabouteachclientinservermemory.However,sessionstateisuselessinscenarioswhereawebsiteishostedbyseveralseparatewebservers.Inthisscenario,aclientmightaccessserverBwhileitssessioninformationistrappedonserverAandessentiallyabandoned.ASP.NETcorrectsthisproblembyallowingstatetobestoredinacentralrepository,suchasaseparateprocessoradatabasethatallserverscanaccess.ASP.NETdealswiththeseproblems(andmanymore)byintroducingacompletelynewmodelforwebpages.ThismodelisbasedonaremarkablepieceoftechnologycalledtheNETFramework.Youshouldunderstandthatthe.NETFrameworkisreallyaclusterofseveraltechnologies:
The.NETlanguages:
TheseincludeC#andVB.NET(VisualBasic.NET),theobject-orientedandmodernizedsuccessortoVisualBasic6.0;theselanguagesalsoincludeScript.NET(aserver-sideversionofJavaScript),J#(aJavaclone),andC++withManagedExtensions.heCLR(CommonLanguag
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ASP NET入门C#版毕业论文外文翻译 NET 入门 C# 毕业论文 外文 翻译
![提示](https://static.bdocx.com/images/bang_tan.gif)