




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)中英文對照外文翻譯(文檔含英文原文和中文翻譯)JSPtechnologyandmainstreamopen-sourceframeworkforJAVAEEJSPProfileJSP(JavaServerPages)isinitiatedbySunMicrosystems,Inc.,withmanycompaniestoparticipateintheestablishmentofadynamicwebpagetechnicalstandards.JSPtechnologysomewhatsimilartoASPtechnology,itisinthetraditionalHTMLwebpagedocument(*.htm,*.html)toinserttheJavaprogrammingparagraph(Scriptlet)andJSPtag(tag),thusJSPdocuments(*.jsp).UsingJSPdevelopmentoftheWebapplicationiscross-platformthatcanrunonLinux,isalsoavailableforotheroperatingsystems.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第1頁。JSPtechnologytousetheJavaprogramminglanguagepreparedbythecategoryofXMLtagsandscriptlets,toproducedynamicpagespackageprocessinglogic.Pagealsovisitbytagsandscriptletsexistintheservicessideoftheresourcesoflogic.JSPpagelogicandwebpagedesignanddisplayseparation,supportreusablecomponent-baseddesign,Web-basedapplicationdevelopmentisrapidandeasy.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第1頁。WebserverinthefaceofvisitsJSPpagerequest,thefirstimplementationoftheproceduresof,andthentogetherwiththeresultsoftheimplementationofJSPdocumentsinHTMLcodewiththereturntothecustomer.InserttheJavaprogrammingoperationofthedatabasecanbere-orientedwebsites,inordertoachievetheestablishmentofdynamicpagesneededtofunction.JSPandJavaServlet,isintheimplementationoftheserver,usuallyreturnedtotheclientisanHTMLtext,aslongastheclientbrowserwillbeabletovisit.JSP1.0specificationofthefinalversionislaunchedinSeptember1999,Decemberhasintroduced1.1specifications.AtpresentrelativelynewisJSP1.2norms,JSP2.0normsofthedrafthasalsobeenintroduced.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第2頁。JSPpagesfromHTMLcodeandJavacodeembeddedinoneofthecomponents.TheserverwasinthepagesofclientrequestsaftertheJavacodeandthenwillgeneratetheHTMLpagestoreturntotheclientbrowser.JavaServletJSPisthetechnicalfoundationandlarge-scaleWebapplicationdevelopmentneedsofJavaServletandJSPsupporttocomplete.JSPwiththeJavatechnologyeasytouse,fullyobject-oriented,andaplatform-independentandsecuremainlyforallthecharacteristicsoftheInternet.JSPtechnologystrength:(1)timetoprepare,runeverywhere.AtthispointJavabetterthanPHP,inadditiontosystems,thecodenottomakeanychanges.(2)themulti-platformsupport.Basicallyonallplatformsofanydevelopmentenvironment,inanyenvironmentfordeploymentinanyenvironmentintheexpansion.ComparedASP/PHPlimitationsareobvious.(3)astrongscalability.FromonlyasmallJardocumentscanrunServlet/JSP,tothemultipleserversclusteringandloadbalancing,tomultipleApplicationfortransactionprocessing,informationprocessing,aservertonumerousservers,JavashowsatremendousVitality.(4)diversificationandpowerfuldevelopmenttoolssupport.ThisissimilartotheASP,Javaalreadyhavemanyverygooddevelopmenttools,andmanycanbefree,andmanyofthemhavebeenabletorunonavarietyofplatformsunder.JSPtechnologyvulnerable:(1)andthesameASP,Javaistheadvantageofsomeofitsfatalproblem.Itispreciselybecauseinordertocross-platformfunctionality,inordertoextremestretchingcapacity,greatlyincreasingthecomplexityoftheproduct.(2)Java'sspeedisclasstocompletethepermanentmemory,soinsomecasesbytheuseofmemorycomparedtothenumberofusersisindeeda"minimumcostperformance."Ontheotherhand,italsoneedsdiskspacetostoreaseriesof.Javadocumentsand.Class,aswellasthecorrespondingversionsofdocuments.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第2頁。2.J2EEDevelopmentFrameworkJava2EnterpriseEditionmiddlewareunifiedideologyplayedasignificantrole.Forexample,J2EEfordistributedtransactionmanagement,directoryservicesandmessagingservicesprovideastandardprogramminginterface.J2EE-based-Java2StandardEdition(J2SE),successfullyaccessforJavaprovidesastandardrelationaldatabase.But,asthisarticle"J2EEprogrammingofthelackofsupport",asmentioned,J2EEplatformdoesnotprovideasatisfactoryapplicationprogrammingmodel.SunandsomeofthemajorapplicationservervendorswantedtousethedevelopmenttoolstoreducethecomplexityofJ2EEdevelopment,butthesetoolsarenootheroutstandingJAVAdevelopmenttools,whichhaveadvancedrefactoringtools,and.NETplatformcompared,J2EEtoolsupportappearedtobeveryinferior.ManyJ2EEdevelopmenttoolsautomaticallygeneratethecodeforthesamecomplexasthetoolsthemselves.Inmanysmall-scaleJ2EEopensourcecommunitydeveloperschoseanotherwayofdevelopment-somecanbedifficulttoreducethedevelopmentofJ2EEdevelopmentframework,themorepopularsuchas:Struts,Hibernate,andSpringFramework,J2EEprojecttypesinmanyoftodaytheyplayanimportanttherole.2.1SpringFrameworkTheSpringFrameworkisanopensourceapplicationframeworkfortheJavaplatform.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第3頁。ThefirstversionwaswrittenbyRodJohnsonwhoreleasedtheframeworkwiththepublicationofhisbookExpertOne-on-OneJ2EEDesignandDevelopmentinOctober2002.TheframeworkwasfirstreleasedundertheApache2.0licenseinJune2003.Thefirstmilestonerelease,1.0,wasreleasedinMarch2004,withfurthermilestonereleasesinSeptember2004andMarch2005.TheSpring1.2.6frameworkwonaJoltproductivityawardandaJAXInnovationAwardin2006.Spring2.0wasreleasedinOctober2006,andSpring2.5inNovember2007.InDecember2009version3.0GAwasreleased.Thecurrentversionis3.0.5.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第3頁。ThecorefeaturesoftheSpringFrameworkcanbeusedbyanyJavaapplication,butthereareextensionsforbuildingwebapplicationsontopoftheJavaEEplatform.AlthoughtheSpringFrameworkdoesnotimposeanyspecificprogrammingmodel,ithasbecomepopularintheJavacommunityasanalternativeto,replacementfor,orevenadditiontotheEnterpriseJavaBean(EJB)model.ModulesTheSpringFrameworkcomprisesseveralmodulesthatprovidearangeofservices:InversionofControlcontainer:configurationofapplicationcomponentsandlifecyclemanagementofJavaobjectsAspect-orientedprogramming:enablesimplementationofcross-cuttingroutinesDataaccess:workingwithrelationaldatabasemanagementsystemsontheJavaplatformusingJDBCandobject-relationalmappingtoolsTransactionmanagement:unifiesseveraltransactionmanagementAPIsandcoordinatestransactionsforJavaobjectsModel-view-controller:anHTTPandServlet-basedframeworkprovidinghooksforextensionandcustomizationRemoteAccessframework:configurativeRPC-styleexportandimportofJavaobjectsovernetworkssupportingRMI,CORBAandHTTP-basedprotocolsincludingwebservices(SOAP)Convention-over-configuration:arapidapplicationdevelopmentsolutionforSpring-basedenterpriseapplicationsisofferedintheSpringmodel.Batchprocessing:aframeworkforhigh-volumeprocessingfeaturingreusablefunctionsincludinglogging/tracing,transactionmanagement,jobprocessingstatistics,jobrestart,skip,andresourcemanagementAuthenticationandauthorization:configurablesecurityprocessesthatsupportarangeofstandards,protocols,toolsandpracticesviatheSpringSecuritysub-project(formerlyAcegiSecuritySystemforSpring).RemoteManagement:configurativeexposureandmanagementofJavaobjectsforlocalorremoteconfigurationviaJMXMessaging:configurativeregistrationofmessagelistenerobjectsfortransparentmessageconsumptionfrommessagequeuesviaJMS,improvementofmessagesendingoverstandardJMSAPIsTesting:supportclassesforwritingunittestsandintegrationtests信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第4頁。InversionofControlcontainerCentraltotheSpringFrameworkisitsInversionofControlcontainer,whichprovidesaconsistentmeansofconfiguringandmanagingJavaobjectsusingcallbacks.Thecontainerisresponsibleformanagingobjectlifecycles:creatingobjects,callinginitializationmethods,andconfiguringobjectsbywiringthemtogether.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第4頁。ObjectscreatedbythecontainerarealsocalledManagedObjectsorBeans.Typically,thecontainerisconfiguredbyloadingXMLfilescontainingBeandefinitionswhichprovidetheinformationrequiredtocreatethebeans.ObjectscanbeobtainedbymeansofDependencylookuporDependencyinjection.Dependencylookupisapatternwhereacallerasksthecontainerobjectforanobjectwithaspecificnameorofaspecifictype.Dependencyinjectionisapatternwherethecontainerpassesobjectsbynametootherobjects,viaeitherconstructors,properties,orfactorymethods.Inmanycasesit'snotnecessarytousethecontainerwhenusingotherpartsoftheSpringFramework,althoughusingitwilllikelymakeanapplicationeasiertoconfigureandcustomize.TheSpringcontainerprovidesaconsistentmechanismtoconfigureapplicationsandintegrateswithalmostallJavaenvironments,fromsmall-scaleapplicationstolargeenterpriseapplications.Thecontainercanbeturnedintoapartially-compliantEJB3containerbymeansofthePitchforkproject.TheSpringFrameworkiscriticizedbysomeasnotbeingstandardscompliant.However,SpringSourcedoesn'tseeEJB3complianceasamajorgoal,andclaimsthattheSpringFrameworkandthecontainerallowformorepowerfulprogrammingmodels.Aspect-orientedprogrammingframeworkTheSpringFrameworkhasitsownAOPframeworkwhichmodularizescross-cuttingconcernsinaspects.ThemotivationforcreatingaseparateAOPframeworkcomesfromthebeliefthatitwouldbepossibletoprovidebasicAOPfeatureswithouttoomuchcomplexityineitherdesign,implementation,orconfiguration.TheSAOPframeworkalsotakesfulladvantageoftheSpringContainer.TheSpringAOPframeworkisinterceptionbased,andisconfiguredatruntime.Thisremovestheneedforacompilationsteporload-timeweaving.Ontheotherhand,interceptiononlyallowsforpublicorprotectedmethodexecutiononexistingobjectsatajoinpoint.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第5頁。ComparedtotheAspectJframework,SpringAOPislesspowerfulbutalsolesscomplicated.Spring1.2includessupporttoconfigureAspectJaspectsinthecontainer.Spring2.0addedmoreintegrationwithAspectJ;forexample,thepointcutlanguageisreusedandcanbemixedwithSpAOP-basedaspects.Further,Spring2.0addedaSpringAspectslibrarywhichusesAspectJtooffercommonSpringfeaturessuchasdeclarativetransactionmanagementanddependencyinjectionviaAspectJcompile-timeorload-timeweaving.SpringSourcealsousesAspectJforAOPinotherSpringprojectssuchasSpringRooandSpringInsight,withSpringSecurityalsoofferinganAspectJ-basedaspectlibrary.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第5頁。SpringAOPhasbeendesignedtomakeitabletoworkwithcross-cuttingconcernsinsidetheSpringFramework.AnyobjectwhichiscreatedandconfiguredbythecontainercanbeenrichedusingSpringAOP.TheSpringFrameworkusesSpringAOPinternallyfortransactionmanagement,security,remoteaccess,andJMX.Sinceversion2.0oftheframework,SpringprovidestwoapproachestotheAOPconfiguration:schema-basedapproach.@AspectJ-basedannotationstyle.TheSpringteamdecidednottointroducenewAOP-relatedterminology;therefore,intheSpringreferencedocumentationandAPI,termssuchasaspect,joinpoint,advice,pointcut,introduction,targetobject(advisedobject),AOPproxy,andweavingallhavethesamemeaningsasinmostotherAOPframeworks(particularlyAspectJ).DataaccessframeworkSpring'sdataaccessframeworkaddressescommondifficultiesdevelopersfacewhenworkingwithdatabasesinapplications.SupportisprovidedforallpopulardataaccessframeworksinJava:JDBC,iBatis,Hibernate,JDO,JPA,OracleTopLink,ApacheOJB,andApacheCayenne,amongothers.Forallofthesesupportedframeworks,Springprovidesthesefeatures:Resourcemanagement-automaticallyacquiringandreleasingdatabaseresourcesExceptionhandling-translatingdataaccessrelatedexceptiontoaSpringdataaccesshierarchyTransactionparticipation-transparentparticipationinongoingtransactionsResourceunwrapping-retrievingdatabaseobjectsfromconnectionpoolwrappersAbstractionforBLOBandCLOBhandling信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第6頁。AllthesefeaturesbecomeavailablewhenusingTemplateclassesprovidedbySpringforeachsupportedframework.CriticssaytheseTemplateclassesareintrusiveandoffernoadvantageoverusing(forexample)theHibernateAPI..directly.Inresponse,theSpringdevelopershavemadeitpossibletousetheHibernateandJPAAPIsdirectly.Thishoweverrequirestransparenttransactionmanagement,asapplicationcodenolongerassumestheresponsibilitytoobtainandclosedatabaseresources,anddoesnotsupportexceptiontranslation.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第6頁。TogetherwithSpring'stransactionmanagement,itsdataaccessframeworkoffersaflexibleabstractionforworkingwithdataaccessframeworks.TheSpringFrameworkdoesn'tofferacommondataaccessAPI;instead,thefullpowerofthesupportedAPIsiskeptintact.TheSpringFrameworkistheonlyframeworkavailableinJavawhichoffersmanageddataaccessenvironmentsoutsideofanapplicationserverorcontainer.WhileusingSpringfortransactionmanagementwithHibernate,thefollowingbeansmayhavetobeconfigured.TransactionmanagementframeworkSpring'stransactionmanagementframeworkbringsanabstractionmechanismtotheJavaplatform.Itsabstractioniscapableofworkingwithlocalandglobaltransactions(localtransactiondoesnotrequireanapplicationserver).workingwithnestedtransactionsworkingwithtransactionsafepointsworkinginalmostallenvironmentsoftheJavaplatformIncomparison,JTAonlysupportsnestedtransactionsandglobaltransactions,andrequiresanapplicationserver(andinsomecasesalsodeploymentofapplicationsinanapplicationserver).TheSpringFrameworkshipsaPlatformTransactionManagerforanumberoftransactionmanagementstrategies:TransactionsmanagedonaJDBCConnectionTransactionsmanagedonObject-relationalmappingUnitsofWorkTransactionsmanagedviatheJTATransactionManagerandUserTransactionTransactionsmanagedonotherresources,likeobjectdatabasesNexttothisabstractionmechanismtheframeworkalsoprovidestwowaysofaddingtransactionmanagementtoapplications:Programmatically,byusingSpring'sTransactionTemplateConfiguratively,byusingmetadatalikeXMLorJava5annotations信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第7頁。TogetherwithSpring'sdataaccessframework—whichintegratesthetransactionmanagementframework—itispossibletosetupatransactionalsystemthroughconfigurationwithouthavingtorelyonJTAorEJB.Thetransactionalframeworkalsointegrateswithmessagingandcachingengines.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第7頁。TheBoneCPSpring/HibernatepagecontainsafullexampleprojectofSpringusedinconjunctionwithHibernate.Model-view-controllerframeworkTheSpringFrameworkfeaturesitsownMVCframework,whichwasn'toriginallyplanned.TheSpringdevelopersdecidedtowritetheirownwebframeworkasareactiontowhattheyperceivedasthepoordesignofthepopularJakartaStrutswebframework,aswellasdeficienciesinotheravailableframeworks.Inparticular,theyfelttherewasinsufficientseparationbetweenthepresentationandrequesthandlinglayers,andbetweentherequesthandlinglayerandthemodel.LikeStruts,SpringMVCisarequest-basedframework.Theframeworkdefinesstrategyinterfacesforalloftheresponsibilitieswhichmustbehandledbyamodernrequest-basedframework.Thegoalofeachinterfaceistobesimpleandclearsothatit'seasyforSpringMVCuserstowritetheirownimplementationsiftheysochoose.MVCpavesthewayforcleanerfrontendcode.AllinterfacesaretightlycoupledtotheServletAPI.ThistightcouplingtotheServletAPIisseenbysomeasafailureonthepartoftheSpringdeveloperstoofferahigh-levelabstractionforweb-basedapplications[citationneeded].However,thiscouplingmakessurethatthefeaturesoftheServletAPIremainavailabletodeveloperswhileofferingahighabstractionframeworktoeaseworkingwithsaidAPI.TheDispatcherServletclassisthefrontcontrolleroftheframeworkandisresponsiblefordelegatingcontroltothevariousinterfacesduringtheexecutionphasesofaHTTPrequest.ThemostimportantinterfacesdefinedbySpringMVC,andtheirresponsibilities,arelistedbelow:HandlerMapping:selectingobjectswhichhandleincomingrequests(handlers)basedonanyattributeorconditioninternalorexternaltothoserequestsHandlerAdapter:executionofobjectswhichhandleincomingrequestsController:comesbetweenModelandViewtomanageincomingrequestsandredirecttoproperresponse.Itessentiallyislikeagatethatdirectstheincominginformation.Itswitchesbetweengoingintomodelorview.View:responsibleforreturningaresponsetotheclient.Itispossibletogostraighttoviewwithoutgoingtothemodelpart.Itisalsopossibletogothroughallthree.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第8頁。ViewResolver:selectingaViewbasedonalogicalnamefortheview(useisnotstrictlyrequired)信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第8頁。HandlerInterceptor:interceptionofincomingrequestscomparablebutnotequaltoServletfilters(useisoptionalandnotcontrolledbyDispatcherServlet).LocaleResolver:resolvingandoptionallysavingofthelocaleofanindividualuserMultipartResolver:facilitateworkingwithfileuploadsbywrappingincomingrequestsEachstrategyinterfaceabovehasanimportantresponsibilityintheoverallframework.Theabstractionsofferedbytheseinterfacesarepowerful,sotoallowforasetofvariationsintheirimplementations,SpringMVCshipswithimplementationsofalltheseinterfacesandtogetheroffersafeaturesetontopoftheServletAPI.However,developersandvendorsarefreetowriteotherimplementations.SpringMVCusestheJavajava.util.Mapinterfaceasadata-orientedabstractionfortheModelwherekeysareexpectedtobestringvalues.TheeaseoftestingtheimplementationsoftheseinterfacesseemsoneimportantadvantageofthehighlevelofabstractionofferedbySpringMVC.DispatcherServletistightlycoupledtotheSpringInversionofControlcontainerforconfiguringtheweblayersofapplications.However,applicationscanuseotherpartsoftheSpringFramework—includingthecontainer—andchoosenottouseSpringMVC.BecauseSpringMVCusestheSpringcontainerforconfigurationandassembly,web-basedapplicationscantakefulladvantageoftheInversionofControlfeaturesofferedbythecontainer.Thisframeworkallowsformultilayering.Itallowsforthecodetobebrokenapartandusedmoreeffectivelyinsegments,whileallowingthemvctodothework.Itallowsforbackandforthtransmissionofdata.Somedesignsaremorelinearwithoutallowingaforwardandbackwardflowofinformation.MVCisdesignedverynicelytoallowthisinteraction.Itisusedmorethanjustinwebdesign,butalsoincomputerprogramming.It'sveryeffectiveforwebdesign.Basicallyallowsachecksandbalancesystemtooccurwherebeforebeingvieweditcanbeproperlyexamined.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第9頁。RemoteaccessframeworkSpring'sRemoteAccessframeworkisanabstractionforworkingwithvariousRPC-basedtechnologiesavailableontheJavaplatformbothforclientconnectivityandexportingobjectsonservers.ThemostimportantfeatureofferedbythisframeworkistoeaseconfigurationandusageofthesetechnologiesasmuchaspossiblebycombiningInversionofControlandAOP.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第9頁。Theframeworkalsoprovidesfault-recovery(automaticreconnectionafterconnectionfailure)andsomeoptimizationsforclient-sideuseofEJBremotestatelesssessionbeans.Convention-Over-ConfigurationRapidApplicationDevelopmentSpringRooisSpring'sConvention-over-configurationsolutionforrapidlybuildingapplicationsinJava.ItcurrentlysupportsSpringFramework,SpringSecurityandSpringWebFlow,withremainingSpringprojectsscheduledtobeaddedinduecourse.Roodiffersfromotherrapidapplicationdevelopmentframeworksbyfocusingon:ThefollowingdiagramrepresentstheSpringFrameworkArchitecture2.2StrutsIntroductionApacheStrutsFromWikipedia,thefreeencyclopediaJumpto:navigation,search"Struts"redirectshere.Forthestructuralcomponent,seestrut.Forothermeanings,seestrut(disambiguation).Thisarticleincludesalistofreferences,butitssourcesremainunclearbecauseithasinsufficientinlinecitations.Pleasehelptoimprovethisarticlebyintroducingmoreprecisecitationswhereappropriate.ApacheStrutsisanopen-sourcewebapplicationframeworkfordevelopingJavaEEwebapplications.ItusesandextendstheJavaServletAPItoencouragedeveloperstoadoptamodel-view-controller(MVC)architecture.ItwasoriginallycreatedbyCraigMcClanahananddonatedtotheApacheFoundationinMay,2000.FormerlylocatedundertheApacheJakartaProjectandknownasJakartaStruts,itbecameatoplevelApacheprojectin2005.DesigngoalsandoverviewinastandardJavaEEwebapplication,theclientwilltypicallysubmitinformationtotheserverviaawebform.TheinformationistheneitherhandedovertoaJavaServletthatprocessesit,interactswithadatabaseandproducesanHTML-formattedresponse,oritisgiventoaJavaServerPages(JSP)documentthatinterminglesHTMLandJavacodetoachievethesameresult.Bothapproachesareoftenconsideredinadequateforlargeprojectsbecausetheymixapplicationlogicwithpresentationandmakemaintenancedifficult.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第10頁。ThegoalofStrutsistoseparatethemodel(applicationlogicthatinteractswithadatabase)fromtheview(HTMLpagespresentedtotheclient)andthecontroller(instancethatpassesinformationbetweenviewandmodel).Strutsprovidesthecontroller(aservletknownasActionServlet)andfacilitatesthewritingoftemplatesforthevieworpresentationlayer(typicallyinJSP,butXML/XSLTandVelocityarealsosupported).Thewebapplicationprogrammerisresponsibleforwritingthemodelcode,andforcreatingacentralconfigurationfilestruts-config.xmlthatbindstogethermodel,viewandcontroller.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第10頁。Requestsfromtheclientaresenttothecontrollerintheformof"Actions"definedintheconfigurationfile;ifthecontrollerreceivessucharequestitcallsthecorrespondingActionclassthatinteractswiththeapplication-specificmodelcode.Themodelcodereturnsan"ActionForward",astringtellingthecontrollerwhatoutputpagetosendtotheclient.InformationispassedbetweenmodelandviewintheformofspecialJavaBeans.ApowerfulcustomtaglibraryallowsittoreadandwritethecontentofthesebeansfromthepresentationlayerwithouttheneedforanyembeddedJavacode.Strutsiscategorizedasarequest-basedwebapplicationframeworkStrutsalsosupportsinternationalizationbywebforms,andincludesatemplatemechanismcalled"Tiles"that(forinstance)allowsthepresentationlayertobecomposedfromindependentheader,footer,andcontentcomponentsHistoryTheApacheStrutsProjectwaslaunchedinMay2000byCraigR.McClanahantoprovideastandardMVCframeworktotheJavacommunity.InJuly2001,version1.0wasreleased.Struts2wasoriginallyknownasWebWork2.Afterhavingbeendevelopedseparatelyforseveralyears,WebWorkandStrutswerecombinedin2008tocreateStruts2.CompetingMVCframeworksAlthoughStrutsisawell-documented,mature,andpopularframeworkforbuildingfrontendstoJavaapplications,thereareotherframeworkscategorizedas"lightweight"MVCframeworkssuchasSpringMVC,Stripes,Wicket,Play!,andTapestry.ThenewXFormsstandardsandframeworksmayalsobeanotheroptiontobuildingcomplexwebFormvalidationswithStrutsinthefuture.信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第11頁。TheWebWorkframeworkspunofffromApacheStrutsaimingtoofferenhancementsandrefinementswhileretainingthesamegeneralarchitectureoftheoriginalStrutsframework.However,itwasannouncedinDe信息管理與信息系統(tǒng)中英文對照外文翻譯文獻(xiàn)全文共19頁,當(dāng)前為第11頁。In2004SunlaunchedanadditiontotheJavaplatform,calledJavaServerFaces(JSF).AsidefromtheoriginalStrutsframework,theApacheprojectpreviouslyofferedaJSF-basedframeworkcalledShale,whichwasretiredinMay2009.InthissectionwewilldiscussaboutArchitecture.StrutsisfamousforitsrobustArchitectureanditisbeingusedfordevelopingsmallandbigsoftwareprojects.StrutsisanopensourceframeworkusedfordevelopingJ2EEwebapplicationsusingModelViewController(MVC)designpattern.ItusesandextendstheJavaServletAPItoencouragedeveloperstoadoptanMVCarchitecture.Strutsframeworkprovidesthreekeycomponents:ArequesthandlerprovidedbytheapplicationdeveloperthatisusedtomappedtoaparticularURI.Aresponsehandlerwhichisusedtotransferthecontroltoanotherresourcewhichwillberesponsibleforcompletingtheresponse.AtaglibrarywhichhelpsdeveloperstocreatetheinteractiveformbasedapplicationswithserverpagesLearnStruts2.2.1frameworkStrutsprovidesyouthebasicinfrastructureinfrastructureforimplementingMVCallowingthedeveloperstoconcentrateonthebusinesslogicThemainaimoftheMVCarchitectureistoseparatethebusinesslogicandapplicationdatafromthepresentationdatatotheuser.HerearethereasonswhyweshouldusetheMVCdesignpatternTheyareresuable:Whentheproblemsrecurs,thereisnoneedtoinventanewsolution,wejusthavetofollowthepatternandadaptitasnecessary.Theyareexpressive:ByusingtheMVCdesignpatternourapplicationbecomesmoreexpressive.1).Model:Themodelobjectknowsaboutallthedatathatneedtobedisplayed.Itismodelwhoisawareaboutalltheoperationsthatcanbeappliedtotransformthatobject.Itonlyrepresentsthedataofanapplication.Themodelrepresentsenterprisedataandthebusinessrulesthatgovernaccesstoandupdatesofthisdata.Modelisnotawareaboutthepresentationdataandhowthatdata
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 軟件設(shè)計(jì)師考試高效復(fù)習(xí)筆記及試題答案
- 計(jì)算機(jī)技術(shù)在政策評估中的應(yīng)用潛能試題及答案
- 化妝師考試試題、答案
- 社會公正與經(jīng)濟(jì)政策的關(guān)系試題及答案
- 流動(dòng)機(jī)械基礎(chǔ)試題及答案
- 軟件設(shè)計(jì)趨勢與試題及答案的變化
- 軟件設(shè)計(jì)師考試優(yōu)劣勢分析試題及答案
- 網(wǎng)絡(luò)信息安全等級測評試題及答案
- 如何通過數(shù)字技術(shù)提升政策實(shí)施效率試題及答案
- 公共政策中的性別視角試題及答案
- GB 5009.96-2016食品安全國家標(biāo)準(zhǔn)食品中赭曲霉毒素A的測定
- 通用綠色簡約小清新PPT模板
- 排序算法及其算法分析課件
- 吸煙對人體危害和戒煙
- 子宮內(nèi)膜增生課件
- 建筑施工安全技術(shù)統(tǒng)一規(guī)范
- 天津市新版就業(yè)、勞動(dòng)合同登記名冊
- 建設(shè)工程施工安全技術(shù)操作規(guī)程完整
- 送醫(yī)護(hù)人員錦旗用語16字
- 裝配作業(yè)指導(dǎo)書
- 學(xué)校內(nèi)控制度及手冊
評論
0/150
提交評論