毕业设计(论文)毕业设计(论文)外文翻译
题目:题目:基于
Java的网上商城
系统 院(系):专班学学业:级:生:号:
指导教师:指导教师:
2012年03月09日
EnglishOnlyJavaandtheInternet
IfJavais,infact,yetanothercomputerprogramminglanguage,youmayquestionwhyitissoimportantandwhyitisbein
gpromotedasarevolutionarystepincomputerprogramming.Theanswerisn’timmediatelyobviousifyou’recomingfromatraditionalprogrammingperspective.AlthoughJavaisveryusefulforsolvingtraditionalstandaloneprogrammingproblems,itisalsoimportantbecauseitwillsolveprogrammingproblemsontheWorldWideWeb.
WhatistheWeb?
TheWebcanseemabitofamysteryatfirst,withallthistalkof“surfing,”“presence,”and“homepages.”It’shelpfultostepbackandseewhatitreallyis,buttodothisyoumustunderstandclient/serversystems,anotheraspectofcomputingthat’sfullofconfusingissues.
1.Client/Servercomputing
Theprimaryideaofaclient/serversyste
misthatyouhaveacentralrepositoryofinformation—somekindofdata,ofteninadatabase—thatyouwanttodistributeondemandtosomesetofpeopleormachines.Akeytotheclient/serverconceptisthattherepositoryofinformationiscentrallylocatedsothatitcanbechangedandsothatthosechangeswillpropagateouttotheinformationconsumers.Takentogether,theinformationrepository,thesoftwarethatdistributestheinformation,andthemachine(s)wheretheinformationandsoftwareresideiscalledtheserver.Thesoftwarethatresidesontheremotemachine,communicateswiththeserver,fetchesthe
information,processesit,andthendisplaysitontheremotemachineiscalledtheclient.Thebasicconceptofclient/servercomputing,then,isnotsocomplicated.Theproblemsarisebecauseyouhaveasingleservertryingtoservemanyclientsatonce.Generally,adatabasemanagementsystemisinvolved,sothedesigner“balances”thelayoutofdataintotablesforoptimaluse.Inaddition,systemsoftenallowaclienttoinsertnewinformationint
oaserver.Thismeansyoumustensurethatoneclient’snewdatadoesn’twalkoveranotherclient’snewdata,orthatdataisn’tlostintheprocessofaddingittothedatabase(thisiscalledtransactionprocessing).Asclientsoftwarechanges,itmustbebuilt,debugged,andinstalledontheclientmachines,whichturnsouttobemorecomplicatedandexpensivethanyoumightthink.It’sespeciallyproblematictosupportmultipletypesofcomputersandoperatingsystems.Finally,there’stheall-importantperformanceissue:Youmighthavehundredsofclientsmakingrequestsofyourserveratanyonetime,soanysmalldelayiscrucial.Tominimizelatency,programmersworkhardtooffloadprocessingtasks,oftentotheclientmachine,butsometimestoothermachinesattheserversite,usingso-calledmiddleware.(Middlewareisalsousedtoimprovemaintainability.)Thesimpleideaofdistributinginformationhassomanylayersofcomplexitythatthewholeproblemcanseemhopelesslyenigmatic.Andyetit’scrucial:Client/servercomputingaccountsforroughlyhalfofallprogrammingactivities.It’sresponsibleforeverythingfromtakingordersandcredit-cardtransactionstothedistributionofanykindofdata—stockmarket,scientific,government,younameit.Whatwe’vecomeupwithinthepastisindividualsolutionstoindividualproblems,inventinganewsolutioneachtime.These