The selection and analysis of experimental one frame

Source: Internet
Author: User

Frame selection and its analysis

For the framework of the experimental program development, I chose the SSH framework.

SSH framework:

Specifically, it should be: struts2.0+spring3.2+hirbnate2.5

The typical Java three layer structure is divided into the representation layer, the middle layer (business logic level) and the data service layer. The three-tier system deals with business rules, data access, and legitimacy checks in the middle tier. Instead of interacting directly with the database, the client establishes a connection to the middle tier through the component and then interacts with the database by the middle tier.

Performance layer is the traditional JSP technology, since its inception in 1999, after years of development, its wide application and stable performance, as a performance layer of technology has laid a solid foundation.

The middle layer adopts the popular spring+hibernate, in order to separate the control layer and the business logic layer, it is subdivided into the following several.

The web layer, the "C" (Controller) in the MVC pattern, is responsible for controlling the interaction of the business logic layer with the presentation layer, invoking the business logic layer, and returning the business data to the performance layer for organizational performance, and the MVC framework of the system uses struts.

The service layer (the business logic layer) is responsible for implementing the business logic. The business logic layer is based on the DAO layer, and the business logic required by the system is completed by wrapping the front pattern of DAO components.
The DAO layer, which is responsible for interacting with persisted objects. This layer encapsulates the operation of adding, deleting, checking and changing data.

PO, persistent object. By mapping the data of the relational database into objects through the Entity Relationship Mapping tool, it is easy to implement the database in object-oriented mode, which uses Hibernate as the ORM framework.

Spring's role spans the entire middle tier, seamlessly consolidating the web layer, service layer, DAO layer, and Po, and its data service layer is used to store data.

A good framework allows developers to mitigate the burden and effort of re-establishing solutions to complex problems; it can be extended for internal customization, and has a strong user community to support it. A framework is usually a good solution to a problem. However, your application is layered, and each layer may need its own framework. Just solving the UI problem does not mean that you have a good coupling between business logic and persistence logic and UI components.

The following is a brief introduction to the advantages of the three-tier structure:    

Open source is a common advantage of 3 frameworks

The advantages of the STRUTS2 Framework (MVC framework) are as follows:

1) realize the MVC pattern, the hierarchy structure is clear, so that the programmer only needs to focus on the realization of business logic;

2) Rich tag library, greatly improve the efficiency of development;

3) Struts2 provides a rich interceptor implementation

4) Through the configuration file, you can master the relationship between the various parts of the system;

5) exception handling mechanism, simply configure the exception mapping in the configuration file, you can do the appropriate processing of the exception;

The advantages of the spring framework are as follows:

1) No intrusion (the presence of the spring framework is not felt in the business logic code);

2) The coupling between the various components is extremely loose;

3) without the programmer to implement Singleton mode;

4) through AOP, transaction management and log management can be realized;

5) Integrate other frameworks such as the struts framework and the Hibernate framework;

The benefits of the Hibernate Framework (ORM Framework) are as follows:

1) object/relational database mapping (ORM), using only manipulating objects, making development more object-oriented;

2) no intrusion;

3) Concise HQL statement, reducing the amount of code in JDBC and SQL operations database;

4) Good transplant;

These are the reasons why I chose the SSH framework to develop this test program.

The selection and analysis of experimental one frame

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.