外文翻译--ASP--网页制作新方法.doc
英文资料-1-ASP-ANewMethodtoMakeWebPagesAbstract:ThetechnologyofActiveServerPagesASP)isspeedingtechnology.ThispaperprinciplemainlyintroducedthedifferencesbetweenthetechnologyofASPandthetechnologyofHTML,theworkprincipleofASPanditsapplicationin-lineobject.TheapplicationofActiveXtechnologytoASP,andaconclusionaboutthecharacteristicsandfunctionsofASPwasdrawn.IntheendwelistedthesourceprogramofthetechnologyofASPappliedinactualprojectforreference.KeyWords:ASP,HTML,WebServerASPisWebServersscriptenvironment,whichexplainsscriptinInternetandintranetstationsWebServer.Itcanexplainandexecuteeveryrequest,whicharesentbyIE,andthenresponsesandexecutesactive,interactiveandhighefficientWebServerappliedprogram.InconstructionanysuccessfulandpracticalstationWeb,ASPisessentialtoWebServer.1.ASPSandHTMLWhenitcomestoASP,wehavetotalkaboutanotherlanguage,inwhichweconstructionWebSiteneed:HyperMetaTextLanguage,whichisshortforHTML.HTMLusuallydescribesapagesallbasicfactorsintextdescriptionlanguage.Allcontentandmodelshownbypagetousersareincludedinasmallerscriptfile.UsuallydesignersuseasseenasiscomplierssuchasFrontPage98,NetscapeGold3.0andsoondesignapageandthenuploadittoWebServer.AfterusingbrowserdownloadthisscriptfilefromWebServer,browserwillexplainscriptfileintocolorfulpage,whicharedesignedbyusers,itisenjoyedandreadbyusersautomatically.But,awebsiteonlyhavingHTMLpageisdull.Becauseusersbrowsethispageeverytime,theyseeallthesamethingsunlessdesignerrefreshesthispage.Atthesametime,asnothavinginterconnectedoperationwithusers.Nothavinginterfacedwithenoughdatabaseresource,thesewebstationscontentisverysingle.AlthoughWebappliedprogramwritteninCGItechnologycanbechangedintoactivewebpage,itcanonlybemadewithasingledataoperation,nothavinginterconnectioncapacity.Andhasveryhighandstrictrequesttodesigners.ItneedsmakingaCGIprogramforeveryacquirement,itsworkisverylargeanditsCodesarenotallsuccessfullyexecuted.WhenmanyusersvisitaCGIatthesametime,itwillmakesomeprogramcopyoperatedinserverpot,slowingdownserverasincreasingprogram,leadingtoslowdownusersvisiting.FortunatelyatpresentweownASP,usermaymakeselectedbrowsewithmuchpageinWebStation,anddesignsometableswiththispage,whicharefilledin英文资料-2-byuserthenobtainmoreinformationaboutuser,Ifwebserveranddatabaseserverinterfacehaveconnected,thenwecanseemoreandnewerinformation.ASPdesignsactivepage,itmayreceiveinformationwhichisreferredbyusers,andresponsesquickly.AmongthemdatacanchangedasactualstatementandnotneedpeoplerefreshWebPagebyselfcansatisfyapplicationrequest.ForexamplewhenwehavefilledintableandsendHTTPrequestinIE,itmayneedWebServerexecutesanappliedprogramdesignedbytable,notasimpleHTMLfile.Thisappliedprogramanalyzessomeinputteddata,andgetrespondedresults(usuallyareresultssetofdatabasesearching)basedondifferentdataintobrowseinformofHTML.Dataindatabaseisvariableanytimebuttheappliedprogramsexecutedinserverneednotbechanged,webpageinformationobtainedbyvisitorwillkeepfreshallthesame.2.TheworkprincipleandconfigurationASPInservermachine,wemayapplyanASPhomepage;webservershouldresponsesthisHTTPrequestandexplainsthisappliedfile.WhenitmeetsanycompatiblescriptwithActiveXScripting(forexampleVBScriptandJavaScript),ASPcanaskproperscripttodealwithit.Ifscriptinstructionincludesrequestofvisitingdatabase,itcanconnectwiththebehinddatabasebyADOPBandODBC.Itmayexecutevisitingdatabase-by-databasevisitedmachine.ASPscriptisexplainedandexecutedinWebSite,itmaymakeproperHTMLhomepagebasedonvisiteddatabaseautomaticallytoresponsesusersrequest.WebServerresponsiveinallsendingandreceiving.Inpracticalapplication,whenASPmeetsscriptcommandofvisitingdatabase.itcantalkwithdatabaseADO(ActiveXDataObjects)andmakeexecuteresultscreateaHTMLpageavertedtoserverpottoresponseIEsapply.WhatwecanseepageinusersIEisshowninsingleHTML,forexample,contentofbehinddatabaseexpressedinformoftable.AsASPcombinatedwithJavaScriptandVBScript.itcanvisitActiveXcomponentbyprogrammingandhasthecapacityofproducedHTMLautomatically,soitisanefficientwayinconstructingactivewebsite.Instructure,ASPcommunicateddatabasebyODBCorADO,soitcanbeupcompatiblewithmuchdifferentdatabasesystem.Fordownlayer,HTMLproducedbyASPhaswideappliedforClientIE.ButWebserversupportedbyASPisverylittle,anditconfinetoseveralMicrosoftWebServer.Theirlowestversionsare:·WindowsNTServer4.0:MicrosoftIIS(InternetInformationServer)3.0;·WindowsNTWorkstation4.0:MicrosoftPeerWebServices3.0;·Windows95:MicrosoftPWS(PersonalWebServer)1.0,Win95ofChineseversionshouldsuitablewithPWSofChinese.3.ASPssixinsideobjectsandtheirapplicationASPisselfprovidewithsixinsideobjects,whicharecandirectlyusedby英文资料-3-ASPscript.Theyare:request:waitingforusersinformationresponse:deliverinformationtouserserve:providemethodandcharacterizesofvisitingservercookies:attachtosetobjectofRequestobjectandResponseobjectapplication:preserveandusesomecommoninformationamongmanyhomepagesinanapplicationprogram.Session:preserveandusesomecommoninformationamongmanyhomepagesinauserAmongthem,usinginsideobjectoneandtwocanrealizeWebsinteractivefunction,usinginsideobjectfiveandsixcansolvecompatibleapplicationproblem.OnemainlycharacteristicofASPiscomplierablecoherentapplicationprogram,whichcanshareinformationbetweensomepages.UsinginsideApplicationandSessionobjectcanrealizethesefunctions.Applicationobjectkeepsthesameinformationinanappliedprogram;allcomponentsofthisappliedprogramcanshare.Inordertopreventitchangedbymanyusers,itprovideslockandunlockstwomethods.Forexample:Application.Lockforbidsotheruserstochangeapplicationinformation.Application.Unlockpermitotheruserstochangeapplicationinformation.WecanuseSessionobjecthasanarrowerusagerangethanApplicationobject.Itkeepsonlyoneapplicationinformation,whichbelongstoonlyoneuser.ASPsapplicationprogrammayhaveonlyonehomepage,andmayalsohaveseveralhomepages.Allfileslieinonefalselocation.Sessionobjectcanletausershareallinformationinonehomepage.Whenuserfirstappliesforan*.aspinanappliedprogram.ASPwillgivethisuseraSessionIDwhichcanidentityusersolo,thencanidentitydifferentusersinthesameappliedprogram.Cookiesobjectmainlyrecordsomedatainputbyuser.ItsmemorylocationisusersIE,andithasuseexpire,certainlydesignerscancontrolit.4.ASPandACTIVEXWhenwemakeWebwithASPtechnology,wehavetofollowwiththisprinciple.Itisthat,onlyincoherebetweenASPServerscriptandcomponentobjectmodel,canwemakeoutpracticalandusefulinformationsoftware.ASPscriptisaconnection,canconnectsomecomponentobjectswithsomecertaincharacteristicfunctionobjectstoformfinishsoftware.Thisindustrialprincipleissimilartotheprocessofhardwarefactoryproducingboardcard,thesecomponentobjectsareequivalenttochiphaveextendcircuit,butASPonlyconnectwithchip,thuscomponentobjectplayacentralrole.COM,whichisWindowssoftwarestandardbasedonbinary,developed,basedonOLEtechnologygradually.WecancommunicatebasedonCOMstandard英文资料-4-whenwritecomponentobjectindifferentlanguage.COMistechnologyandstandard.ItisnamedafterACTIVEXinbusiness.InmakingWeb,themostimportantisusingADOobjecttovisitdatabase.AfteruserloginonWeb,WebServerexecutesprogramofdatabaseservereloigningprogramautomatically,thenforsomelatterandcomplexrequestoccasionally,WebServerexplainsandexecutesVBScriptandJavaScriptstatementsinsideASPpagesautomatically,thenoperateSQLinquireandbackwardtheinquiredresultstousers.ADO(ActiveXDataObjects)whichisagoodspecialobjectsetofvisitingdatabaseprovideASPwithawholestationsitedatabasevisitingmethodand.Itcanserveforserverandofferhomepagecontentwithdatabaseinformation.ByexecutingSQLcommand,userscaninput,refreshanddeleteWebServersdatabaseinformationinIE.ADOusesinsideRecordSetsobjectasdatasmaininterface.ADOcanuseVBScriptandJavaScriptstatementtocontrolvisitingdatabase,andinputandseeinquireresults.ADOcanconnectmuchdatabasesupportbyODBC,forexample,SQLServer,oracleInformixandsoon.Inusing,atfirst,weneedmakeproperDSN(datasourcename)inODBCofcontrolboard.andchoicesystemdatasourcename,specifydriveprogramofuse,forexample,SQLServerinputDSN.Indatasourcenameandspecifyserveranddatabase.TheflowchartofWEBdatabasevisitingisshowninfollowingchartoneDesignerscanmakesomecharacteristiccomponentobjectthemselvesinrequiretofinishsomespecialjob,wecanwriteinVisualBasic,VisualC+,Delphi,Javaandsoon.Therearetwoclassifyofcomponentobjectselfmaking:Oneis*.dllfileproducedbyclassify.aftermachineregistered,itcanbeusedbySetobjectnameinASPscript.Inthisusingprocessobjectisworkinbehindserver.TheresultofprocessplaysfrontIEbyHTML,whichisproducedbysystemautomobile.Anotheris*.ocxfile.UsuallytheseeableobjectActiveXcandirectlyimbeddedin*.asphomepage,itneedsusing<OBJECT>ofHTMLtoinsertpage.Usuallyafterfinishproducecomponentproducedtoproducedto*.cabfileinunloadedrequest.Inthisusingwayobjectshoulddownloadfromseveratfirst,andthenoperateinfrontIEofclient.Whendownloadingfirsttime,theirrelative*.Dlland*.ocxfilesshouldsetupandregisteratlocal.Reuselatter,wecanabstaindirectlywithoutdownloading.ThisiswhatActiveXisbetterthanJavaApplet.Fromthefarsight,thecombinationusingofASPandCOMobjectiscertainlyanewandcharacteristictechnology.Itismoreimportantthatgiveoutanewsoftwaredesignmethod.Hardwaretechnologymethodiswellappliedinto