电子商务毕业论文外文翻译范文《JavaandtheInternet》Word文件下载.docx
- 文档编号:19305484
- 上传时间:2023-01-05
- 格式:DOCX
- 页数:12
- 大小:31.38KB
电子商务毕业论文外文翻译范文《JavaandtheInternet》Word文件下载.docx
《电子商务毕业论文外文翻译范文《JavaandtheInternet》Word文件下载.docx》由会员分享,可在线阅读,更多相关《电子商务毕业论文外文翻译范文《JavaandtheInternet》Word文件下载.docx(12页珍藏版)》请在冰豆网上搜索。
timmediatelyobviousifyou'
recomingfromatraditionalprogrammingperspective.AlthoughJavaisveryusefulforsolvingtraditionalstand-aloneprogrammingproblems,itisalsoimportantbecauseitwillsolveprogrammingproblemsontheWorldWideWeb.
1.Client-sideprogramming
TheWeb'
sinitialserver-browserdesignprovidedforinteractivecontent,buttheinteractivitywascompletelyprovidedbytheserver.Theserverproducedstaticpagesfortheclientbrowser,whichwouldsimplyinterpretanddisplaythem.BasicHTMLcontainssimplemechanismsfordatagathering:
text-entryboxes,checkboxes,radioboxes,listsanddrop-downlists,aswellasabuttonthatcanonlybeprogrammedtoresetthedataontheformorsubmit”thedataontheformbacktotheserver.ThissubmissionpassesthroughtheCommonGatewayInterface(CGI)providedonallWebservers.ThetextwithinthesubmissiontellsCGIwhattodowithit.Themostcommonactionistorunaprogramlocatedontheserverinadirectorythat'
stypicallycalledcgi-bin.”(IfyouwatchtheaddresswindowatthetopofyourbrowserwhenyoupushabuttononaWebpage,youcansometimesseecgi-bin”withinallthegobbledygookthere.)TheseprogramscanbewritteninmostIanguages.Perlisacommonchoicebecauseitisdesignedfortextmanipulationandisinterpreted,soitcanbeinstalledonanyserverregardlessofprocessororoperatingsystem.
ManypowerfulWebsitestodayarebuiltstrictlyonCGI,andyoucaninfactdonearlyanythingwithit.However,WebsitesbuiltonCGIprogramscanrapidlybecomeoverlycomplicatedtomaintain,andthereisalsotheproblemofresponsetime.TheresponseofaCGIprogramdependsonhowmuchdatamustbesent,aswellastheloadonboththeserverandtheInternet.(Ontopofthis,startingaCGIprogramtendstobeslow.)TheinitialdesignersoftheWebdidnotforeseehowrapidlythisbandwidthwouldbeexhaustedforthekindsofapplicationspeopledeveloped.Forexample,anysortofdynamicgraphingisnearlyimpossibletoperformwithconsistencybecauseaGIFfilemustbecreatedandmovedfromtheservertotheclientforeachversionofthegraph.Andyou'
enodoubthaddirectexperieneewithsomethingassimpleasvalidatingthedataonaninputform.Youpressthesubmitbuttononapage;
thedataisshippedbacktotheserver;
theserverstartsaCGIprogramthatdiscoversanerror,formatsanHTMLpageinformingyouoftheerror,andthensendsthepagebacktoyou;
youmustthenbackupapageandtryagain.Notonlyisthisslow,it'
sinelegant.
Thesolutionisclient-sideprogramming.MostmachinesthatrunWebbrowsersarepowerfulenginescapableofdoingvastwork,andwiththeoriginalstaticHTMLapproachtheyaresittingthere,justidlywaitingfortheservertodishupthenextpage.Client-sideprogrammingmeansthattheWebbrowserisharnessedtodowhateverworkitcan,andtheresultfortheuserisamuchspeedierandmoreinteractiveexperieneeatyourWebsite.
Theproblemwithdiscussionsofclient-sideprogrammingisthattheyaren'
tverydifferentfromdiscussionsofprogrammingingeneral.Theparametersarealmostthesame,buttheplatformisdifferent:
aWebbrowserislikealimitedoperatingsystem.Intheend,youmuststillprogram,andthisaccountsforthedizzyingarrayofproblemsandsolutionsproducedbyclient-sideprogramming.Therestofthissectionprovidesanoverviewoftheissuesandapproachesinclient-sideprogramming.
2.Plug-ins
Oneofthemostsignificantstepsforwardinclient-sideprogrammingisthedevelopmentoftheplug-in.Thisisawayforaprogrammertoaddnewfunctionalitytothebrowserbydownloadingapieceofcodethatplugsitselfintotheappropriatespotinthebrowser.Ittellsthebrowserfromnowonyoucanperformthisnewactivity.”(Youneedtodownloadtheplug-inonlyonce.)Somefastandpowerfulbehaviorisaddedtobrowsersviaplug-ins,butwritingaplug-inisnotatrivialtask,andisn'
somethingyou'
dwanttodoaspartoftheprocessofbuildingaparticularsite.Thevalueoftheplug-inforclient-sideprogrammingisthatitallowsanexpertprogrammertodevelopanewIanguageandaddthatIanguagetoabrowserwithoutthepermissionof
thebrowsermanufacturer.Thus,plug-insprovideabackdoor”thatallowsthecreationofnewclient-sideprogrammingIanguages(althoughnotallIanguagesareimplementedasplug-ins).
3.Scriptinglanguages
Plug-insresultedinanexplosionofscriptingIanguages.WithascriptingIanguageyouembedthesourcecodeforyourclient-sideprogramdirectlyintotheHTMLpage,andtheplug-inthatinterpretsthatIanguageisautomaticallyactivatedwhiletheHTMLpageisbeingdisplayed.ScriptingIanguagestendtobereasonablyeasytounderstandand,becausetheyaresimplytextthatispartofanHTMLpage,theyloadveryquicklyaspartofthesingleserverhitrequiredtoprocurethatpage.Thetrade-offisthatyourcodeisexposedforeveryonetosee(andsteal).Generally,however,youaren'
tdoingamazinglysophisticatedthingswithscriptingIanguagessothisisnottoomuchofahardship.
ThispointsoutthatthescriptingIanguagesusedinsideWebbrowsersarereallyintendedtosolvespecifictypesofproblems,primarilythecreationofricherandmoreinteractivegraphicaluserinterfaces(GUIs).However,ascriptingIanguagemightsolve80percentoftheproblemsencounteredinclient-sideprogramming.Yourproblemsmightverywellfitcompletelywithinthat80percent,andsincescriptingIanguagescanalloweasierandfasterdevelopment,youshouldprobablyconsiderascriptingIanguagebeforelookingatamoreinvoIvedsolutionsuchasJavaorActiveXprogramming.
ThemostcommonlydiscussedbrowserscriptingIanguagesareJavaScript(whichhasnothingtodowithJava;
it'
namedthatwayjusttograbsomeofJava'
smarketingmomentum),VBScript(whichlookslikeVisualBasic),andTcl/Tk,whichcomesfromthepopularcross-platformGUI-buildingIanguage.Thereareothersoutthere,andnodoubtmoreindevelopment.
JavaScriptisprobablythemostcommonlysupported.ItcomesbuiltintobothNetscapeNavigatorandtheMicrosoftInternetExplorer(IE).Inaddition,thereareprobablymoreJavaScriptbooksavailablethantherearefortheotherbrowserIanguages,andsometoolsautomaticallycreatepagesusingJavaScript.However,ifyou'
realreadyfluentinVisualBasicorTcl/Tk,you'
bemoreproductiveusingthosescriptingIanguagesratherthanlearninganewone.(You'
haveyourhandsfulldealingwiththeWebissuesalready.)
4.Java
IfascriptingIanguagecansolve80percentoftheclient-sideprogrammingproblems,whatabouttheother20percen—thereallyhardstuff?
”ThemostpopularsolutiontodayisJava.NotonlyisitapowerfulprogrammingIanguagebuilttobesecure,cross-platform,andinternational,butJavaisbeingcontinuallyextendedtoprovideIanguagefeaturesandlibrariesthatelegantlyhandleproblemsthataredifficultintraditionalprogrammingIanguages,suchasmultithreading,databaseaccess,networkprogramming,anddistributedcomputing.Javaallowsclient-sideprogrammingviatheapplet.
Anappletisamini-programthatwillrunonlyunderaWebbrowser.TheappletisdownloadedautomaticallyaspartofaWebpage(justas,forexample,agraphicisautomaticallydownloaded).Whentheappletisactivateditexecutesaprogram.Thisispartofitsbeauty—itprovidesyouwithawaytoautomaticallydistributetheclientsoftwarefromtheserveratthetimetheuserneedstheclientsoftware,andnosooner.Theusergetsthelatestversionoftheclientsoftwarewithoutfailandwithoutdifficultreinstallation.BecauseofthewayJavaisdesigned,theprogrammerneedstocreateonlyasingleprogram,andthatprogramautomaticallyworkswithallcomputersthathavebrowserswithbuilt-inJavainterpreters.(Thissafelyincludesthevastmajorityofmachines.)SinceJavaisafull-fledgedprogrammingIanguage,youcandoasmuchworkaspossibleontheclientbeforeandaftermakingrequestsoftheserver.Forexample,youwon'
needtosendarequestformacrosstheInternettodiscoverthatyovegottenadateorsomeotherparameterwrong,andyourclientcomputercanquicklydotheworkofplottingdatainsteadofwaitingfortheservertomakeaplotandshipagraphicimagebacktoyou.Notonlydoyougettheimmediatewinofspeedandresponsiveness,butthegeneralnetworktrafficandloadonserverscanbereduced,preventingtheentireInternetfromslowingdown.
OneadvantageaJavaapplethasoverascriptedprogramisthatit'
incompiledform,sothesourcecodeisn'
availabletotheclient.Ontheother
hand,aJavaappletcanbedecompiledwithouttoomuchtrouble,buthidingyourcodeisoftennotanimportantissue.Twootherfactorscanbeimportant.Asyouwillseelaterinthisbook,acompiledJavaappletcancomprisemanymodulesandtakemultipleserverhits”(accesses)todownload.(InJava1.1andhigherthisisminimizedbyJavaarchives,calledJARfiles,thatallowalltherequiredmodulestobepackagedtogetherandcompressedforasingledownload.)AscriptedprogramwilljustbeintegratedintotheWebpageaspartofitstext(andwillgenerallybesmallerandreduceserverhits).Thiscouldbeimportanttoth
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- JavaandtheInternet 电子商务 毕业论文 外文 翻译 范文
![提示](https://static.bdocx.com/images/bang_tan.gif)