《外文翻译-Ajax的应用.docx》由会员分享,可在线阅读,更多相关《外文翻译-Ajax的应用.docx(9页珍藏版)》请在优知文库上搜索。
1、附录1TheapplicationofAjaxSpendafewminutesusingyourapplicationyouselected(browserexcept),writeitdowntowhatuserinteraction,andthenimmediatelyback.Forthesakeofbrevity,Igiveanexampleofelectronicform,however,pointsinvolvedhereisgeneralenoughforvariouscases,thetexteditor.Well,westarted.Firstinthespreadsheet
2、toinputsomeequalities,payattentionto,caninteractinseveralways:editdata,browsingthedatausingthekeyboardandmouse,alsocanusethemousetodragtoreorganizethedata.Idotheseoperations,theprogramgavemefeedback.Whenmovingthemouse,thecursorchangesshape;whenthemousestopsabove,buttonbright;selectedtextcanchangecol
3、or.Whenawindowordialogboxisselected,andusuallyisnotthesame,etc.Thesearetheso-calledrichuinteraction.Ofcourse,therearestillsomeroomforimprovement,butthisisagoodstart.OK,aspreadsheetisarichclientprogram7Absolutelynot.Inaspreadsheetorsimilardesktopapplications,businesslogicanddatamodelisruninaclosedenv
4、ironment.Inthisenvironment,theyclearlyunderstandeachother,andcanvisiteachother,andtheenvironmentoutsideofthings,isunknowntothem.Whatistheclient?Itisaseparateprocessofmutualcommunicationprogram,whichisusuallyrunontheserver.Ingeneral,theserverisalwaysbiggerthantheclient,ability,dispositionisbetter,bec
5、ausetheserverisusuallystoredmultitudeinformation.Theclientprogramenablestheenduserscanviewandmodifytheinformation,whenmultipleclientsconnectedtothesameserver,canshareinformationbetweenthem.Showsasimpleclient/serverarchitecture.Inthenlayerarchitectureinthemodem,theserveroftenandfurthertheback-endserv
6、er(suchasadatabase)communication,soCallednIniddlewarenIayeralsoplaysaroleofclientandserver.EndofourAjaxapplicationinthechain,itisonlyastheclient,therefore,fortheconvenienceofdiscussion,wecanpulthewholensystemasalabeledasblackboxserver.SpreadsheetapplicationsIonlyneedtomanageitsownsavedasmallamountof
7、datainmemoryorinthelocalfilesystem.Ifthedesignofwellstructure,couplingformdataanditcanbeveryloose,butIcan,tpassanetworktosplitorSharethemthroughnetwork.Inthissense,theapplicationofelectronicformisnotaclient.ThecorrespondingWebbrowserisatypicalclient,whichcommunicatewiththeWebserver,therequestpage.Th
8、ebrowserhasabundantfunctions,usedtomanageuserbrowsingbehavior,thecommonfunctionofthebackbutton,thehistorylistandtabbedbrowsingmultipledocumentsetc.ButwhenweputthesitespecificWebpagesasanapplication,thesegeneralbrowsingfunctionactuallyandapplicationis,atbest,suchasspreadsheetsandWindowsbegantherelati
9、onshipbetweenbuttonorthewindowlist.WeconsidertheapplicationofmodernWeb.Forthesakeofsimplicity,wechoseAearthpeopleknowonlinebookstore.OpentheAmazonsiteinthebrowser,becausebeforeIvisited,itwillshowmeafriendlygreeting,Somerecommendedbibliography,andmypurchasehistoryinformation.Clickonanyoneoftherecomme
10、ndedbibliography,willgotoanotherpage(atthistime,thepagetorefresh,withinafewsecondsIwhatalsodontsee).Thenewpageistheinformationrelevanttothebookreview:otherbooks,second-handbooks,offerthesameauthor,andotherbooksIread.Inshort,appearstobeveryrich,highdegreeofassociatedinformationinfrontofme.Butforme,in
11、teractivewayistoclickonthehyperlink,andthenfillinsomeforms.Suppose1atthekeyboardaccidentallyfellasleep,wakeupseconddays,ifnotrefreshthepage,IdontknowuHarryPorterseriesofbookshavebeenpublished,norwillmylistfromonepagetoanotherpage,ifIwanttoseemorethingstoo,becauseIcannotchangethelocalcontentareapages
12、ize.IseemtobeinthecriticismoftheAmazoninterface,butitisnotthecase,Ijusttookitasanexample.Infact,inthetraditionalWebdevelopmentoftheshackles,theyhavedoneverywell.Butcomparedtothespreadsheet,andtheinteractionmodelisundoubtedlytoolimited.WhyWebistheapplicationofmodemstillhavesomanyIimitationsTThecurren
13、tsituationhassomereasonabletechnicalreasons,wehavetoconsidernow.TheblueprintfortheInternetisallthecomputerintheworldareconnected,formingahugecomputingresources.Ifthelocaldataandremoteinvocationequated,thenboththeanalysisofproteincomponentsorcracksignalsfromouterspace,usersneednotconsiderthephysicall
14、ocationofthemachines,therestofthecomputationonlypleasure.Butunfortunately,thelocalcallandremoteinvocationissomethingtotallydifferent.Underthecurrentleveloftechnology,thenetworkcommunicationisstillacostlythings(thatistosay,isusuallyveryslow,butunreliable).Intheabsenceofanetworkcalledthesituation,meth
15、odandfunctionofdifferentdataandtheiroperationsarelocatedinthesamelocalmemory,totransferdataandreturntheresultsobtainedareverydirect.Inaremotecall,communicationinthenetworkatbothendsofthetwosidestosendandreceivedatarequiresalotofcomputationatthebottom.Comparedwiththedatabackandforthontheline,thesecal
16、culationsrequiremoretimeconsuming.Thetransmissionofabinarydata,togothroughmanystepsofcodinganddecoding,errorchecking,failure,packetretransmissionsplitandreorganization,dataintoOand1binarysignal,throughtheline(orwirelessconnectiontotheotherparty).Inthelocal,callthefunctioncallrequestisencodedasanobject,thentheobjectisserializedasaseriesofbytes,theapplicationlayerprotocol(usuallyHTTP)viathephysicaltransmissionmedium(suchascoppercable,opticalfibe