外文翻译--J2EE和JAVA领域.doc
英文原文Java2StandardEditionandtheWorldofJava1IntroductionThecomputerrevolutionofthe1970sincreasedthedemandforsophisticatedcomputersoftwaretotakeadvantageoftheever-increasingcapacityofcomputerstoprocessdata.TheCprogramminglanguagebecamethelinchpinthatenabledprogrammerstobuildsoftwarethatwasjustasrobustasthecomputeritranon.Asthe1980sapproached,programmerswerewitnessinganotherspurtintheevolutionofprogramminglanguage.ComputertechnologyadvancedbeyondthecapabilitiesoftheCprogramminglanguage.Theproblemwasntnew.Itoccurredpreviouslyandcausedthedemiseofgenerationsofprogramminglanguages.Theproblemwasthatprogramswerebecomingtoocomplicatedtodesign,write,andmanagetokeepupwiththecapabilitiesofcomputers.ItwasaroundthistimethatadesignconceptbasedonSimula67andSmalltalk(fromthelate1960s)movedprogrammingtothenextevolutionarystep.Thiswastheperiodwhenobject-orientedprogramming(OOP),andwithitanewprogramminglanguagecalledC+,tookprogrammersbystorm.In1979,BjarneStroustrupofBellLaboratoriesinNewJerseyenhancedtheCprogramminglanguagetoincludeobject-orientedfeatures.HecalledthelanguageC+.(The+istheincrementaloperatorintheCprogramminglanguage.)C+istrulyanenhancementoftheCprogramminglanguage,anditbeganasapreprocessorlanguagethatwastranslatedintoCsyntaxbeforetheprogramwasprocessedbythecompiler.Stroustrupbuiltontheconceptofaclass(takenfromSimula67andSmalltalk),fromwhichinstancesofobjectsarecreated.Aclasscontainsdatamembersandmemberfunctionsthatdefineanobjectsdataandfunctionality.Healsointroducedtheconceptofinheritance,whichenabledaclasstoinheritsomeoralldatamembersandmemberfunctionsfromoneormoreotherclassesallofwhichcomplementstheconceptsofobject-orientedprogramming.2EnterJavaJustasC+wasbecomingthelanguageofchoiceforbuildingindustrial-strengthapplications,anothergrowthspurtintheevolutionofprogramminglanguagewasbudding,fertilizedbythelatestdisruptivetechnologytheWorldWideWeb.TheInternethadbeenawell-keptsecretfordecadesbeforetheNationalScienceFoundation(whooversawtheInternet)removedbarriersthatpreventedcommercialization.Until1991whenitwasopenedtocommerce,theInternetwasthealmostexclusivedomainofgovernmentagenciesandtheacademiccommunity.Oncethebarriertocommercializationwaslifted,theWorldWideWeboneofseveralservicesofferedontheInternetbecameavirtualcommunitycenterwherevisitorscouldgetfreeinformationaboutpracticallyanythingandbrowsethroughthousandsofvirtualstores.BrowserspowertheWorldWideWeb.AbrowsertranslatesASCIItextfileswritteninHTMLintoaninteractivedisplaythatcanbeinterpretedonanymachine.AslongasthebrowseriscompatiblewiththecorrectversionofHTMLandHTTPimplementation,anycomputerrunningthebrowsercanusethesameHTMLdocumentwithouthavingtomodifyitforaparticulartypeofcomputer,whichwassomethingunheardofatthetime.ProgramswritteninCorC+aremachinedependentandcannotrunonadifferentmachineunlesstheprogramisrecompiled.ThesuccessoftheInternetgaverenewedfocustodevelopingamachine-independentprogramminglanguage.AndthesameyeartheInternetwascommercialized,fivetechnologistsatSunMicrosystemssetouttodojustthat.JamesGosling,PatrickNaughton,ChrisWarth,EdFrank,andMikeSheridanspent18monthsdevelopingtheprogramminglanguagetheycalledOak,whichwasrenamedJavawhenthisnewlanguagemadeitsdebutin1995.Javawentthroughnumerousiterationsbetween1991and1995,duringwhichtimemanyothertechnologistsatSunmadesubstantialcontributionstothelanguage.TheseincludedBillJoy,ArthurvanHoff,JonathanPayne,FrankYelin,andTimLindholm.AlthoughJavaiscloselyassociatedwiththeInternet,itwasdevelopedasalanguageforprogrammingsoftwarethatcouldbeembeddedintoelectronicdevicesregardlessofthetypeofCPUusedbythedevice.ThisisknownastheEmbeddedJavaplatformandisincontinuoususetodayforclosedsystems.TheJavateamfromSunsucceededincreatingaportableprogramminglanguage,somethingthathadeludedprogrammerssincecomputerswerefirstprogrammed.Theirsuccess,however,wasfarbeyondtheirwildestdreams.ThesameconceptusedtomakeJavaprogramsportabletoelectronicdevicesalsocouldbeusedtomakeJavaprogramsrunoncomputersrunningMicrosoftWindows,UNIX,andMacintosh.Timingwasperfect.TheInternet/intranethadwhettedcorporateAmericasappetiteforcost-effective,portableprogramsthatcouldreplacemission-criticalapplicationswithinthecorporation.AndJavahadprovenitselfasaprogramminglanguageusedtosuccessfullydevelopmachine-independentapplications.3JavaVirtualMachineJavavirtualmachine(JVM)ismethodforthespecificationofthecomputerequipment.Theavailabilityofdifferentways(softwareorhardware)canbeimplemented.Compilingthevirtualmachineinstructionset,thecompilerofthemicroprocessorinstructionsetisverysimilar.TheJavavirtualmachineincludesasetofbytecodeinstructionset,asetofregisters,astack,agarbage-collectedheapandastoragedomain.JavaVirtualMachine(JVM)isanimaginarycomputerthatcanrunJavacode.AccordingtotheJVMspecificationdescribestheinterpreterportedtoaparticularcomputer,wecanguaranteethecompiledJavacodetorunonthesystem.TheJavaVirtualMachineisanimaginarymachineontheactualcomputersoftwaresimulation.Javavirtualmachinehardwareofhisownimagining,suchasprocessor,stack,registers,etc.,butalsohasacorrespondinginstruction.4BacktotheFuture:J2EEJ2EEisacompletelydifferentfromthetraditionalapplicationdevelopmenttechnologyarchitecture,containsanumberofcomponents,mainlytosimplifyandstandardizetheapplicationsystemdevelopmentanddeployment,andtoimproveportability,securityandre-usevalue.J2EECoreisasetoftechnicalspecificationsandguidelines,whichincludevarioustypesofcomponents,services,structureandtechnicallevelhavecommonstandardsandspecifications,thevariousfollowtheJ2EEarchitecturebetweendifferentplatforms,thereisagoodcompatibility,solveenterpriseback-endinformationproductsnotcompatiblewitheachother,leadingtothedifficultdilemmabetweentheinternalorexternal.IntheJ2EEarchitecture,developerscanfollowthenormativebasis,ledtothedevelopmentofenterpriseapplications;differentJ2EEsuppliers,withsupportdifferentversionsofJ2EEstandardselaborated,inordertoensurecompatibilitybetweenthedifferentJ2EEplatformsandproducts.Inotherwords,theapplicationofplant-basedJ2EEarchitecture,canbasicallybedeployedindifferentapplicationservers,nooronlyneedasmallamountofcodechanges,whichcansignificantlyimprovetheportabilityoftheapplicationsystem(Portability).TheJ2EEmaincollaborativeindustrycommontechnicalspecificationsdrawnupbytheSun(SUN)withIBMandothermanufacturers,orientedtobusiness-to-businessoperationsbetweentheJavadevelopmentenvironment.J2EEarchitecturedefinesthedifferenttypesofcomponents,suchasWebComponent,EJBComponentandallkindsofcomponentscanbereused(reuse),sothathasbeendevelopedcomponents,orcomponentsderivedthroughthepurchaseonthemarket,canfurtherassembledintothetypeofsystem.Fordevelopersonlyneedtofocusonthebusinesslogicofthesystemarchitecturedesignforavarietyofapplications,Asforthewritingoftheunderlyingcumbersomeprocedures,canbeusedwithdifferentdevelopmentplatformtoenablethedevelopmentanddeploymentofapplicationsystemthatincreasestheefficiency.CorespecificationforJ2EEEnterpriseisJavaBeans(EJBs).EJBaccordingtodifferentcharacteristics,dividedintothreetypes,namelySessionBean,EntityBean,MessageDrivenBean.SessionBeanandEntitybeansregardedastheancestoroftheEJBandbothEJBspecificationsalreadyexistintheEJB1.xversionandMessageDrivenBeaninEJB2.0specifications.TheindustryprogrammersorwebdesignersmakemoreuseoftheconvenienceofJSP/Servlet,whichdevelopedabovetheJ2EEserverapplication,ortheintegrationofvariousresourceswithinthecompany.5TheadvantagesofJ2EEJ2EEbuildscalability,flexibility,andeaseofmaintenanceofbusinesssystemsprovidesagoodmechanism:1.PreservetheexistingITassets:Companiesmustadapttothenewbusinessneeds,theuseofexistingenterpriseinformationsystemsinvestments,ratherthanre-enactacomprehensiveprogrambecomesveryimportant.Thus,anincremental(ratherthanaradicalnegated)createserver-sideplatformontopoftheexistingsystemmechanismiswantedcompany.J2EEarchitecturecantakefulladvantageoftheusersoriginalinvestment,suchasusedbysomecompaniesBEATuxedo,IBMCICS,IBMEncina,InpriseVisiBrokerandNetscapeApplicationServer.ThiswasmadepossiblebecausetheJ2EEhasbroadindustrysupportandsomeimportantareasofenterprisecomputingtheparticipationofsuppliers.EachsupplierexistingcustomersupgradepathwithoutabandoningexistinginvestmentstoenterthefieldofportableJ2EE.BasedonJ2EEplatformproductsalmostrunonanyoperatingsystemandhardwareconfigurationcanalsobereservedforusebytheoperatingsystemandhardware.2.Efficientdevelopment:J2EEallowssomegeneric,verycumbersometaskservertotheintermediatesuppliertocomplete.Sothatdeveloperscanfocusonhowtocreatebusinesslogic,toshortenthedevelopmenttime.Advancedmiddlewarevendorsprovidethesecomplexmiddlewareservices:statemanagementservice-enablesdeveloperstowritelesscode,donotcareabouthowtomanagethestate,thiscanbedonefasterprogramdevelopment.persistentmanagementservice-sothatdevelopersdonotneedtoencodethedataaccesslogicwillbeabletowriteapplications,cangeneratemorecompact,withadatabase-independentapplications,suchapplicationseasiertodevelopandmaintain.distributedshareddataobjectcacheservice-allowsdeveloperstothepreparationofhigh-performancesystem,whichgreatlyimprovethescalabilityoftheoveralldeployment.3.Supportheterogeneousenvironments:J2EEdeploymentcanbeabletoinheterogeneousenvironmentstodevelopportableprograms.J2EE-basedapplicationdoesnotrelyonanyparticularoperatingsystem,middlewareandhardware.Therefore,therationaldesignofJ2EE-basedprogramtodeveloponcedeployedtoavarietyofplatforms.Thisinatypicalheterogeneousenterprisecomputingenvironmentiscrucial.TheJ2EEstandardalsoallowscustomerstoorderJ2EE-compliantthird-partyoff-the-shelfcomponents,deploythemtoaheterogeneousenvironment,savingthecostoftheentireprogramdevelopedbytheirown.4.Scalability:Thecompanieswillhavetochooseaserver-sideplatformthatshouldbeabletoprovideexcellentscalabilitytomeetintheirsystemonalargenumberofnewcustomersinthecommercialoperation.J2EEplatform-basedapplicationscanbedeployedonavarietyofoperatingsystems.Forexample,canbedeployedtohigh-endUNIXandmainframesystems,thissystemsupports64-256processors,whichisbeyondthereachofNTserver)theJ2EEfieldofsupplierstoprovideawiderrangeofloadbalancingstrategy.Toeliminatebottlenecksinthesystem,allowingmultipleserversintegrateddeployment.Suchadeploymentofuptothousandsofprocessors,toachieveahighlyscalablesystemtomeetthefutureneedsofbusinessapplications.5.StableAvailability:Aserver-sideplatformmustbeabletooperatearoundtheclocktomeettheneedsofourcustomers,partners.BecausetheInternetisglobal,ubiquitous,evenatnightasplanneddowntimemayalsocauseseriousdamage.Ifunplanneddowntime,itwillhavedisastrousconsequences.J2EEdeploymenttoareliableoperatingenvironment,theysupportthelong-termavailability.SomeJ2EEdeploymentintheWindowsenvironment,thecustomercanalsochooserobustnessbetteroperatingsystemssuchasSunSolaris,IBMOS/390.Therobustnessofthebestoperatingsystemupto99.999%availability,oronlyfiveminutesdowntime.Thisistheidealchoiceforstrongreal-timebusinesssystems.