Tell me about the individual's understanding of what struts,spring,hibernate is.

Source: Internet
Author: User
Tags aop file upload java web
This is a combination of three mutually-matched frameworks, and is now a more mature Java Web development framework.

Struts (now the main use of Struts 2) is mainly responsible for Web layer interaction, that is, page and code between the parameters, type conversion, input checksum, internationalization, file upload download these directly with the user to interact with the Web page, the core mechanism is the interceptor, the common features of these web development to encapsulate, Easy to use directly.

Hibernate is mainly responsible for the processing of data layer, that is, the interaction between code and relational database (RDBMS), is an Object relational mapping (ORM) framework, the main role is to map the tables and their relationships in the database into Java class objects and their relationships, easy to operate in object-oriented (OO) mode, Avoids the tedious and non-object-oriented approach of JDBC programming directly with SQL. (You can call SQL, of course). Other functions, including caching, are primarily to improve code performance.

The spring framework uses its two functions, 1) The IoC (inversion control) function to manage the JavaBean in the code uniformly, enabling automatic injection and reducing code coupling. (with this function, you need to understand the design patterns well). 2) Aspect-oriented (AOP) feature, can be a part of common code into the program, such as logging, transaction management in particular. Spring can actually be understood as a "glue" that leverages IOC and AOP to integrate with Struts 2 and hibernate, such as managing STRUTS2 Action, responsible for business layer code injection, implementing annotated transaction management for the database, and more.

In each of these three frameworks in fact there are alternatives, such as struts 2 can use springmvc,hibernate instead of mybatis,spring IOC also have Google Guice can replace. But these three are now more mature, can find more information, so most projects like to use this combination.

The above is my personal understanding.

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.