Font Size: a A A

Design And Implementation Of Business Platform System Based On Struts

Posted on:2008-05-12Degree:MasterType:Thesis
Country:ChinaCandidate:C F ZhuFull Text:PDF
GTID:2178360212496031Subject:Computer applications
Abstract/Summary:PDF Full Text Request
Struts is an open source project provided by Apache softwareorganization, It provides a java web applications Model-View-Controller(MVC) framework. It is commonly used in large scale application programdevelopment. After an depth studyon the workingmechanism of struts, andanalyzed the"Update and rebuilding of the Mayor's Telephone system ofZhengzhouCity"projects, this paperdesigns aschemeandthenimplementsit using Sqlserver2000 database with the eclipse as the developmentplatformwhichisthemostpopularplatforminjavadevelopments.J2EE framework defines the standards of developing and runningenterprise layer Web programs. It includes a suit of strong criterions ondeveloping enterprise layer mid-components; it can provide greatconveniences for the developers in enterprise-layer application developmentonthesideofservers. Its greatest advantageis toseparatethebusiness logiclayer from the view logic layer. Application Servers provide a range ofservices for components, it makes developers will be able to concentrate onspecific areas of business organizations, and not too much concerned aboutcomplex system-layer issues of the J2EE bottom layer. JSP technology isnot onlythemost rapiddevelopment technology, but also isthemost widelyusedtechnologyinJ2EE.Nowthequiteavailable development model is theJSP Model2 based on the MVC design views. In the JSP Model2, Servletwhich is responsible for the users'requests and produces JavaBean Objectsused by the JSP pages, then chooses the appropriate JSP pages to return totheuseraccordingtotheuser'srequest,playstheroleofcontroller.Struts is essentially an MVC framework based on JSP Model2, InStruts framework, "Model" is composed of JavaBean or EJB componentswhich implement the business logic layer, "Controller" is implemented bythe ActionServlet class and Action class, "View" is composed of a series ofJSPdocuments,ThesedocumentssimplyshowJSPwebsitecode,thereisnobusiness logic code in them, and also no model information through labelsto show the corresponding data. "Model" indicates the states and businesslogic of the application. The business logic Usually is implemented byJavaBean or EJB. Controller is the core components of Struts framework,Which is implemented by ActionServlet class and Action class.ActionServlet class is the core class of the Struts framework, which playsthe role of a central controller in the MVC model, and is responsible forcalling the methods of the model, updates the model states and controls theapplicationprocess.After a detailed analysis of the project "Update and rebuilding of theMayor's Telephone system of Zhengzhou City", there are some capabilitieswith which the project should be provided.1) Good interaction, the systemshould has a good man-machine interface, with an easy-to-use features; 2)better scalability, components used in the form of development of thesystem after the upgrade and expansion to prepare 3) good maintainability,ease of maintenance and debugging the system. Based on the above points,in line with the norms based on J2EE programming, Struts framework isusedasthemainframework.Inthesystem designphase, thesystem is developedaccordingto MVCmode which is complied with the Struts framework, at the same time thedesign has given attention to the reusability feature and loosely coupledfeature which are advocated byobject-oriented technology, and exerts mucheffort tomakesystem bethebest intheaspects ofexpanding,easyuse,easymaintainingandsafety.ActionServlet instance Accepts all the HTTP requests in the programflows, then according to the configuration file struts-config.xml, the systemdecides that the requests should map to which Action instance. FirstlyAction object should call the"validate"method included in ActionForm inorder to simply check up validity of the data, after passing the checking-upAction object's"execute"method is called for complex data validating andthen determines the system's direction, simultaneously Several commonused business transactions are encapsulated in classes, they are caseClassclasswhichisusedtodealwiththetypeofincidents,andpageclasswhichisused to deal with pagination, and MD5 class which is used for passwordencryption,whichgreatlyincreasethereusabilityandreducethecoupling.Eclipse and myEclipse plugin are used as the development platform,and the plugin is considered as a standard tool for Struts, which iscompatible with the struts1.1 struts1.2, and has easy configuration, easy touse, and high development efficiency features, coupled with its visualinterface provided, all of these make the entire proceeding clear and easy,and easy to maintain, easy to modify, and also greatly enhance thedevelopmentprogressofthesystem.In the structure, Tomcat application server is used in the system, toenhance the safety of the system, the system configured data sources byusing configuration files, this approach facilitates the database transplant.Users'passwords are encrypted by MD5, which is good for preventingpersonal information from leakage. in order to avoid Chinese charactersmistakes, the system uses a resource document to transform Chineseinformation, then we can use them. At the same time there is a setting filterparameterinweb.xmlfile,whichcanguaranteeChinesecharactersaccesstothedatabasecorrectly.There arethe followingvirtues onadoptingStruts as the system's mainframework after implementing the system: 1) the success of Strutsframeworkis usedforreference,avoidingtherisk ofdesigningnewmodels,reducing the time of designing the system, and guaranteeing the systemreasonable. 2) The system takes advantage of MVC design model compliedby Struts, divides up the program reasonably, makes its process clear, andmakes it easy to debug and maintain.3) The system implements theseparation between web page code and logic layer code, with the clientlabels provided by Struts, it can located the place where some mistakesemerge, this enhances the debugging efficiency. 4) The business logic layerof the program was implemented by JavaBean, it advances the code reuse,and reduces the coupling relationship among all layers. 5) The system takesadvantage of the data source provided by Struts, this approach is not onlyconvenient, flexible, but also makes the database pool technology beachieved,advancesthesystemtheexecutingefficiency.As a wonderful MVC application framework, Struts has been used inmany cases successfully, however because of my lack of time and the limitof my self's abilities, I can not master the merits of the Struts frameworkcompletely and can not use it skillfully in short time. So maybe there aresome shortcomings in the process of the system designing andimplementation.Theprojectwillbemoreperfectthroughfartherresearch.
Keywords/Search Tags:Implementation
PDF Full Text Request
Related items