JAVA外文文献+翻译Word文档下载推荐.docx

上传人:b****2 文档编号:5190933 上传时间:2023-05-04 格式:DOCX 页数:16 大小:31.58KB
下载 相关 举报
JAVA外文文献+翻译Word文档下载推荐.docx_第1页
第1页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第2页
第2页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第3页
第3页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第4页
第4页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第5页
第5页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第6页
第6页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第7页
第7页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第8页
第8页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第9页
第9页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第10页
第10页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第11页
第11页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第12页
第12页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第13页
第13页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第14页
第14页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第15页
第15页 / 共16页
JAVA外文文献+翻译Word文档下载推荐.docx_第16页
第16页 / 共16页
亲,该文档总共16页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

JAVA外文文献+翻译Word文档下载推荐.docx

《JAVA外文文献+翻译Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《JAVA外文文献+翻译Word文档下载推荐.docx(16页珍藏版)》请在冰点文库上搜索。

JAVA外文文献+翻译Word文档下载推荐.docx

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,anysortofdynamicgraphingisnearlyimpossibletoperformwithconsistencybecauseaGIFbecreatedandmovedfromtheservertotheclientforeachversionofthegraph、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-inthatinterpretsthatlanguageisautomaticallyactivatedwhiletheHTMLpageisbeingdisplayed、Scriptinglanguagestendtobereasonablyeasytounderstandand,becausetheyaresimplytextthatispartofanHTMLpage,theyloadveryquicklyaspartofthesingleserverhitrequiredtoprocurethatpage、Thetrade-offisthatyourcodeisexposedforeveryonetosee(andsteal)、Generally,however,youaren’tdoingamazinglysophisticatedthingswithscriptinglanguagessothisisnottoomuchofahardship、

ThispointsoutthatthescriptinglanguagesusedinsideWebbrowsersarereallyintendedtosolvespecifictypesofproblems,primarilythecreationofricherandmoreinteractivegraphicaluserinterfaces(GUIs)、However,ascriptinglanguagemightsolve80percentoftheproblemsencounteredinclient-sideprogramming、Yourproblemsmightverywellfitcompletelywithinthat80percent,andsincescriptinglanguagescanalloweasierandfasterdevelopment,youshouldprobablyconsiderascriptinglanguagebeforelookingatamoreinvolvedsolutionsuchasJavaorActiveXprogramming、

ThemostcommonlydiscussedbrowserscriptinglanguagesareJavaScript(whichhasnothingtodowithJava;

it’snamedthatwayjusttograbsomeofJava’smarketingmomentum),VBScript(whichlookslikeVisualBasic),andTcl/Tk,whichcomesfromthepopularcross-platformGUI-buildinglanguage、Thereareothersoutthere,andnodoubtmoreindevelopment、

JavaScriptisprobablythemostcommonlysupported、ItcomesbuiltintobothNetscapeNavigatorandtheMicrosoftInternetExplorer(IE)、Inaddition,thereareprobablymoreJavaScriptbooksavailablethantherearefortheotherbrowserlanguages,andsometoolsautomaticallycreatepagesusingJavaScript、However,ifyou’realreadyfluentinVisualBasicorTcl/Tk,you’llbemoreproductiveusingthosescriptinglanguagesratherthanlearninganewone、(You’llhaveyourhandsfulldealingwiththeWebissuesalready、)

4、Java

Ifascriptinglanguagecansolve80percentoftheclient-sideprogrammingproblems,whatabouttheother20percent—the“reallyhardstuff?

”ThemostpopularsolutiontodayisJava、Notonlyisitapowerfulprogramminglanguagebuilttobesecure,cross-platform,andinternational,butJavaisbeingcontinuallyextendedtoprovidelanguagefeaturesandlibrariesthatelegantlyhandleproblemsthataredifficultintraditionalprogramminglanguages,suchasmultithreading,databaseaccess,networkprogramming,anddistributedcomputing、Javaallowsclient-sideprogrammingviatheapplet、

Anappletisamini-programthatwillrunonlyunderaWebbrowser、TheappletisdownloadedautomaticallyaspartofaWebpage(justas,forexample,agraphicisautomaticallydownloaded)、Whentheappletisactivateditexecutesaprogram、Thisispartofitsbeauty—itprovidesyouwithawaytoautomaticallydistributetheclientsoftwarefromtheserveratthetimetheuserneedstheclientsoftware,andnosooner、Theusergetsthelatestversionoftheclientsoftwarewithoutfailandwithoutdifficultreinstallation、BecauseofthewayJavaisdesigned,theprogrammerneedstocreateonlyasingleprogram,andthatprogramautomaticallyworkswithallcomputersthathavebrowserswithbuilt-inJavainterpreters、(Thissafelyincludesthevastmajorityofmachines、)SinceJavaisafull-fledgedprogramminglanguage,youcandoasmuchworkaspossibleontheclientbeforeandaftermakingrequestsoftheserver、Forexample,youwon’tneedtosendarequestformacrosstheInternettodiscoverthatyou’vegottenadateorsomeotherparameterwrong,andyourclientcomputercanquicklydotheworkofplottingdatainsteadofwaitingfortheservertomakeaplotandshipagraphicimagebacktoyou、Notonlydoyougettheimmediatewinofspeedandresponsiveness,butthegeneralnetworktrafficandloadonserverscanbereduced,preventingtheentireInternetfromslowingdown、

OneadvantageaJavaapplethasoverascriptedprogramisthatit’sincompiledform,sothesourcecodeisn’tavailabletotheclient、Ontheotherhand,aJavaappletcanbedecompiledwithouttoomuchtrouble,buthidingyourcodeisoftennotanimportantissue、Twootherfactorscanbeimportant、Asyouwillseelaterinthisbook,acompiledJavaappletcancomprisemanymodulesandtakemultipleserver“hits”(accesses)todownload、(InJava1、1andhigherthisisminimizedbyJavaarchives,calledJARfiles,thatallowalltherequiredmodulestobepackagedtogetherandcompressedforasingledownload、)AscriptedprogramwilljustbeintegratedintotheWebpageaspartofitstext(andwillgenerallybesmallerandreduceserverhits)、ThiscouldbeimportanttotheresponsivenessofyourWebsite、Anotherfactoristheall-importantlearningcurve、Regardlessofwhatyou’veheard,Javaisnotatriviallanguagetolearn、Ifyou’reaVisualBasicprogrammer,movingtoVBScriptwillbeyourfa

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

当前位置:首页 > 初中教育 > 语文

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2