Advantages and disadvantages of struts2,spring,hibernate framework

Source: Internet
Author: User

Advantages and disadvantages of struts2,spring,hibernate framework


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
3) through the configuration file, you can master the relationship between the various parts of the system;
4) 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;

Disadvantages are as follows:

Support for batch update and deletion is not good;

about the advantages of MVC:

Most of the Web applications developed using process language such as ASP and PHP, the initial development template is the data programming of the mixed layer. For example, sending requests directly to the database and displaying them in HTML is often faster, but because the separation of data pages is not straightforward, it is difficult to reflect the look of the business model or the reusability of the model. Product design Flexibility is very small, it is difficult to meet the changing needs of users. MVC requires layering of applications, although it takes extra work, but the structure of the product is clear, and the application of the product can be better represented by the model.

First, the most important is the ability to have multiple views corresponding to a model. There may be multiple ways to access the application's requirements under the rapidly changing needs of the current user. For example, the order model may have orders for the system, there are online orders, or other system orders, but the processing of orders is the same, that is, the processing of orders is consistent. By MVC design mode, an order model and multiple views can solve the problem. This reduces code duplication, which reduces the amount of code maintenance and is easy to maintain once the model has changed. Second, since the data returned by the model does not have any display format, these models can also be applied directly to the use of the interface.

Again, since an application is separated into three layers, it is sometimes possible to change one layer to meet the application change. A change in an application's business process or business rules simply changes the model layer of MVC.

The concept of the control layer is also very effective, because it combines different models and different views to complete different requests, so the control layer can be said to contain the concept of user request permission.

Finally, it also facilitates the management of software engineering. Because different layers have their own roles, each layer of different applications has some of the same characteristics, which facilitates the production of management program code through engineering and tooling.

Advantages and disadvantages of struts2,spring,hibernate 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.