Options for the SSH framework

Source: Internet
Author: User

Select frame:SSH

For web development, the SSH framework can improve development efficiency, make it easier to change requirements, and make it easier to work with later maintenance. SSH is also currently a slightly popular web development framework.

Select the frame description:

Let's start by stating that SSH is not a framework, but a combination of struts2+spring+hibernate three frames. The systems that integrate the SSH framework are divided into four tiers: presentation layer, business logic layer, data persistence layer, and Domain module layer (entity layer). Help developers build clear, reusable, and easy-to-maintain web applications in a short period of time.

It uses struts as the overall infrastructure of the system, is responsible for the separation of MVC, controls the business jump in the model part of the Struts framework, supports the persistence layer with the Hibernate framework, manages the spring, manages struts and hibernate. By using object-oriented analysis method, we propose some models, implement these models as basic Java objects, and then write the basic DAO (Data Access Objects) interface, and give the DAO implementation of Hibernate. The DAO class implemented by the hibernate architecture implements conversion and access between Java classes and databases, and finally manages struts and hibernate with spring. Let's take a look at the specific features of these three frameworks.

Struts2: simplifies the development of MVC-based Web applications. The JSP view can be displayed in action, and the action can have a clear page jump process. Combine JavaBean to separate the interactive page from the processing page. While it is not necessarily possible to reduce the amount of code written, the readability of the code is enhanced. There is also the name of the action that does not have to contain the contents of the. JSP directly in the address bar. For developing JSP Web pages, using Struts2 is a good choice.

Spring: The core is the IOC control inversion mechanism and AOP face-cutting two aspects, reduce the coupling, improve the execution rate, facilitate the transfer of information between objects. Providing a unified interface for different data access technologies, IOC makes it easy to implement bean assembly, provides concise AOP, and implements Transcation managment. Reduce the coupling between programs, improve the reusability of code.

Hibernate: An open source object-relational mapping framework, which is an open-source framework using ORM (Object/relation mapping Object-relational mapping) mechanism persistence layer, its main core idea is object-oriented, not process-oriented, And this object-oriented is mainly implemented by ORM. For the development of Web programs, the connection to database SQL Server2008 is the encapsulation of JDBC, simplifying the way to connect to the database, and less writing SQL statements for easy operation. It also supports connection operations for other databases, and the workflow is: Create sessionfactory,open session,create transation,close session,close sessionfactory. To implement operations on the database.

In the choice of SSH framework, the main or large enterprise-level applications are more, a small web application, does not show much advantage. In the process of learning now, for the code is not enough, learning SSH framework can improve their programming ability, can have a normative operation of programming, can also enable others to read their own procedures, in the team development process can be effective in the project division of labor and not cause too much error. Currently, although confined to the framework of development, but I think the most important thing is to learn this development model, in the future development process can be innovative, can improve efficiency.

Options for the SSH framework

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.