电子商务毕业论文外文翻译范文《JavaandtheInternet》.docx

上传人:b****5 文档编号:6296654 上传时间:2023-01-05 格式:DOCX 页数:12 大小:31.38KB
下载 相关 举报
电子商务毕业论文外文翻译范文《JavaandtheInternet》.docx_第1页
第1页 / 共12页
电子商务毕业论文外文翻译范文《JavaandtheInternet》.docx_第2页
第2页 / 共12页
电子商务毕业论文外文翻译范文《JavaandtheInternet》.docx_第3页
第3页 / 共12页
电子商务毕业论文外文翻译范文《JavaandtheInternet》.docx_第4页
第4页 / 共12页
电子商务毕业论文外文翻译范文《JavaandtheInternet》.docx_第5页
第5页 / 共12页
点击查看更多>>
下载资源
资源描述

电子商务毕业论文外文翻译范文《JavaandtheInternet》.docx

《电子商务毕业论文外文翻译范文《JavaandtheInternet》.docx》由会员分享,可在线阅读,更多相关《电子商务毕业论文外文翻译范文《JavaandtheInternet》.docx(12页珍藏版)》请在冰豆网上搜索。

电子商务毕业论文外文翻译范文《JavaandtheInternet》.docx

电子商务毕业论文外文翻译范文《JavaandtheInternet》

外文文献:

JavaandtheInternet

IfJavais,infact,yetanothercomputerprogrammingIanguage,youmayquestionwhyitissoimportantandwhyitisbeingpromotedasarevolutionarystepincomputerprogramming.Theanswerisn'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

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 党团工作 > 入党转正申请

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1