




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
外文翻译ENGLISHE:DevelopWebapplication programusingASPthearchitecture that mustfirstestablishWebapplication.Nowinapplicationfrequentlywithtohavetwo:ThearchitectureofC/SandthearchitectureofB/S.Client/server andcustomerend/server holdthearchitecture ofC/S.Thecustomer/serverstructureoftwofloor.Customer/server (Client/Server )modelisakind ofgoodsoftwarearchitecture, it is theoneofbestapplication pattern ofnetwork. Fromtechnology, seethat it isalogic concept, denotewill aapplication manytasksofdecomposingdifferencecarryout,commoncompletionisentiretoapplythefunctionoftask.Oneachnetworkmaincomputerofwebsite,resource(hardware,softwareanddata)divideintostep,isnotbalanced,undercustomer/serverstructure,withouttheclientcomputerofresourcethroughsendingrequesttotheserverthathasresource,getresourcerequest,someettheresourcedistributioninnetworknotbalancedness.Withthiskindofstructure,cansynthesizevariouscomputerstocooperatewithwork,letiteachcan,realizethescaleforthesystemofcomputeroptimization(Rightsizing)withscalereducetomelt(Downsizing).Pictureisasfollows:Itismostoftodivideintocomputernetworkapplicationintotwo,inwhichtheresourceandfunctionthatpartsupportsmanyuserstoshare,itisrealizedbyserver;Anotherpartfaceseveryuser,isrealizedbyclientcomputer,alsonamely,clientcomputerisusualtocarryoutprosceniumfunction,realizesman-machineinteractionthroughuserinterface,oristheapplicationprogramofspecificconducteduser.Andserverusuallycarriesoutthefunctionofbackstagesupporter,managestheoutsiderequestconcerningsetingup,acceptingandreplyinguserthatshared.Foracomputer,itcanhavedoublefunction,isbeingcertainandmomentarytocarvetoactasserver,andagainbecomesclientcomputerinanothertime.Customer/servertypecomputerdivideintotwokinds,onesidewhooffersserviceiscalledasserver,asksonesideofservicetobecalledascustomer.Tobeabletoofferservice,serveronesidemusthavecertainhardwareandcorrespondingserversoftware;Also,customeronesidemust1alsohavecertainhardwareandcorrespondingcustomersoftware.Theremustbeaagreementbetweenserverandcustomer,bothsidescommunicateaccordingtothisagreement.Applycustomer/servermodelinInternetservice,therelationbetweencustomerandserverisnotimmutable.SomeInternetnodeoffersserviceontheonehand,alsogetsserviceontheotherhandfromothernode;Itiseveninonetimedialoguecourse,mutualrolealsoexchangesprobably.Asincarryoutfiletransmission,ifbecalledasonesidewhooffersfileserver,iscalledasonesidewhogetsfilecustomer,whenusinggetormgetordersinceanothernodetakesfile,canthinkthatwhatselfuseanditisclientcomputer,isusingputormputordertoanothernodedispatchfilecanagainthinkthemachinethatusedselfisserver.Multilayercustomer/serverstructureAlongwiththedevelopmentofenterpriseapplication,recently,haveagainarisenakindofnewmultilayerarchitecture,itappliescustomerendtodivideintotwominutes:Customerapplicationandserverapply.Customerapplicationisthepartoforiginalcustomerapplication,isanotherandpartialtohavebeentransferedtoservertoapply.Newcustomerapplicationtakestheresponsibilityforuserinterfaceandsimpleregularbusinesslogicandnewserverapplicationresidentcore,changeablebusinesslogic.Thereforeitsstructurehasbecomenew(Clientapplication+Serverapplication)/Serverstructure.Followingpictureshows:ThiskindofstructurehassolvedtraditionalClient/Servercanexpandproblem,havereducedcustomerendbusinesslogic,andhavereducedtherequirementofcustomerendforhardware.Atthesametimebecauseofalotofbusinesslogicconcentrationshavegonetounitaryapplication serveron,themaintenanceworkofapplication systemhadbeenalsoconcentratedtogether,haveeliminatedtheprobleminthetraditional structure ofClient/Server that software distributes. ThiskindofstructureiscalledasthearchitectureofB/S.Browser/Server andbrowser/server holdthearchitecture ofB/S.On2essence,Browser/ServerisalsoakindofstructureofClient/Server,itisakindoffromthetraditionaltwolevelsofstructuraldevelopmentofClient/Servercometothethree-layerstructuralspecialcaseofClient/ServerthatappliedonWeb.InthesystemofBrowser/Server,usercanpassthroughbrowsertoalotofserversthatspreadonnetworktosendrequest.ThestructureofBrowser/Serverismaximumtohavesimplifiedtheworkofclientcomputer,onclientcomputer,needtoinstallanddeployfewcustomerendsoftwareonly,serverwillbearmorework,fordatabasevisitandapplyprogramcarryoutwillinserverfinish.Underthethree-layerarchitectureofBrowser/Server,expresslayer(Presentatioon),functionlayer(BusinessLogic),datalayer(DataService)havebeencuttheunitof3relativeindependences:Itisthefirstlayeroftoexpresslayer:Webbrowser.Inexpressinglayercontainsystemshowlogic,locateincustomerend.It'staskistosuggestbyWebbrowsertothecertainaWebserveronnetworkthatserviceisasked,afterverifyingforuseridentity,WebserverdeliversneededhomepagewithHTTPagreementtocustomerend,clientcomputeracceptthehomepagefilethatpassed,andshowitinWebbrowseron.Secondlayerfunctionlayer:HavetheWebserveroftheapplicationfunctionofprogramextension.Infunctionlayercontainthesystematichandlingofgeneralaffairslogic,locateinWebserverend.It'staskistherequestconcerningacceptinguser,needtobefirstconductedandcorrespondingtoexpandapplicationprogramanddatabasetocarryoutconnection,passesthroughthewaiessuchasSQLtodatabaseservertoputforwarddatahandlingtoapplyfor,thenetc.databaseservertheresultofhandlingdatasubmittoWebserver,deliveragainbyWebservertoreturncustomerend.Thenumberofpliesof3thaccordingtolayer:Databaseserver.Indatalayercontainsystematicdatahandlinglogic,locateindatabaseserverend.It'staskistoaccepttherequestthatWebservercontrolsfordatabase,realizationisinquiredandmodifiedfordatabase,updateetc.function,submitoperationresulttoWebserver.Carefulanalysisisbeeneasytosee,thearchitectureofBrowser/Serverofthree-layeristhehandlingofgeneralaffairsofthetwolevelsofstructureofClient/Serverlogicmodularfromthetaskofclientcomputerinsplit,fromthefirstfloorofindividualcompositionbearthepressureofitstaskandsuchclientcomputerhavealleviatedgreatly,distributeloadbalancedlyandhavegivenWebserver,sofromthestructuralchangeofClient/serveroforiginaltwofloorthestructureofBrowser/Serverofthree-layer.Thiskindofthree-layerarchitecturefollowingpictureshows.Thiskindofstructurenotonlyclientcomputerfromheavyburdenand3therequirementofperformancethatrisescontinuouslyforitinliberationcomeout,alsodefendtechnologypeoplefromheavymaintenanceupgradingworkinfreeoneself.Sinceclientcomputerhandlesgeneralaffairs,logicpartialminuteshavegivenfunctionserver,makeclientcomputerrightoff"slender"alotof,donottaketheresponsibilityforhandlingcomplexcalculationanddataagainvisitetc.crucialgeneralaffairs,isresponsibletoshowpart,so,maintenancepeopledonotrushaboutagainforthemaintenanceworkofprogrambetweeneveryclientcomputer,andputmajorenergyintheprogramonfunctionserverupdatework.Betweenthiskindofthree-layerstructurallayerandlayer,themutuallyindependentchangeofanyfirstfloordoesnotaffectthefunctionofotherlayer.IthaschangedthedefectofthetwolevelsofarchitectureofClient/Serveroftraditionfromfoundation,itisthetransformwithdeeponceinapplicationsystematicarchitecture.ThecontrastoftwoarchitecturesThearchitectureofBrowser/ServerandthearchitectureofClient/ServercomparewithalladvantagesthatnotonlyhavethearchitectureofClient/ServerandalsohavethearchitectureofClinet/Servertheuniqueadvantagethatplacedoesnothave:Openstandard:ThestandardadoptedbyClient/Serveronlyindepartmentunificationforbut,it'sapplicationisoftenforspecialpurpose.Itislowertodevelopanddefendcost:ItneedtobeimplementedonallclientcomputersthattheapplicationofClient/Servermustdevelopthecustomerendsoftwareforspecialpurpose,nomatterinstallationanddispositionescalatestill,havewastedmanpowerandmaterialresourcesmaximumly.TheapplicationofBrowser/Serverneedincustomerendhavegeneralbrowser,defendandescalatetoworkinserverendgoon,neednotcarryoutanychangeascustomerholds,havereducedthecostofdevelopmentandmaintenancesogreatly.Itissimpletouse,interfacefriendly:TheinterfaceoftheuserofClient/Serverisdecidedbycustomerendsoftware,interfaceandthemethodofitsusearenotidenticaleach,perpopularizeasystemofClient/Serveraskuserstudyfromthebeginning,ishardtouse.TheinterfaceoftheuserofBrowser/Serverisunifiedonbrowser,browseriseasytouse,interfacefriendly,mustnotstudyuseagainothersoftware,theuseofaLaoYongYithathassolveduserproblem.Customerenddetumescence:ThecustomerendofClient/Serverhasthefunctionthatshowsandhandlesdata,astherequirementofcustomerendisaclientcomputer"itisfat"veryhigh.ThecustomerofBrowser/Serverholdstheaccessthatnottakestheresponsibilityfordatabaseagainandtheetc.taskofcomplexdatacalculation,needitonlyshow,thepowerfulrolethathasplayedserverfullyissolargetohavereducedtherequirementforcustomerend,customerendbecomevery"thin".4Systemisflexible:The3minutesofthesystemofClient/Server,inmodular,havethepartthatneedtochangetowantrelationtothechangeofothermodular,makesystemverydifficultupgrading.The3minutesofthesystemofBrowser/Servermodularrelativeindependence,inwhichapartofmodularchange,othermodulardoesnotgetinfluence,itisveryeasythatsystemimprovetobecome,andcanformthesystemwithmuchbetterperformancewiththeproductofdifferentmanufacturer.Ensuresystematicsafety:InthesystemofClient/Server,directlyjoinwithdatabaseserverbecauseofclientcomputer,usercanveryeasilychangethedataonserver,cannotguaranteesystematicsafety.ThesystemofBrowser/ServerhasincreasedalevelofWebserverbetweenclientcomputeranddatabaseserver,makestwonottobedirectlylinkedagain,clientcomputercannotbedirectlycontroledfordatabase,preventuserefficientlyinvadeillegally.ThearchitectureofBrowser/Serverofthree-layerhastheadvantagethatalotoftraditionalarchitecturesofClient/Serverdoesnothave,andisclosetohavecombinedthetechnologyofInternet/Intranet,isthatthetendencyoftechnicaldevelopmenttendsto,itapplicationsystemtapeintoonebrand-newdeveloptimes.FromthisusoptiontheconfigurationofB/Sthearchitecturethatdevelopsassystem.whatareC/SwithB/SFor"C/S"withthetechnologyof"B/S"developchangeknow,first,mustmakeitclearthat3problems.(1)WhatisthestructureofC/S.C/S(Client/Server)structure,theserverstructureandclientcomputerthatallknowwell.Itissoftwaresystematicarchitecture,throughitcanholdhardwareenvironmentfullyusingtwoadvantage,realizetaskreasonabledistributiontoClientendandServerend,havereducedsystematiccommunicationexpense.Now,themostsystemsofapplicationsoftwarearethetwolevelsofstructureoftheformofClient/Server,aredevelopingtotheWebapplicationofdistributiontypesincecurrentsoftwareapplicationissystematic,WebandtheapplicationofClient/Servercancarryoutsamebusinesshandling,applydifferentmodulartosharelogicassembly;Thereforeitissystematicthatbuilt-inandexternalusercanvisitnewandexistingapplication,throughthelogicinexistingapplicationsystem,canexpandnewapplicationsystem.Thisisalsopresentapplicationsystemdevelopdirection.TraditionalC/Sarchitecturethoughadoptingisopenpattern,butthisistheopennessthatsystemdevelopsalevel,inspecificapplicationnomatterClientendor5Serverendthesoftwarethatneedtostillspecifysupport.BecauseofthesoftwaresoftwarethatneedtodevelopdifferenteditionaccordingtothedifferentsystemofoperatingsystemthatcannotofferthestructureofC/Sandtheopenenvironmentofusergenuineexpectation,besides,therenovationofproductisveryrapid,isnearlyimpossibletoalreadymeetthe100computeraboveusersoflocalareanetworkatthesametimeuse.Pricehaslowefficiencyhigh.Ifmycourtyarduses,Shanghaiexceedtheorchidcompany'smanagementsoftware"statisticsoflawcase"istypicalC/Sarchitecturemanagementsoftware.(2)WhatisthestructureofB/S.B/S(Browser/Server)structurebrowserandserverstructure.ItisalongwiththetechnologyofInternetspringup,itisforthestructureofimprovementorakindofchangeofthestructureofC/S.Underthiskindofstructure,userworkinginterfaceistorealizethroughWWWbrowser,losethelogicofgeneralaffairsverymuchinfront(Browser)realization,butthemajorlogicofgeneralaffairsinserverend(Server)realization,formthethree-layerclaimed3-tierstructure.So,havesimplifiedcustomerendcomputerloadgreatly,havealleviatedsystemtodefendworkloadandthecostwithupgrading,havereducedtheoverallcostofuser(TCO).Withpresenttechnologysee,localareanetworkthenetworkapplicationthatestablishesthestructureofB/S,andunderthepatternofInternet/Intranet,databaseapplicationiseasytoholdrelatively,costalsoislower.Itisthatonenessgoestothedevelopmentofposition,canrealizedifferentpeople,neversameplace,withdifferencereceivethewayofentering(forexampleLAN,WAN,Internet/Intranetetc.)visitandoperatecommondatabase;Itcanprotectdataplatformefficientlywithmanagementvisitlimitsofauthority,serverdatabaseisalsosafe.Nowinmycourtyard,net(Intranet),outernet(Internet)withBeijingeasternclearbigcompany"lawcaseandthemanagementsoftwareofofficialbusiness"isthestructuralmanagementsoftwareofB/S,policemeneachworkingstationinlocalareanetworkpassthroughWWWbrowsercanrealizeworkingbusiness.EspeciallyinJAVAstepplatformlanguageappearanceafter,theconfigurationmanagementsoftwareofB/Sismorefacilitated,isshortcut,efficient.(3)Themanagementsoftwaretechnologyofmainstream.6Thetechnologyofmainstreamofmanagementsoftwaretechnologyisasmanagementthought,havealsogonethrough3developperiod.First,interfacetechnologygoestoWindowsgraphinterface(orgraphuserinterfaceGUI)fromlastcenturyDOScharacterinterface,tillBrowserbrowserinterface3differencesdevelopperiod.Secondly,todayownthebrowserinterfaceofcomputer,isnotonlyvisualandiseasytouse,whatismoremajoristhatanyitsstyleofapplicationsoftwarebasedonbrowserplatformisas,maketherequirementofchoosingapersonforthejobforoperatingtrainingnothighandsoftwareoperabilityisstrong,iseasytodistinguish;Moreoverplatformarchitecturethefilethatalsogoestotodayfrompastsingleuserdevelopment/server(F/S)systemandclientcomputer/server(C/S)systemandbrowser/server(B/S)system.ThecomparisonofC/SandB/SC/SandB/Sisthenowworldtwotechnologiesofmainstreamofdevelopingpatterntechnicalconfiguration.C/SisthatAmericanBorlandcompanyresearchesanddevelopmostearly,B/SisthatAmericanMicrosoftresearchesanddevelop.Nowthistwotechnologieswithquiltworldcountriesgrasp,itismanythatdomesticcompanyproducearticlewithC/SandthetechnicaldevelopmentofB/S.Thistwotechnologieshavethecertainmarketshareofself,iswithcustomercrowd,eachdomesticenterprisesaysthatownmanagementsoftwareconfigurationtechnicalfunctionispowerful,advanced,convenient,thecustomergroupthatcanlift,haveacrowdscholarinkguesttoshakeflagselfcryout,advertisementfliesalloverthesky,maybecalledbenevolenttoseekernel,sageseeswisdomC/Sconfiguresinferiorpositionandtheadvantageofsoftware(1)Applicationserveroperationdataloadislightcomparatively.ThedatabaseapplicationofthemostsimplearchitectureofC/Sisbecomebytwopartialgroups,customerappliesprogramanddatabaseserverprogram.Bothcanbecalledasprosceniumprogramandtheprogramofbackstagesupporterrespectively.Themachineofoperationdatabaseserverprogramisalsocalledasapplicationserver.Onceserverprogramhadbeenstarted,waitstherequestconcerningrespondingcustomerprogramhairatanytime;Customerapplicationprogramoperationcanbe7calledascustomercomputerontheowncomputerofuser,incorrespondencewithdatabaseserver,whenneedscarryoutanyoperationforthedataindatabase,customerprogramseeksserverprogramvoluntarily,andsendsrequesttoit,serverprogramisregularasbasisintendstomaketoreply,sendtoreturnresult,applicationserveroperationdataloadislighter.(2)Datastoremanagementfunctionrelativelytransparent.Indatabaseapplicationdatastoremanagementfunction,iscarriedoutrespectivelyindependentlybyserverprogramandcustomerapplicationprogram,isregularasprosceniumapplicationcanviolate,andusuallythosedifferent(nomatterishaveknownstillunknown)operationsdata,inserverprogram,donotconcentraterealization,forinstancevisitlimitsofauthority,serialnumbercanberepeated,musthavecustomertalentestablishmenttheruleorder.Itisthesetoown,forthelastuserthatworksonprosceniumprogramis"transparent",theyneednotbeinterestin(cannotusuallyalsointerfere)thecourseofbehind,cancompleteownallwork.Intheapplicationofcustomerserverconfigurationprosceniumprogramnotisvery"thin",troublesomematterisdeliveredtoserverandnetwork.InthesystemofC/Stakeoff,databasecannotbecomepublicreally,professionallymorecompetentstorehouse,itgetsindependentspecialmanagement.(3)TheinferiorpositionoftheconfigurationofC/Sishighmaintenancecostmakeinvestmentjustbig.First,withtheconfigurationofC/S,willselectproperdatabaseplatformtorealizethegenuine"unification"ofdatabasedata,makethedatasynchronismthatspreadsintwolandscompletedeliverbydatabasesystemgotomanage,butthelogicallytwooperatorsoflandwilldirectlyvisitasamedatabasetorealizeefficiently,havesosomeproblems,ifneedsestablishmentthedatasynchronismof"realtime",thedatabaseserverthatmustestablishrealtimecommunicationconnectionbetweentwoplacesandmaintainstwolandsisonlinetorun,networkmanagementstaffwillagainwanttodefendandmanageforcustomerendasserverdefendsmanagement,maintenanceandcomplextechsupportandtheinvestmentofthishighneedshaveveryhighcost,maintenancetaskismeasured.Secondly,thesoftwareofthestructureofC/Softraditionneedtodevelopthe8softwareofdifferenteditionaccordingtothedifferentsystemofoperatingsystem,isveryrapidbecauseoftherenovationofproduct,priceisworkingneedshighwithinefficientalreadydonotmeet.InJAVAstepplatformlanguageappearanceafter,theconfigurationofB/SismorevigorousimpactC/S,andformsthreatandchallengeforit..TheadvantageofB/Sconfigurationsoftware(1)TheMaintenanceofinferiorpositionandupgradingwayaresimple.Nowupgradingandtheimprovementofsoftwaresystemmoreandmorefrequently,theproductoftheconfigurationofB/Sembodiesmoreconvenientpropertyobviously.Foronealittlealittlebitbigunit,ifsystematicadministratorneeds,betweenhundredsof1000evenlastcomputersroundtriprun,efficiencyandworkloadistocanimagine,buttheconfigurationofB/Ssoftwareneedsmanagementserverhavebeenallright,allcustomerendsarebrowseronly,neednotdoanymaintenanceatall.Nomatterthescaleofuserhas,iswhat,hashowmanybranchwillnotincreaseanyworkloadofmaintenanceupgrading,isalltooperateneedstoaimatservertogoon;Ifneeddifferentlyonly,netserverconnectionspecially,realizelong-rangemaintenanceandupgradingandshare.Soclientcomputermoreandmore"thin",andservermoreandmore"fat"isthedirectionofmainstreamoffutureinformativedevelopment.Inthefuture,softwareupgradingandmaintenancewillbemoreandmoreeasy,andusecanmoreandmoresimple,thisisforusermanpower,materialresources,timeandcostsaveisobvious,itisastonishing.Thereforedefendandescalaterevolutionarywayistheclientcomputer"itisthin","isfat"server.(2)Costreduction,itismoretoselect.AllknowwindowsinthecomputeroftopofatableonnearlyoneTongworld,browserhasbecomestandarddisposition,butonserveroperatingsystem,windowsisinabsolutedominancepositionnot.CurrenttendencyistheapplicationmanagementsoftwarethatusestheconfigurationofB/Sall,needtoinstallonlyinLinuxserveron,andsafetyishigh.Thesoserveroptionofoperatingsystemismany,nomatterchoosingthoseoperatingsystem,canletthemostofonesusewindowsinordertothecomputeroftopofatableofoperatingsystemdoesnotgetinfluence,thisformakemostpopularfreeLinuxoperatingsystemdevelopfast,Linuxexceptoperating9systemisfreebesides,itisalsofreetolinkdatabase,thiskindofoptionisverypupular.Say,manypersonsondaily,"Sinawebsite"nets,solongashavinginstalledbrowserforcan,andwhatneednotknowtheserverof"Sinawebsite"touseisthatwhatoperatingsystem,andinfactthemostofwebsitesdonotusewindowsoperatingsystemreally,butthecomputerofuserismostofasinstallingtobewindowsoperatingsystem.(3)Applicationserveroperationdataloadvaluecomparatively.SinceB/Sconfiguresmanagement,softwareinstallationinserverend(Server)on,itisbeenallrightthatnetworkadministratorneedtomanageserveronly,theuserinterfacemajorlogicofgeneralaffairsinserver(Server)endpassthroughWWWbrowsercompletelyrealization,losethelogicofgeneralaffairsverymuchinfront(Browser)realization,allcustomerendshasonlybrowser,networkadministratorneedtodohardwaremaintenanceonly.Butapplicationserveroperationdataloadisheavier,onceoccuring"servercollapse"towaitforproblem,consequenceisunimaginable.Thereforealotofunitshavedatabasetostockserver,arereadyforanyeventuality.原文翻译:利用ASP开发Web应用程序首先必须确立Web应用的体系结构。目前在应用中常用到的有两种:C/S体系结构和B/S体系结构。C/S体系结构即client/server ,客户端/服务器端。两层的客户/服务器结构。客户/服务器(Client/Server)模型是一种良好的软件体系结构,是网络的最佳应用模式之一。从技术上看,它本身是一个逻辑概念,是指将一个应用分解成多个任务分别执行,共同完成整个应用任务的功能。网络各站点主机上资源(硬件、软件、数据)分步不均衡,在客户/服务器结构下,无资源的客户机通过向有资源的服务器发出请求,并得到资源请求,从而适应网络中资源分布的不均衡性。采用这种结构能综合各种计算机协同工作,各尽其能,实现对计算机系统的规模优化(Rightsizing)和规模缩小化(Downsizing)。如下图:10从技术角度讲,“客户机”和“服务器”都是逻辑的概念,其含义是:将计算机网络应用分成两大部分,其中一部分支持多个用户共享的功能与资源, 它由服务器来实现;另一部分是面向每个用户的,由客户机来实现,也就是说,客户机通常执行前台功能,通过用户界面实现人机对话,或是执行用户特定的应用程序。而服务器通常执行后台功能,管理共享的外设,接受并回答用户的请求等。对于一台计算机来说,它可以具有双重功能,在某一时刻充当服务器,而在另一时刻又成为客户机。客户/服务器类型把计算机分为两类,提供服务的一方称为服务器,请求服务的一方称为客户。为了能够提供服务,服务器一方必须具有一定的硬件和相应的服务器软件;同样,客户一方也必须具有一定的硬件和相应的客户软件。在服务器和客户之间必须有一个协议,双方根据这个协议进行通信。将客户/服务器模型应用于Internet服务,客户与服务器之间的关系并不是一成不变的。有的Internet节点一方面提供服务,另一方面也从别的节点处获得服务;甚至在一次对话过程中,双方的角色也可能互换。如在进行文件传输时,如果把提供文件的一方称为服务器,把获取文件的一方称为客户,则在使用get或mget命令从另一个节点取文件时,可以认为自己使用的及其是客户机,在使用put或mput命令向另一个节点发送文件时又可以认为自己使用的机器是服务器。多层的客户/服务器结构随着企业应用的扩展,最近又出现了一种新的多层体系结构,它把客户端应用分为两部分:客户应用和服务器应用。客户应用是原来客户应用的一部分,另一部分被移入服务器应用中。新的客户应用负责用户界面和简单固定的业务逻辑,新的服务器应用驻留核心的、易变的业务逻辑。因此其结构就变成了新的(Client 应用+Server应用)/Server 结构。如下图所示:11这种结构解决了传统Client/Server的可扩展问题,既减少了客户端业务逻辑,又降低了客户端对硬件的要求。同时,由于把许多业务逻辑集中到了单一的应用服务器上,应用系统的维护工作也被集中到了一起,消除了传统Client/Server结构中软件分发的问题。这种结构即被称为B/S体系结构。B/S体系结构即Browser/Server,浏览器/服务器端。本质上,Browser/Server也是一种Client/Server 结构,它是一种由传统的二层 Client/Server 结构发展而来的三层Client/Server 结构在Web上应用的特例。在Browser/Server的系统中,用户可以通过浏览器向分布在网络上的许多服务器发出请求。Browser/Server结构极大的简化了客户机的工作,客户机上只需安装、配置少量的客户端软件即可,服务器将担负更多的工作,对数据库的访问和应用程序的执行将在服务器上完成。在Browser/Server 三层体系结构下,表示层(Presentatioon) 、功能层(BusinessLogic)、数据层(DataService) 被割成三个相对独立的单元:第一层 表示层:Web浏览器。在表示层中包含系统的显示逻辑,位于客户端。它的任务是由Web浏览器向网络上的某一Web服务器提出服务请求,Web服务器对用户身份进行验证后用HTTP协议把所需的主页传送给客户端,客户机接受传来的主页文件,并把它显示在Web浏览器上。第二层 功能层:具有应用程序扩展功能的 Web服务器。在功能层中包含系统的事务处理逻辑, 位于Web服务器端。它的任务是接受用户的请求,首先需要执行相应的扩展应用程序与数据库进行连接,通过SQL等方式向数据库服务器提出数据处理申请,而后等数据库服务器将数据处理的结果提交给Web服务器,再由Web服务器传送回客户端。第三层 数据层:数据库服务器。在数据层中包含系统的数据处理逻辑, 位于数据库服务器端。它的任务是接受Web服务器对数据库操纵的请求,实现对数据库查询、修改、更新等功能,把运行结果提交给Web服务器。仔细分析不难看出,三层的 Browser/Server 体系结构是把二层Client/Server 结构的事务处理逻辑模块从客户机的任务中分离出来, 由单独组成的一层来负担其任务,这样客户机的压力大大减轻了, 把负荷均衡地分配给了Web服务器,于是由原来的两层的 Client/server 结构转变成三层的Browser/Server 结构。这种三层体系结构如下图所示。这种结构不仅把客户机从沉重的负担和不断对其提高的性能的要求中解放出来,也把技术维护人员从繁重的维护升级工作中解脱出来。由于客户机把事务处理逻辑部分分给了功能服务器,使客户机一下子“苗条”了许多,不再负责处理复杂计算和数据访问等关键事务,只负责显示部分,所以维护人员不再为程序的维护工作奔波于每个客户机之间,而把主要精力放在功能服务器上程序的更新工作。这种三层结构层与层之间相互独立,任何一层的改变不影响其它层的功能。它从根本上改变了传统的二层Client/Server体系结构的缺陷,它是应用系统体系结构中一次深刻的变革。两种体系结构的对比Browser/Server体系结构与Client/Server体系结构相比不仅具有Client/Server体系结构的全部优点,而且又有Clinet/Server体系结构所不具备的独特优势:12开放的标准:Client/Server所采用的标准只要在内部统一就可,它的应用往往是专用的。Browser/Server所采用的标准都是开放的、非专用的,是经过标准化组织所确定的而非单一厂商所制定,保证了其应用的通用性和跨平台性。较低的开发和维护成本:Client/Server的应用必须开发出专用的客户端软件,无论是安装、配置还是升级都需要在所有的客户机上实施,极大地浪费了人力和物力。Browser/Server的应用只需在客户端装有通用的浏览器即可,维护和升级工作都在服务器端进行,不需对客户端进行任何改变,故而大大降低了开发和维护的成本。使用简单,界面友好:Client/Server用户的界面是由客户端软件所决定的,其使用的方法和界面各不相同,每推广一个Client/Server系统都要求用户从头学起,难以使用。Browser/Server用户的界面都统一在浏览器上,浏览器易于使用、界面友好,不须再学习使用其它的软件,一劳永逸的解决了用户的使用问题。客户端消肿:Client/Server的客户端具有显示与处理数据的功能,对客户端的要求很高,是一个“胖”客户机。Browser/Server的客户端不再负责数据库的存取和复杂数据计算的等任务,只需要其进行显示,充分发挥了服务器的强大作用,这样就大大的降低了对客户端的要求,客户端变得非常“瘦”。系统灵活:Client/Server 系统的三部分模块中有一部分需改变就要关联到其它模块的变动,使系统极难升级。 Browser/Server 系统的三部分模块各自相对独立,其中一部分模块改变时其它模块不受影响, 系统改进变得非常容易,且可以用不同厂家的产品来组成性能更佳的系统。保障系统的安全性:在Client/Server 系统中由于客户机直接与数据库服务器进行连接,用户可以很轻易的改变服务器上的数据,无法保证系统的安全性。Browser/Server 系统在客户机与数据库服务器之间增加了一层 Web服务器,使两者不再直接相连,客户机无法直接对数据库操纵,有效地防止用户的非法入侵。三层的Browser/Server 体系结构具有许多传统 Client/Server 体系结构不具备的优点,而且又紧密的结合了 Internet/Intranet 技术,是技术发展的大势所趋,它把应用系统带入了一个崭新的发展时代。由此我们选择B/S架构作为系统开发的体系结构。什么是C/S和B/S要想对“C/S”和“B/S”技术发展变化有所了解,首先必须搞清楚三个问题。什么是C/S结构。C/S(Client/Server)结构,即大家熟知的客户机和服务器结构。它是软件系统
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
评论
0/150
提交评论