一种基于Hibernate和Struts的J2EE应用开发策略ThistextanalysisthemechanismofHibernateandStruts,putforward1kindEEaccordingtotheJ2oftheHibernateandtheStrutsapplicationdevelopmentstrategy.Inthiskindofstrategy,themodellayeruseaHibernaterealizationandseediagramandcontrollertothenuseaStrutsframearealization.SocanconsumedlylowerthedevelopmentefficiencythattheOuofcodematchsexandexaltationsystem.Thekey
wordHibernate,Struts,theMVC,holdoutforlongtimealayeroneprefacealongwiththe
Javatechniqueofgradualmatureandperfect,Beestablishmentbusinessenterpriseclassapplicationofstandardterrace,theJ2EEterracegotsubstantialofdevelopment.SeveraltechniqueaskedforhelpfromtoincludeintheJ2EEnorm:EnterpriseJavaBean(EJB),JavaServlets(Servlet),JavaServerPages(
JSP),JavaMessageService(JMS)...etc.,developmentmanyapplicationsystem.But,als
oappearedsomeprobleminthetraditionJ2theEEtheapplicationofthedevelopmenttheprocess:1)theantinomyofofdatamodelandlogicmodel.Currentlythedatabaseofusagebasicallyandallisrelationtypedatabase,buttheJavabeessentiallyakindofthelanguagewhichfacetoobject,objectatsavingwithreadusageSQLandJDBCcarryonadatabaseoperationandloweredplaitdistanceofefficiencyandsystemofcanmaintenance;2)traditionofJ2EEapplicationmuchtheadoptionisaccordingtotheEJBheavyweightframe,thiskindofframesuitablefordevelopalargebusinessenterpriseapplication,butusagetheEJBcontainercarryondevelopmentandadjusttotrytoneedtobewasteagreatdealoftime.ForloweringtheOuofcodetomatchsex,exaltationsystemofdevelopmentefficiency,thistextputforward1kindEEaccordingtotheJ2oftheStrutsframeandtheHibernateframeapplicationdevelopmentstrategy.2datas'holdingoutforlongtimelayerandHibernateisonepieceaccording
toholdoutforlongtimelayerframe,isakindofrealizationobjectandrelationofthetoolwhichreflecttoshoot(O/RMapping),itcarriedontheobjectofthelightweighttopacktotheJDBCandmakeproceduremembercanusageobjectplaitdistancethoughttooperationdatabase.ItnotonlyprovidedtoshootfromJavatoreflectofdataform,butalsoprovidedadataasearchandinstaurationmechanism.OppositeinusageJDBCandSQLtooperationdatabase,useaHibernateabilityconsumedlyofexaltationrealizationofefficiency.TheHibernateframeuseallocation
documentoftheformcometothereflectofthedefinitionJavaobjectanddataformtoshootrelation,inthemeantimeatmoredeepoflevelofdataformofrelationexplanationfortherelationssuchasinheritofandcontainmentetc.ofJavaobject.PasstheusageHQLlanguagesentencecomplicationsofrelationthecalculatewayusethewayofobjectdescription,toalargeextentsimplificationlogarithmsaccordingtoofsearch,speeddevelopmentofefficiency.HaveintheHibernateasimplebutkeeptheAPIofview,usedfortothedatabasemeanofobjectperformancesearch.Wanttoestablishorthemodificationbetheseobjects,needintheprocedurecarryonwiththemtohandoverwitheachother,thentellHibernatetokeep.So,agreatdealofpackholdoutforlongtimeturnoperationofbusinesslogicnolongerdemandwriteatrivialJDBClanguagesentence,makedatalastlongthusthelayergotbiggestofsimplification.