您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > SSH-based-on-Web-Technology
SSHbasedonWebTechnology1、IntroductionOneprefacealongwiththeJavatechniqueofgradualmatureandperfect,Beestablishmentbusinessenterpriseclassapplicationofstandardterrace,theJ2EEterracegotsubstantialofdevelopment.SeveraltechniqueaskedforhelpfromtoincludeintheJ2EEnorm:EnterpriseJavaBean(EJB),JavaServlets(Servlet),JavaServerPages(JSP),JavaMessageService(JMS)...etc.,developmentmanyapplicationsystem.But,alsoappearedsomeprobleminthetraditionJ2theEEtheapplicationofthedevelopmenttheprocess:1)theantinomyofofdatamodelandlogicmodel.Currentlythedatabaseofusagebasicallyandallisrelationtypedatabase,buttheJavabeessentiallyakindofthelanguagewhichfacetoobject,objectatsavingwithreadusageSQLandJDBCcarryonadatabaseoperationandloweredplaitdistanceofefficiencyandsystemofcanmaintenance;2)traditionofJ2EEapplicationmuchtheadoptionisaccordingtotheEJBheavyweightframe,thiskindofframesuitablefordevelopalargebusinessenterpriseapplication,butusagetheEJBcontainercarryondevelopmentandadjusttotrytoneedtobewasteagreatdealoftime.ForloweringtheOuofcodetomatchsex,exaltationsystemofdevelopmentefficiency,thistextputforward1kindEEaccordingtotheJ2oftheStrutsframeandSpringframeandtheHibernateframeapplicationdevelopmentstrategy.2、UsetheStrutsrealizationMVCstructureusetheStrutsrealizationMVCstructureMVC(Model-View-Controller)isputforwardbytheTrygveReenskaug,firstdriveapplicationintheenvironmentSmallTalk-80,ismanytohandoverwitheachotherwithinterfacesystemofconstitutefoundation.Accordingtotheneedofvariableoftheinterfacedesign,MVChandoverwitheachotherconstituteofsystemtoresolveintomodelandseediagram,controllerthreepart.Model(Model)issoftwareprocessingproblemlogicatindependenceinoutsidemanifestationundercontentsandformcircumstanceofinsideabstract,packedthecoredata,logicofproblemandfunctionofcalculationrelation,independenceinconcreteofinterfaceexpressionandI/Ooperation.Seediagram(View)meaninformationandparticularformdemonstrationofmodeldataandlogicrelationandappearancetothecustomer.Itacquireamanifestationinformationfromthemodel,therecanbemanyforhomologyofinformationdissimilarityofmanifestationformorseediagram.Thecontroller(Controller)isaprocessingthecustomerhandoverwithsoftwarewitheachotheroperationof,itsjobiscontrolprovidemodelinanyvarietyofdissemination,insureacustomerinterfaceamongthemodelofrightnessshouldcontact;Itacceptacustomerofimportation,give°theimportationfeedbackmodel,thenrealizationcomputemodelcontrol,ismakemodelandseediagramtomoderateworkofparts.Usually1seeadiagramrightnessshouldacontroller.Model,seeseparateofdiagramandcontroller,makeamodelbeabletohavemanymanifestationtoseediagram.Ifthecustomerpassacertainseethecontrollerofdiagramchangethedataofmodel,allotherdependenceintheseseeofdatadiagramallshouldreflectionarrivethesevariety.Whenthereforeandregardlessoccurrencewhatdatavariety,controllerallwouldvarietynoticeallyseediagram,causemanifestationofrenewal.Thisisactuallyakindofvarietyofmodel-disseminationmechanism.TheStrutsframeistobetheitemofApacheJakartatoconstituteparttopublishlucktodoattheearlieststage,itinheritedMVCofeachitemcharacteristic,anddidaccordingtothecharacteristicsofJ2EEcorrespondofvarietywithexpand.TheStrutsframewasgoodtocombineJsp,JavaServlet,JavaBean,Taliaetc.technique.IntheStruts,whattoundertakethecontrollerroleintheMVCbeanActionServlet.TheActionServletisaningeneralusecontrolmodule.ThiscontrolmoduleprovidedaprocessingallHTTPclaimwhichsendoutStrutsofentrancepoint.Itsinterceptionwithdistributetheseclaimtoarrivecorrespondofactiontype.(theseactionalloftypeisActionsontype)MoreoverthecontrolmoduleisalsoresponsibleforusingtocorrespondofclaimtheparameterfillActionForm(FromBean),andpassactiontype(ActionBean).Actiontypethebusinesslogicoftheinterviewcore,theninterviewJavaBeanoradjusttouseEJB.Endactiontypecontrolthepowerpassfollow-upofJSPdocument,fromJSPdocumentbornseediagram.AllthesecontrollogicmakeuseofStruts-config.xmlthedocumentcometoallocation.SeediagramintheStrutsframemainfromJSPbornpagecompletion,theStrutsprovideabundantofJSPlabeldatabase,thisisadvantageoustoseparatingperformancelogicandprocedurelogic.Themodeliswith1ortheformexistenceofseveralJavaBean.IntheStruts,mainexistencethreekindsofBean,respectivelyBE:Action,ActionForm,EJBperhapsJavaBean.TheStrutsframehavenoconcretedefinitionmodellayerofrealization,inactuallythedevelopment,modellayerusuallyisclosewithbusinesslogicconnectwitheachother,andwanttocarryonoperationtothefirstfloordata.Theunderneath'sintroductionisakindofdevelopmentstrategy,leadtheHibernateintothemodellayerofStrutsframe,usageittocarryonadatatopackwithreflecttoshoot,provideholdoutforlongtimeturnofsupport.4usageHibernateandtheStrutsdevelopmentJ2EEapplication4.1systemstructurediagram3manifestationaccordingtoHibernateandStrutsdevelopmentstrategyofsystemstructurediagram.3、SpringtheApplicationFrameworkSpringisn'tparticularlyawebframeworkbutagenericlightweightapplicationframeworkwithdedicatedwebsupport,andshowthearchitecturaldifferencestoStrutsandWebWork.IncontrasttoStrutsorWebWork,Springisanapplicationframeworkforalllayers:Itoffer
本文标题:SSH-based-on-Web-Technology
链接地址:https://www.777doc.com/doc-5206508 .html