JAVA外文文献翻译.doc

上传人:b****1 文档编号:230987 上传时间:2022-10-07 格式:DOC 页数:18 大小:68KB
下载 相关 举报
JAVA外文文献翻译.doc_第1页
第1页 / 共18页
JAVA外文文献翻译.doc_第2页
第2页 / 共18页
JAVA外文文献翻译.doc_第3页
第3页 / 共18页
JAVA外文文献翻译.doc_第4页
第4页 / 共18页
JAVA外文文献翻译.doc_第5页
第5页 / 共18页
点击查看更多>>
下载资源
资源描述

JAVA外文文献翻译.doc

《JAVA外文文献翻译.doc》由会员分享,可在线阅读,更多相关《JAVA外文文献翻译.doc(18页珍藏版)》请在冰豆网上搜索。

JAVA外文文献翻译.doc

燕山大学本科生毕业设计(翻译)

JavaandtheInternet

IfJavais,infact,yetanothercomputerprogramminglanguage,youmayquestionwhyitissoimportantandwhyitisbeingpromotedasarevolutionarystepincomputerprogramming.Theanswerisn’timmediatelyobviousifyou’recomingfromatraditionalprogrammingperspective.AlthoughJavaisveryusefulforsolvingtraditionalstand-aloneprogrammingproblems,itisalsoimportantbecauseitwillsolveprogrammingproblemsontheWorldWideWeb.

1.Client-sideprogramming

TheWeb’sinitialserver-browserdesignprovidedforinteractivecontent,buttheinteractivitywascompletelyprovidedbytheserver.Theserverproducedstaticpagesfortheclientbrowser,whichwouldsimplyinterpretanddisplaythem.BasicHTMLcontainssimplemechanismsfordatagathering:

text-entryboxes,checkboxes,radioboxes,listsanddrop-downlists,aswellasabuttonthatcanonlybeprogrammedtoresetthedataontheformor“submit”thedataontheformbacktotheserver.ThissubmissionpassesthroughtheCommonGatewayInterface(CGI)providedonallWebservers.ThetextwithinthesubmissiontellsCGIwhattodowithit.Themostcommonactionistorunaprogramlocatedontheserverinadirectorythat’stypicallycalled“cgi-bin.”(IfyouwatchtheaddresswindowatthetopofyourbrowserwhenyoupushabuttononaWebpage,youcansometimessee“cgi-bin”withinallthegobbledygookthere.)Theseprogramscanbewritteninmostlanguages.Perlisacommonchoicebecauseitisdesignedfortextmanipulationandisinterpreted,soitcanbeinstalledonanyserverregardlessofprocessororoperatingsystem.

ManypowerfulWebsitestodayarebuiltstrictlyonCGI,andyoucaninfactdonearlyanythingwithit.However,WebsitesbuiltonCGIprogramscanrapidlybecomeoverlycomplicatedtomaintain,andthereisalsotheproblemofresponsetime.TheresponseofaCGIprogramdependsonhowmuchdatamustbesent,aswellastheloadonboththeserverandtheInternet.(Ontopofthis,startingaCGIprogramtendstobeslow.)TheinitialdesignersoftheWebdidnotforeseehowrapidlythisbandwidthwouldbeexhaustedforthekindsofapplicationspeopledeveloped.Forexample,anysortofdynamicgraphingisnearlyimpossibletoperformwithconsistencybecauseaGIFfilemustbecreatedandmovedfromtheservertotheclientforeachversionofthegraph.Andyou’venodoubthaddirectexperiencewithsomethingassimpleasvalidatingthedataonaninputform.Youpressthesubmitbuttononapage;thedataisshippedbacktotheserver;theserverstartsaCGIprogramthatdiscoversanerror,formatsanHTMLpageinformingyouoftheerror,andthensendsthepagebacktoyou;youmustthenbackupapageandtryagain.Notonlyisthisslow,it’sinelegant.

Thesolutionisclient-sideprogramming.MostmachinesthatrunWebbrowsersarepowerfulenginescapableofdoingvastwork,andwiththeoriginalstaticHTMLapproachtheyaresittingthere,justidlywaitingfortheservertodishupthenextpage.Client-sideprogrammingmeansthattheWebbrowserisharnessedtodowhateverworkitcan,andtheresultfortheuserisamuchspeedierandmoreinteractiveexperienceatyourWebsite.

Theproblemwithdiscussionsofclient-sideprogrammingisthattheyaren’tverydifferentfromdiscussionsofprogrammingingeneral.Theparametersarealmostthesame,buttheplatformisdifferent:

aWebbrowserislikealimitedoperatingsystem.Intheend,youmuststillprogram,andthisaccountsforthedizzyingarrayofproblemsandsolutionsproducedbyclient-sideprogramming.Therestofthissectionprovidesanoverviewoftheissuesandapproachesinclient-sideprogramming.

2.Plug-ins

Oneofthemostsignificantstepsforwardinclient-sideprogrammingisthedevelopmentoftheplug-in.Thisisawayforaprogrammertoaddnewfunctionalitytothebrowserbydownloadingapieceofcodethatplugsitselfintotheappropriatespotinthebrowser.Ittellsthebrowser“fromnowonyoucanperformthisnewactivity.”(Youneedtodownloadtheplug-inonlyonce.)Somefastandpowerfulbehaviorisaddedtobrowsersviaplug-ins,butwritingaplug-inisnotatrivialtask,andisn’tsomethingyou’dwanttodoaspartoftheprocessofbuildingaparticularsite.Thevalueoftheplug-inforclient-sideprogrammingisthatitallowsanexpertprogrammertodevelopanewlanguageandaddthatlanguagetoabrowserwithoutthepermissionofthebrowsermanufacturer.Thus,plug-insprovidea“backdoor”thatallowsthecreationofnewclient-sideprogramminglanguages(althoughnotalllanguagesareimplementedasplug-ins).

3.Scriptinglanguages

Plug-insresultedinanexplosionofscriptinglanguages.Withascriptinglanguageyouembedthesourcecodeforyourclient-sideprogramdirectlyintotheHTMLpage,andtheplug-inthatinterpretsthatlangua

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

当前位置:首页 > 考试认证 > IT认证

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

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