外文文献-基于mvc的struts框架内容摘要:

a p p i n gP e r s i s t e n t O b j e c t sD a t a b a s eA p p l i c a t i o nH i b e r n a t e Figure 2. Hibernate systematic structure As shown in figure 2, Hibernate lies in the middle layer that is between application and database .In the provided persistent service, Hibernate maps class to rows of datasheet by properties and mapping files of class () itself. Application interacts with database by Persitstent Object (PO) to handle data directly. 3 The Integration of Struts and Hibernate In the open source frameworks, for the presentation part, Tapestry has the powerful and natural bination of pages, its document is too conceptional to benefit programming. And its learning curve was too steep and so on. For the logic part, Spring has a good integration function, but there is a lack of public controller. And EJB depends on the EJB containers, at the same time, it is realized plicatedly. While Struts has been applied extensively because of its advantages. At present, most of systems apply the relational databases mainly, while Java is an objectoriented language essentially. In Model part of Struts framework application, using SQL and JDBC to operate databases when storing and fetching objects reduces programming efficiency and the systematic maintainability. Traditional J2EEbased application applies heavyweight framework based on EJB that adapts to the large enterprise development, while development and debugging by EJB container need to consume a plenty of time and high price. EJB3 improves the disadvantages of original EJB, but its application is not mature yet. Hibernate can substitute ContainerManaged Persistence (CMP) to acplish heavy responsibility of permanence in J2EE framework of applying a word, Hibernate can resolve the difficulties ing from using traditional CMP, JDBC and Data Access Object(DAO) in a technological development. For reducing the coupling of code and raising systematic development efficiency, this paper suggests J2EE application development tactics based on Struts and Hibernate. The Struts design shows the MVC framework sufficiently, which all control flows need a configuration file () to manage, and which is convenient to maintain. The integration of Struts and Hibernate is that Hibernate solves the model layer of Struts, which makes developers operate Java objects instead of database. The integration shows the objectoriented thought sufficiently and solves some problems of the database operation in traditional J2EE well. Flow of Framework The flow of integration framework based on Struts and Hibernate is shown in Figure 3. At first, users send Http requests by Browser, then Http requests are accepted by ActionServlet of the control ponent in business layer, then gave to RequestProcessor which gets corresponding Action from ActionMapping by request URL[3]. Besides, ActionForm packs JSP pages, which can make a checking to data of datasheet if it is needed, send back ActionErrors to visual pages if there are mistakes and transfer the data of pages to Action if it passes validation. Request Processor transfers the “execute” method of Action and the method transfers the busin。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。