MVC-Design-Pattern-for-framework-distributed-appli

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

PraveenGuptaet.al./(IJCSE)InternationalJournalonComputerScienceandEngineeringVol.02,No.04,2010,1047-1051MVCDesignPatternforthemultiframeworkdistributedapplicationsusingXML,springandstrutsframeworkPraveenGuptaResearchScholar,SinghaniaUniversityPacheriBari,Rajasthan,Indiapraveen2gupta@gmail.comProf.M.C.GovilGovt.MahilaEngineeringCollegeAjmer,Rajasthan,Indiagovilmc@yahoo.comAbstract—Themodelviewcontroller(MVC)isafundamentaldesignpatternfortheseparationbetweenuserinterfacelogicandbusinesslogic.SinceapplicationsareverylargeinsizethesedaysandtheMVCdesignpatterncanweakthecouplingamongthedifferentapplicationtiersofapplication.thispaperpresentsawebapplicationframeworkbasedonMVCinJ2EEplatform,andextendsitwithXMLsothattheframeworkismoreflexible,expansibleandeasytomaintain.Thisisamultitiersystemincludingpresentationlayer,businesslayer,datapersistencelayeranddatabaselayer.Thisseparatecodes,andimprovemaintainabilityandreusabilityoftheapplication.Inthispaper,weimplementedMVCusingspringandstrutsframework.OurresearchstudyshowthatapplyingmultipleframeworktodesigntheapplicationsusingMVCconceptsmakesapplicationseasiercomparetoasingleframework.IndexTerma:MVC,Spring,XMLI.INTRODUCTIONWebistheverycomplexissuesthesedays.Sincethedesireofthecompaniesandorganizationsareincreasingsothecomplexityandtheperformanceofthewebprogrammingmatters.Complexitywiththedifferenttypesofcommunicationdevicesisincreasing.Thebusinessisdemandingapplicationsusingthewebandmanycommunicationdevices.Sowiththeincreaseloadofthedataontheinternetwehavetotakecareofthearchitectureissue.LetusdiscussinbrieftheresearchdonesofarinMVC.1.1NOMVC:InTheinitialphaseofthewebdevelopmentthepageswereusedtobedesignedinthehtml.Htmlistheplaintextonly.Thiswasthefirstmarkuplanguagewhichcanworkontheinternet.AndtodaystillsitworksasbuildingblockfortheallInternetbasedprogramminglanguages.Theuserhastointeractwiththestaticpages.Theinformationwrittenonthepageshadtochangemanually.Asthetimegrowsthedemandarisesforalanguagethatcaninteractwiththeuserandpagecanbechangedaspertherequirementoftheuser.1.2MVCModel1:ThefirstmajorchangeinthearchitecturecomeswiththeintroductionoftheMVCModel1Architecture.Thisarchitecturewascompletelybasedonthepagecentricapproach.InthismodelaJavaServerPagestoprogramtocontrolthePresentation,BusinessLogicandflowoftheprogram.InthismodeltheconceptoftheBusinessLogicwasintroduced.ThebusinesslogicwashardcodedintheformoftheJavaBeansandscriptletsandexpressions.AllthiscodeswasusedtowritewithintheJSPpage.Letusassumeacasewhenwewanttotransfertheflowofthejspapplicationbasedonthedatawereceivedfromtheinput. Figure 1 PageNavigationinMVC-1ArchitectureA.JSPB.JSPC.JSPDataBaseISSN:0975-33971047PraveenGuptaet.al./(IJCSE)InternationalJournalonComputerScienceandEngineeringVol.02,No.04,2010,1047-10511.3MVCModel2:Themodel1architecturewasabletosolvesomeoftheproblemofthewebandinternetprogrammingbutstilltherewerealotofthingsmissingfromit.Itwascenteredonthenavigationofthejsppagessotherewasthescopeofthefurtherdevelopmentinthearchitecturepointofview.DuringthisprocessthenextdevelopmentwastheModel2architecture.ThisproblemwassolvedusingtheServletandJSPtogether.TheServesthandlestheInitialrequestandpartiallyprocessthedata.Itsetupthebeansthenforwardtheresulttotheoneofthejsppage.TheServletdecidetheoneofthepagetobedisplayedfromthelistofpages. Figure 2  MVC-2architectureInthisModel2architecturetheJSPPageswereusedtoPresentationpurposeonly.TheBusinesslogichasbeenremovedfromthepage.ThismakesthepageseasiertorepresentandlightweightpageswhichwereeasytodisplayontheinternetInthismodelallControlandapplicationlogicwerehandledbytheServlet.TheServletwaswritteninthejavaprogramminglanguage.SoitwasalsoeasiertohandletheprogrammingpartoftheServlet.InthisscenariotheServestbecomesthepowerfullforthecompleteapplicationandIthasemergedasthecenterpointfortheapplication.Inthemodel2architecturetheServletbecomesthegatekeeperfortheallcommontasks.Itprovidesthecommonserviceslikeauthentication,authorization,errorcontrolandfollowoftheapplication.Thisarchitecturehavesolvedthemostoftheproblems.ButstillthereweremanynewissuesemergedwhileapplyingthisarchitectureII.APPLYINGARCHITECTUREWITHMULTIPLEFRAMEWORKSWebandInternetisevergrowingareaandthedemandsfortheapplicationsaregrowing.Asingleframeworkisnotcapabletohandlethearchitectureoftheapplication.Tomeetthecurrentsrequirementoftheapplicationsit’snecessarytodesignaarchitecturetoimplementtheframeworks.Strutsframeworkhavebeendesignedanddevelopedforthefrontendcontrolofthewebapplications.Itprovidesthevariousfeaturesfortheapplicationsthatinteracttotheusers.ItalsofollowstheMVC2designfeatures.SpringFrameworkisthedesignedtohandlethevarioustasks.Thespringworkforthedesktopandinternetbasedapplicationsalso.ItfollowstheprincipalsoftheMVC2.ThesimultaneoususeoftheStrutsandspringframeworksinthesingleapplicationwiththeapplyingtheMVCDesignprincipalssothatwecanImprovetheperformanceoftheapplications.StrutsFrameworkconsistsofthreemajorblocks,Describedinbriefasfollows.Figure 3 Struts Model ArchitectureFirstisTheViewBlockwhichco

1 / 5
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功