The progress of Springside 3

Source: Internet
Author: User

On Springside's official home page, the main components included in Springside 3 are: Spring 2.5 + Hibernate 3 + Struts 2 + JSP 2.0 + JQuery + Jax-ws 2 (by Apache CXF 2) +springsecurity 2.0. However, if you think that the upgrade is only a version number compared to Springside 2, then you are wrong.

People like me coming from Springside 2, if they can compare Springside 2 and Springside 3 in detail, it will be more helpful for us to understand Springside 3. The following content is my own experience, not the right place to welcome you to correct.

From the main architecture, still a few layers, first design the database, then write the entity layer, write the DAO layer, then write the action, and then use JSP performance, where the entity and DAO layer and hibernate closely related, action is the main part of struts, Spring is used as a binder to connect these things together and provides some mechanism to simplify the work of writing these layers. Springside is such a large adhesive body that saves us a lot of bonding work. From Springside 2 to Springside 3, the work has been further simplified, and we've developed it even better.

In my opinion, our development model mainly experienced such a simplification process:

In the first stage, the code adds a whole bunch of configuration files

Second stage, code plus a small amount of configuration files

In the third phase, the code adds a configuration file that is essentially zero

How are these advances achieved? From the first stage to the second phase, mainly by the annotation, a lot of configuration work to the Java code, then from the second phase to the third phase how to achieve it? have been annotation, do you have any way to make the configuration file less? I can't believe it! I can't imagine, until I saw the project Springside 3, I know there is a good thing called automatic scanning.

Use the actual example below to illustrate. As an example, Hibernate is a good choice.

In the first stage, if we use hibernate alone, we have to write a. hbm.xml file at the same time, if there are many entity, if we write a entity class. You have to write a lot of. hbm.xml files, every time you modify the entity, also remember to modify. hbm.xml file, which is quite inconvenient, the directory structure of the following figure:

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.