java面向特定群体的健康管理平台设计与实现毕业设计英文文献翻译.docx
《java面向特定群体的健康管理平台设计与实现毕业设计英文文献翻译.docx》由会员分享,可在线阅读,更多相关《java面向特定群体的健康管理平台设计与实现毕业设计英文文献翻译.docx(17页珍藏版)》请在冰豆网上搜索。
java面向特定群体的健康管理平台设计与实现毕业设计英文文献翻译
毕业设计说明书
英文文献及中文翻译
班级:
学号:
姓名:
学院:
专业:
指导教师:
2014年6月
ExploreOnJAVA,JSPTechnologyAndThreeFrameworks
Duke,theJavamascotJamesGosling,MikeSheridan,andPatrickNaughtoninitiatedtheJavalanguageprojectinJune1991.Javawasoriginallydesignedforinteractivetelevision,butitwastooadvancedforthedigitalcabletelevisionindustryatthetime.ThelanguagewasinitiallycalledOakafteranoaktreethatstoodoutsideGosling'soffice;itwentbythenameGreenlater,andwaslaterrenamedJava,fromalistofrandomwords.GoslingaimedtoimplementavirtualmachineandalanguagethathadafamiliarC/C++styleofnotation.
SunMicrosystemsreleasedthefirstpublicimplementationasJava1.0in1995.Itpromised"WriteOnce,RunAnywhere",providingno-costrun-timesonpopularplatforms.Fairlysecureandfeaturingconfigurablesecurity,itallowednetwork-andfile-accessrestrictions.MajorwebbrowserssoonincorporatedtheabilitytorunJavaappletswithinwebpages,andJavaquicklybecamepopular.WiththeadventofJava2,newversionshadmultipleconfigurationsbuiltfordifferenttypesofplatforms.Forexample,J2EEtargetedenterpriseapplicationsandthegreatlystripped-downversionJ2MEformobileapplications,J2SEdesignatedtheStandardEdition.In2006,formarketingpurposes,SunrenamednewJ2versionsasJavaEE,JavaME,andJavaSE,respectively.
In1997,SunMicrosystemsapproachedtheISO/IECJTC1standardsbodyandlatertheEcmaInternationaltoformalizeJava,butitsoonwithdrewfromtheprocess.Javaremainsadefactostandard,controlledthroughtheJavaCommunityProcess.Atonetime,SunmademostofitsJavaimplementationsavailablewithoutcharge,despitetheirproprietarysoftwarestatus.SungeneratedrevenuefromJavathroughthesellingoflicensesforspecializedproductssuchastheJavaEnterpriseSystem.SundistinguishesbetweenitsSoftwareDevelopmentKit(SDK)andRuntimeEnvironment(JRE)(asubsetoftheSDK);theprimarydistinctioninvolvestheJRE'slackofthecompiler,utilityprograms,andheaderfiles.OnNovember13,2006,SunreleasedmuchofJavaasopensourcesoftwareunderthetermsoftheGNUGeneralPublicLicense(GPL).OnMay8,2007,Sunfinishedtheprocess,makingallofJava'scorecodeavailableunderfreesoftware/open-sourcedistributionterms,asidefromasmallportionofcodetowhichSundidnotholdthecopyright.Sun'svice-presidentRichGreenhassaidthatSun'sidealrolewithregardstoJavaisasan"evangelist."FollowingOracleCorporation'sacquisitionofSunMicrosystemsin2009–2010,Oraclehasdescribeditselfasthe"stewardofJavatechnologywitharelentlesscommitmenttofosteringacommunityofparticipationandtransparency".
PrinciplesTherewerefiveprimarygoalsinthecreationoftheJavalanguage:
1.Itshouldbe"simple,objectoriented,andfamiliar"2.Itshouldbe"robustandsecure".
3.Itshouldbe"architectureneutralandportable"4.Itshouldexecutewith"highperformance"5.Itshouldbe"interpreted,threaded,anddynamic".
JavaPlatformMainarticles:
Java(softwareplatform)andJavaVirtualMachineOnecharacteristicofJavaisportability,whichmeansthatcomputerprogramswrittenintheJavalanguagemustrunsimilarlyonanysupportedhardware/operating-systemplatform.ThisisachievedbycompilingtheJavalanguagecodetoanintermediaterepresentationcalledJavabytecode,insteadofdirectlytoplatform-specificmachinecode.Javabytecodeinstructionsareanalogoustomachinecode,butareintendedtobeinterpretedbyavirtualmachine(VM)writtenspecificallyforthehosthardware.End-userscommonlyuseaJavaRuntimeEnvironment(JRE)installedontheirownmachineforstandaloneJavaapplications,orinaWebbrowserforJavaapplets.Standardizedlibrariesprovideagenericwaytoaccesshost-specificfeaturessuchasgraphics,threading,andnetworking.
Amajorbenefitofusingbytecodeisporting.However,theoverheadofinterpretationmeansthatinterpretedprogramsalmostalwaysrunmoreslowlythanprogramscompiledtonativeexecutableswould.Just-in-Timecompilerswereintroducedfromanearlystagethatcompilebytecodestomachinecodeduringruntime.ImplementationsSunMicrosystemsofficiallylicensestheJavaStandardEditionplatformforLinux,MacOSX,andSolaris.AlthoughinthepastSunhaslicensedJavatoMicrosoft,thelicensehasexpiredandhasnotbeenrenewed.Throughanetworkofthird-partyvendorsandlicensees,alternativeJavaenvironmentsareavailablefortheseandotherplatforms.
Sun'strademarklicenseforusageoftheJavabrandinsiststhatallimplementationsbe"compatible".ThisresultedinalegaldisputewithMicrosoftafterSunclaimedthattheMicrosoftimplementationdidnotsupportRMIorJNIandhadaddedplatform-specificfeaturesoftheirown.Sunsuedin1997,andin2001wonasettlementofUS$20million,aswellasacourtorderenforcingthetermsofthelicensefromSun.Asaresult,MicrosoftnolongershipsJavawithWindows,andinrecentversionsofWindows,InternetExplorercannotsupportJavaappletswithoutathird-partyplugin.Sun,andothers,havemadeavailablefreeJavarun-timesystemsforthoseandotherversionsofWindows.Platform-independentJavaisessentialtotheJavaEEstrategy,andanevenmorerigorousvalidationisrequiredtocertifyanimplementation.Thisenvironmentenablesportableserver-sideapplications,suchasWebservices,JavaServlets,andEnterpriseJavaBeans,aswellaswithembeddedsystemsbasedonOSGi,usingEmbeddedJavaenvironments.ThroughthenewGlassFishproject,Sunisworkingtocreateafullyfunctional,unifiedopensourceimplementationoftheJavaEEtechnologies.SunalsodistributesasupersetoftheJREcalledtheJavaDevelopmentKit(commonlyknownastheJDK),whichincludesdevelopmenttoolssuchastheJavacompiler,Javadoc,Jar,anddebugger.
Javaperformanceandgarbagecollectors
ProgramswritteninJavahaveareputationforbeingslowerandrequiringmorememorythanthosewritteninC.However,Javaprograms'executionspeedimprovedsignificantlywiththeintroductionofJust-in-timecompilationin1997/1998forJava1.1,theadditionoflanguagefeaturessupportingbettercodeanalysis(suchasinnerclasses,StringBufferclass,optionalassertions,etc.),andoptimizationsintheJavaVirtualMachineitself,suchasHotSpotbecomingthedefaultforSun'sJVMin2000.Currently,JavacodehasapproximatelyhalftheperformanceofCcode.
SomeplatformsofferdirecthardwaresupportforJava;therearemicrocontrollersthatcanrunjavainhardwareinsteadofasoftwareJVM,andARMbasedprocessorscanhavehardwaresupportforexecutingJavabytecodethroughitsJazelleoption.
Automaticmemorymanagementjavausesanautomaticgarbagecollectortomanagememoryintheobjectlifecycle.Theprogrammerdetermineswhenobjectsarecreated,andtheJavaruntimeisresponsibleforrecoveringthememoryonceobjectsarenolongerinuse.Oncenoreferencestoanobjectremain,theunreachablememorybecomeseligibletobefreedautomaticallybythegarbagecollector.Somethingsimilartoamemoryleakmaystilloccurifaprogrammer'scodeholdsareferencetoanobjectthatisnolongerneeded,typicallywhenobjectsthatarenolongerneededarestoredincontainersthatarestillinuse.Ifmethodsforanonexistentobjectarecalled,a"nullpointerexception"isthrown.
OneoftheideasbehindJava'sautomaticmemorymanagementmodelisthatprogrammerscanbesparedtheburdenofhavingtoperformmanualmemorymanagement.Insomelanguages,memoryforthecreationofobjectsisimplicitlyallocatedonthestack,orexplicitlyallocatedanddeallocatedfromtheheap.Inthelattercasetheresponsibilityofmanagingmemoryresideswiththeprogrammer.Iftheprogramdoesnotdeallocateanobject,amemoryleakoccurs.Iftheprogramattemptstoaccessordeallocatememorythathasalreadybeendeallocated,theresultisundefinedanddifficulttopredict,andtheprogramislikelytobecomeunstableand/orcrash.Thiscanbepartiallyremediedbytheuseofsmartpointers,buttheseaddoverheadandcomplexity.Notethatgarbagecollectiondoesnotprevent"logical"memoryleaks,i.e.thosewherethememoryisstillreferencedbutneverused.
Garbagecollectionmayhappenatanytime.Ideally,itwilloccurwhenaprogramisidle.Itisguaranteedtobetriggeredifthereisinsufficientfreememoryontheheaptoallocateanewobject;thiscancauseaprogramtostallmomentarily.ExplicitmemorymanagementisnotpossibleinJava.
JavadoesnotsupportC/C++stylepointerarithmetic,whereobjectaddressesandunsignedintegers(usuallylongintegers)canbeusedinterchangeably.Thisallowsthegarbagecollectortorelocatereferencedobjectsandensurestypesafetyandsecurity.AsinC++andsomeotherobject-orientedlanguages,variablesofJava'sprimitivedatatypesarenotobjects.Valuesofprimitivetypesareeitherstoreddirectlyinfields(forobjects)oronthestack(formethods)ratherthanontheheap,ascommonlytrueforobjects(butseeEscapeanalysis).ThiswasaconsciousdecisionbyJava'sdesignersforperformancereasons.Becauseofthis,Javawasnotconsideredtobeapureobject-orientedprogramminglanguage.However,asofJava5.0,autoboxingenablesprogrammerstoproceedasifprimitivetypeswereinstancesoftheirwrapperclass.Javacontainsmultipletypesofgarbagecollectors.Bydefault,HotSpotusestheConcurrentMarkSweepcollector,alsoknownastheCMSGarbageCollector.However,therearealsoseveralothergarbagecollectorsthatcanbeusedtomanagetheHeap.For90%ofapplicationsinJa