On the three frameworks and applications of Java

Source: Internet
Author: User
Tags html form

Foreword: For a programmer, especially in Java Web Development programmer, three big framework: struts+hibernate+spring is must master ripe, so, the following talk about the basic concepts and principles of Java three framework.

Three main frameworks of Java

Spring Spring is a powerful framework that solves many of the problems common in the development of Java EE.

Spring provides a consistent approach to managing business objects and encourages the good habit of injecting programming to interfaces rather than classes. The schema base of Spring is based on the inversion of Control container that uses the JavaBean property. However, this is only part of the complete picture:Spring is unique in using the IoC container as a complete solution to all architectural layers.

spring provides unique data access abstractions, including simple and efficient JDBC framework, which greatly improves efficiency and reduces possible errors. hibernate and other O/R mapping solution. spring also provides a unique transaction management abstraction that can be managed in various underlying transaction management techniques, such as jta or spring provides a AOP framework, which is written in the standard Java language, which gives pojos provides declarative transaction management and other enterprise transactions-if you need-you can also implement your own aspects . This framework is powerful enough to allow applications to throw away the complexity of EJB , while enjoying the critical services associated with traditional EJBS. spring also provides a powerful and flexible style= that can and ioc "color: #ff0000; Container integration style= "COLOR: #ff0000;" >MVC the Web framework.

Second, STRUCTS struts is an MVC framework based on the Sun EE platform, which is mainly implemented by servlet and JSP technology.

Because Struts can fully meet the needs of application development, easy-to-use, agile and rapid, over the past year has been a considerable concern. struts consolidates Servlets, JSPs, custom tags, and information resources intoa single, unified framework that developers use to develop without having to encode themselves to implement a full set of MVC mode, greatly saving time, so that struts is a very good application framework.

hibernate Hibernate is an open-source object-relational mapping framework that provides JDBC with a very lightweight object encapsulation that allows Java programmers to manipulate databases at will using object programming thinking.

Hibernate can be used in any application where JDBC is available, both in Java client applications and in servlet/jsp Web applications, the most revolutionary Hibernate can be used to replace CMPin the Java EE architecture of EJB application, and to accomplish the data Persistence task. ,Hibernate can be used to replace CMPin the Java EE Architecture of EJB , and to accomplish the task of data persistence.

The three frameworks of Java are used to make Web applications.

Struts is primarily responsible for presentation layer display Spring uses its IOC and AOP to handle the control business (responsible for the operation of the database)

hibernate is primarily the persistence of data to the database in jsp web.xml Mapping file with a mapping tag is used for file mapping. When you enter the URL address on the browser, the file will correspond to a java file according to the name you wrote, according to file is displayed in the browser, which is a Web page, so the name of the page is random, random name, no matter what you start with. php. jsp. Do or everything else corresponds to this java file, this java file compiled .class a bytecode file, There is not a Web page file that resembles HTML embedded tags and code. The difference between him and the JSP file is that the JSP embeds the code in the HTML tag. There are also file, struts is generally. Do, which is mapped as above.

Summary: In simple terms:

Struts is the Web Development framework responsible for form submissions (equivalent to computer graphics)

Hibernate is responsible for the operation of the database (equivalent to the computer CPU)

Spring is equivalent to a motherboard (the video card and CPU are assembled together)

On the three frameworks and applications of Java

Related Article

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.