The difference between Spring MVC and STRUTS2

Source: Internet
Author: User

The difference between Spring MVC and Struts2:

1. Ease of Use spring MVC is easy to get started with, and can be seamlessly combined with spring, after all, is a company's products, learning is also relatively simple, such as the front end to the object to fill the value, his processing is much simpler than Struts2, such as the restful style of the URL support, These spring MVC are much better than Struts2 do n times.


2. Security speaks of security, and now the vulnerability has been revealed. Spring MVC has so far not found a more serious vulnerability.


3. Extensibility Spring MVC relies on spring's big tree, the strength of spring I think you can not doubt it, including the version of the update, iteration these are historical testimony


4.spring MVC is more flexible, less error-prone, and less expensive to develop


5.spring MVC + Hiberante/mybatis combination is better for agile development than SSH


6. Because the SPRINGMVC is lightweight, it is relatively flexible to use. Spring MVC will be slightly faster than Struts2. Spring MVC is based on method design, and Sturts2 is class-based, and each time a request is made, an Action is instantiated. Spring MVC is more concise and development efficient spring MVC is indeed higher than struts2: SPRINGMVC supports JSR303, and the request to process Ajax is more convenient. Of course, struts is not without merit, Struts2 's OGNL expression makes page development more efficient than Spring MVC.


7, SPRINGMVC based on method development, STRUTS2 based on the development of the class. SPRINGMVC maps the URL and the method in the controller. After the mapping succeeds, SPRINGMVC generates a handler object with only one method included in the object. The method execution ends and the shape parameter is destroyed. SPRINGMVC's controller develops similar Web service development.


8, SPRINGMVC can be a single case development, and the proposed use of a single case development, STRUTS2 through the class member variable to receive parameters, can not use a singleton, can only use multiple examples.

The difference between Spring MVC and STRUTS2

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.