Font Size: a A A

Research Of Struts Framework Based MVC Designed Pattern

Posted on:2005-02-26Degree:MasterType:Thesis
Country:ChinaCandidate:Y J GaoFull Text:PDF
GTID:2168360125950485Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Require with to the software along with the society of increase continuously, the computer acts for the manual labor become more and more widespread. We can say on nowise the ground, the social every vocation is already inseparable with software. But the efficiency of development in the development process is low and development ends the period maintenance work has been affair to perplex many developing personnel.Under this background, the software realm put forward concepts: Component, Design Mode, and Framework etc. Firstly this text analyzeComponent, Design Mode and Framework: Component namely the code is repeatedly used; but Design Mode is design repeatedly used; Framework then situated between Component and Design Mode, parts of codes is repeatedly used, parts of design is repeatedly used, sometimes analyzing is too repeatedly used. This text is through a lot of theories cushion, Model 2--change of Model 1 take into expatiating. Model 2, as MVC's next generation, it inherited the Model 1 all advantage, but abandoned the Model 1 the tight coupling, repeat using is worse and support fee is higher etc. At the same time we expatiate Model 2 of the workflow through the diagram text:(1) The Servlet accepts the Client's request;(2) The Servlet saves the data received from HTML FORM to data Bean;(3) The logic Bean deals with data;(4) According to the logic Bean's handling result, the Servlet adjust to use the homologous JSP. (5) Create HTML in JSP page, and return to the Client.Hereto we have had an understanding of first step to the Struts innate character in fact.Then we introduce three main classes of Struts: ActionServlet, Action, ActionForm and Taglibs in detail. (1) ActionServlet: complete the Controller's function. It requests the information according to the HTTP, adjust to use an Action, and according to its result, adjust to choice JSP. The matching information of to choice JSP document information keeps in XML document-- struts-config.xml ;(2) Action: Complete the Model inside logic Bean's function. It packs business handles, and complete the data's dealing. (3) ActionForm: Complete the Model inside data Bean's function. It keeps data from the HTTP requesting, and includes operation of setting data and getting data. (4)It is important for the Taglib, it increased greatly the efficiency of development, the main point of our introduction is how to definition Taglib by ourselves.In addition, we explain the Struts' related technique: The configurable exception handles, daily record function, detach page function etc. In fact the detach page function is also found on Taglib. In daily record function the main point of explains is Log4j that system refer to. The configurable exception handles, just as its name implies can immediately appreciate.In succession this text uses an example of BaiYun Airport System more detailedly expatiate advantage for Struts, from the environment installing to system background, from the logic designing to interface designing.In the end, this text first summarizes the Struts' advantage. Completely supporting the J2EE (Java 2 Enterprise Edition) along with Application Server, such as the Weblogic, Websphere etc., J2EE become the Web application software development standard gradually. To use Java and HTML Develop flexible application software, you must resolve two problems:(1) user interface separate with logic in business;(2) the logic part of dynamic creating web page separate with HTML. But the Struts solved them commendably: For the problem(1), the adoption of the model of MVC in Object Oriented can immediately resolve. The model of MVC 2 is MVC be expanded in order to facing Web application software development, MVC have three main factors: JavaBean as Model, JSP as View, and Servlet as Controller respectively. For the problem(2), adopting the Taglib function that JSP provided could immediately resolve. It makes use of inserting the special marking in HTML, separate the logical part with the HTML. In addition to two advantages abo...
Keywords/Search Tags:Framework
PDF Full Text Request
Related items