




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
中文3170字本科畢業(yè)設(shè)計(jì)外文翻譯JSPtechnologyandmainstreamopen-sourceframeworkforJAVAEE專業(yè)名稱:學(xué)生姓名:學(xué)生學(xué)號(hào):指導(dǎo)教師:2023年5月18日J(rèn)SPtechnologyandmainstreamopen-sourceframeworkforJAVAEEJSPProfileJSP(JavaServerPages)isinitiatedbySunMicrosystems,Inc.,withmanycompaniestoparticipateintheestablishmentofadynamicwebpagetechnicalstandards.JSPtechnologysomewhatsimilartoASPtechnology,itisinthetraditionalHTMLwebpagedocument(*.htm,*.html)toinserttheJavaprogrammingparagraph(Scriptlet)andJSPtag(tag),thusJSPdocuments(*.jsp).UsingJSPdevelopmentoftheWebapplicationiscross-platformthatcanrunonLinux,isalsoavailableforotheroperatingsystems.JSPtechnologytousetheJavaprogramminglanguagepreparedbythecategoryofXMLtagsandscriptlets,toproducedynamicpagespackageprocessinglogic.Pagealsovisitbytagsandscriptletsexistintheservicessideoftheresourcesoflogic.JSPpagelogicandwebpagedesignanddisplayseparation,supportreusablecomponent-baseddesign,Web-basedapplicationdevelopmentisrapidandeasy.WebserverinthefaceofvisitsJSPpagerequest,thefirstimplementationoftheproceduresof,andthentogetherwiththeresultsoftheimplementationofJSPdocumentsinHTMLcodewiththereturntothecustomer.InserttheJavaprogrammingoperationofthedatabasecanbere-orientedwebsites,inordertoachievetheestablishmentofdynamicpagesneededtofunction.JSPandJavaServlet,isintheimplementationoftheserver,usuallyreturnedtotheclientisanHTMLtext,aslongastheclientbrowserwillbeabletovisit.JSP1.0specificationofthefinalversionislaunchedinSeptember1999,Decemberhasintroduced1.1specifications.AtpresentrelativelynewisJSP1.2norms,JSP2.0normsofthedrafthasalsobeenintroduced.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.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.ThefirstversionwaswrittenbyRodJohnsonwhoreleasedtheframeworkwiththepublicationofhisbookExpertOne-on-OneJ2EEDesignandDevelopmentinOctober2023.TheframeworkwasfirstreleasedundertheApache2.0licenseinJune2023.Thefirstmilestonerelease,1.0,wasreleasedinMarch2023,withfurthermilestonereleasesinSeptember2023andMarch2023.TheSpring1.2.6frameworkwonaJoltproductivityawardandaJAXInnovationAwardin2023.Spring2.0wasreleasedinOctober2023,andSpring2.5inNovember2023.InDecember2023version3.0GAwasreleased.Thecurrentversionis3.0.5.ThecorefeaturesoftheSpringFrameworkcanbeusedbyanyJavaapplication,butthereareextensionsforbuildingwebapplicationsontopoftheJavaEEplatform.AlthoughtheSpringFrameworkdoesnotimposeanyspecificprogrammingmodel,ithasbecomepopularintheJavacommunityasanalternativeto,replacementfor,orevenadditiontotheEnterpriseJavaBean(EJB)model.ModulesTheSpringFrameworkcomprisesseveralmodulesthatprovidearangeofservices:InversionofControlcontainer:configurationofapplicationcomponentsandlifecyclemanagementofJavaobjectsAspect-orientedprogramming:enablesimplementationofcross-cuttingroutinesDataaccess:workingwithrelationaldatabasemanagementsystemsontheJavaplatformusingJDBCandobject-relationalmappingtoolsTransactionmanagement:unifiesseveraltransactionmanagementAPIsandcoordinatestransactionsforJavaobjectsModel-view-controller:anandServlet-basedframeworkprovidinghooksforextensionandcustomizationRemoteAccessframework:configurativeRPC-styleexportandimportofJavaobjectsovernetworkssupportingRMI,CORBAand-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:supportclassesforwritingunittestsandintegrationtestsInversionofControlcontainerCentraltotheSpringFrameworkisitsInversionofControlcontainer,whichprovidesaconsistentmeansofconfiguringandmanagingJavaobjectsusingcallbacks.Thecontainerisresponsibleformanagingobjectlifecycles:creatingobjects,callinginitializationmethods,andconfiguringobjectsbywiringthemtogether.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.ComparedtotheAspectJframework,SpringAOPislesspowerfulbutalsolesscomplicated.Spring1.2includessupporttoconfigureAspectJaspectsinthecontainer.Spring2.0addedmoreintegrationwithAspectJ;forexample,thepointcutlanguageisreusedandcanbemixedwithSpAOP-basedaspects.Further,Spring2.0addedaSpringAspectslibrarywhichusesAspectJtooffercommonSpringfeaturessuchasdeclarativetransactionmanagementanddependencyinjectionviaAspectJcompile-timeorload-timeweaving.SpringSourcealsousesAspectJforAOPinotherSpringprojectssuchasSpringRooandSpringInsight,withSpringSecurityalsoofferinganAspectJ-basedaspectlibrary.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-retrievingdatabaseobjectsfromconnectionpoolwrappersAbstractionforBLOBandCLOBhandlingAllthesefeaturesbecomeavailablewhenusingTemplateclassesprovidedbySpringforeachsupportedframework.CriticssaytheseTemplateclassesareintrusiveandoffernoadvantageoverusing(forexample)theHibernateAPI..directly.Inresponse,theSpringdevelopershavemadeitpossibletousetheHibernateandJPAAPIsdirectly.Thishoweverrequirestransparenttransactionmanagement,asapplicationcodenolongerassumestheresponsibilitytoobtainandclosedatabaseresources,anddoesnotsupportexceptiontranslation.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,byusingmetadatalikeXMLorJava5annotationsTogetherwithSpring'sdataaccessframework—whichintegratesthetransactionmanagementframework—itispossibletosetupatransactionalsystemthroughconfigurationwithouthavingtorelyonJTAorEJB.Thetransactionalframeworkalsointegrateswithmessagingandcachingengines.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.TheDispatcherServletclassisthefrontcontrolleroftheframeworkandisresponsiblefordelegatingcontroltothevariousinterfacesduringtheexecutionphasesofarequest.ThemostimportantinterfacesdefinedbySpringMVC,andtheirresponsibilities,arelistedbelow:HandlerMapping:selectingobjectswhichhandleincomingrequests(handlers)basedonanyattributeorconditioninternalorexternaltothoserequestsHandlerAdapter:executionofobjectswhichhandleincomingrequestsController:comesbetweenModelandViewtomanageincomingrequestsandredirecttoproperresponse.Itessentiallyislikeagatethatdirectstheincominginformation.Itswitchesbetweengoingintomodelorview.View:responsibleforreturningaresponsetotheclient.Itispossibletogostraighttoviewwithoutgoingtothemodelpart.Itisalsopossibletogothroughallthree.ViewResolver:selectingaViewbasedonalogicalnamefortheview(useisnotstrictlyrequired)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.RemoteaccessframeworkSpring'sRemoteAccessframeworkisanabstractionforworkingwithvariousRPC-basedtechnologiesavailableontheJavaplatformbothforclientconnectivityandexportingobjectsonservers.ThemostimportantfeatureofferedbythisframeworkistoeaseconfigurationandusageofthesetechnologiesasmuchaspossiblebycombiningInversionofControlandAOP.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,2023.FormerlylocatedundertheApacheJakartaProjectandknownasJakartaStruts,itbecameatoplevelApacheprojectin2023.DesigngoalsandoverviewinastandardJavaEEwebapplication,theclientwilltypicallysubmitinformationtotheserverviaawebform.TheinformationistheneitherhandedovertoaJavaServletthatprocessesit,interactswithadatabaseandproducesanHTML-formattedresponse,oritisgiventoaJavaServerPages(JSP)documentthatinterminglesHTMLandJavacodetoachievethesameresult.Bothapproachesareoftenconsideredinadequateforlargeprojectsbecausetheymixapplicationlogicwithpresentationandmakemaintenancedifficult.ThegoalofStrutsistoseparatethemodel(applicationlogicthatinteractswithadatabase)fromtheview(HTMLpagespresentedtotheclient)andthecontroller(instancethatpassesinformationbetweenviewandmodel).Strutsprovidesthecontroller(aservletknownasActionServlet)andfacilitatesthewritingoftemplatesforthevieworpresentationlayer(typicallyinJSP,butXML/XSLTandVelocityarealsosupported).Thewebapplicationprogrammerisresponsibleforwritingthemodelcode,andforcreatingacentralconfigurationfilestruts-config.xmlthatbindstogethermodel,viewandcontroller.Requestsfromtheclientaresenttothecontrollerintheformof"Actions"definedintheconfigurationfile;ifthecontrollerreceivessucharequestitcallsthecorrespondingActionclassthatinteractswiththeapplication-specificmodelcode.Themodelcodereturnsan"ActionForward",astringtellingthecontrollerwhatoutputpagetosendtotheclient.InformationispassedbetweenmodelandviewintheformofspecialJavaBeans.ApowerfulcustomtaglibraryallowsittoreadandwritethecontentofthesebeansfromthepresentationlayerwithouttheneedforanyembeddedJavacode.Strutsiscategorizedasarequest-basedwebapplicationframeworkStrutsalsosupportsinternationalizationbywebforms,andincludesatemplatemechanismcalled"Tiles"that(forinstance)allowsthepresentationlayertobecomposedfromindependentheader,footer,andcontentcomponentsHistoryTheApacheStrutsProjectwaslaunchedinMay2023byCraigR.McClanahantoprovideastandardMVCframeworktotheJavacommunity.InJuly2023,version1.0wasreleased.Struts2wasoriginallyknownasWebWork2.Afterhavingbeendevelopedseparatelyforseveralyears,WebWorkandStrutswerecombinedin2023tocreateStruts2.CompetingMVCframeworksAlthoughStrutsisawell-documented,mature,andpopularframeworkforbuildingfrontendstoJavaapplications,thereareotherframeworkscategorizedas"lightweight"MVCframeworkssuchasSpringMVC,Stripes,Wicket,Play!,andTapestry.ThenewXFormsstandardsandframeworksmayalsobeanotheroptiontobuildingcomplexwebFormvalidationswithStrutsinthefuture.TheWebWorkframeworkspunofffromApacheStrutsaimingtoofferenhancementsandrefinementswhileretainingthesamegeneralarchitectureoftheoriginalStrutsframework.However,itwasannouncedinDecember2023thatStrutswouldre-mergewithWebWork.WebWork2.2hasbeenadoptedasApacheStruts2,whichreacheditsfirstfullreleaseinFebruary2023.In2023SunlaunchedanadditiontotheJavaplatform,calledJavaServerFaces(JSF).AsidefromtheoriginalStrutsframework,theApacheprojectpreviouslyofferedaJSF-basedframeworkcalledShale,whichwasretiredinMay2023.InthissectionwewilldiscussaboutArchitecture.StrutsisfamousforitsrobustArchitectureanditisbeingusedfordevelopingsmallandbigsoftwareprojects.StrutsisanopensourceframeworkusedfordevelopingJ2EEwebapplicationsusingModelViewController(MVC)designpattern.ItusesandextendstheJavaServletAPItoencouragedeveloperstoadoptanMVCarchitecture.Strutsframeworkprovidesthreekeycomponents:ArequesthandlerprovidedbytheapplicationdeveloperthatisusedtomappedtoaparticularURI.Aresponsehandlerwhichisusedtotransferthecontroltoanotherresourcewhichwillberesponsibleforcompletingtheresponse.AtaglibrarywhichhelpsdeveloperstocreatetheinteractiveformbasedapplicationswithserverpagesLearnStruts2.2.1frameworkStrutsprovidesyouthebasicinfrastructureinfrastructureforimplementingMVCallowingthedeveloperstoconcentrateonthebusinesslogicThemainaimoftheMVCarchitectureistoseparatethebusinesslogicandapplicationdatafromthepresentationdatatotheuser.HerearethereasonswhyweshouldusetheMVCdesignpatternTheyareresuable:Whentheproblemsrecurs,thereisnoneedtoinventanewsolution,wejusthavetofollowthepatternandadaptitasnecessary.Theyareexpressive:ByusingtheMVCdesignpatternourapplicationbecomesmoreexpressive.1).Model:Themodelobjectknowsaboutallthedatathatneedtobedisplayed.Itismodelwhoisawareaboutalltheoperationsthatcanbeappliedtotransformthatobject.Itonlyrepresentsthedataofanapplication.Themodelrepresentsenterprisedataandthebusinessrulesthatgovernaccesstoandupdatesofthisdata.Modelisnotawareaboutthepresentationdataandhowthatdatawillbedisplayedtothebrowser.2).View:Theviewrepresentsthepresentationoftheapplication.Theviewobjectreferstothemodel.Itusesthequerymethodsofthemodeltoobtainthecontentsandrendersit.Theviewisnotdependentontheapplicationlogic.Itremainssameifthereisanymodificationinthebusinesslogic.Inotherwords,wecansaythatitistheresponsibilityoftheview'stomaintaintheconsistencyinitspresentationwhen
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 林地全面清理施工方案
- 打磨施工方案
- 新型頂板套管施工方案
- 滑移施工方案
- TSHAEPI 006-2023 源分離水沖式廁所技術(shù)導(dǎo)則
- 2025年度汽車美容店技師專業(yè)用工合同示范文本
- 二零二五年度戶外廣告牌租賃與廣告效果評(píng)估協(xié)議
- 2025年度林業(yè)砍樹與生態(tài)保護(hù)基金管理協(xié)議
- 二零二五年度5G通信設(shè)備合作誠(chéng)意金合同
- 2025年度碼頭港口集裝箱拼箱與拆箱服務(wù)合同
- 護(hù)理技術(shù)操作考核評(píng)分標(biāo)準(zhǔn)患者約束法
- 教師教學(xué)質(zhì)量評(píng)估表(自評(píng)互評(píng)生評(píng)表)
- 重慶自然博物館
- 外科護(hù)理(高職護(hù)理專業(yè))PPT完整全套教學(xué)課件
- 輸血與創(chuàng)傷性凝血病
- 消化科臨床重點(diǎn)???/a>
- 人工挖孔樁爆破技術(shù)方案
- 2023年牡丹江大學(xué)單招面試題庫(kù)及答案解析
- 手機(jī)號(hào)碼歸屬地
- 運(yùn)行程序etops二放手冊(cè)b787qrh快速檢查單
- MT 220-1990煤礦用防爆柴油機(jī)械排氣中一氧化碳、氮氧化物檢驗(yàn)規(guī)范
評(píng)論
0/150
提交評(píng)論