The respective roles of the three main frameworks of Java

Source: Internet
Author: User
Tags html form

http://christhb.blog.163.com/blog/static/98982492011727114936239/

First, Spring

Spring is a powerful framework that solves many of the problems that are 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 a unique data access abstraction, including a simple and efficient JDBC framework, which greatly improves efficiency and reduces possible errors. Spring's data Access architecture also integrates hibernate and other O/R mapping solutions. Spring also provides a unique transaction management abstraction that provides a consistent programming model across a variety of underlying transaction management techniques, such as JTA or JDBC transactions. Spring provides an AOP framework written in the standard Java language that provides POJOs with declarative transaction management and other enterprise transactions-if you need it-to implement your own aspects. This framework is powerful enough to allow applications to throw away the complexity of EJBS while enjoying the critical services associated with traditional EJBS. Spring also provides a powerful and flexible MVC web framework that can be integrated with IOC containers.

Second, STRUCTS

Struts is an MVC framework based on the Sun EE platform, which is implemented mainly 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 into a single, unified framework that developers use to develop without having to code their own full set of MVC patterns, saving time So struts is a very good application framework.

Third, 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 applied to any JDBC application, both in Java client applications and in servlet/jsp Web applications, and most revolutionary is that hibernate can replace CMP in the EE architecture of the EJB application. The task of achieving data persistence. , hibernate can be used to replace CMP in the Java EE architecture of EJB, and to accomplish the task of data persistence. Mapping is very simple, is the map of the page, do more practice will be,

Java three frameworks are used to make Wen applications. Struts is primarily responsible for presentation layer display spring uses its IOC and AOP to handle the control business (responsible for database operations) Hibernate is primarily the persistence of data to the database When using the JSP servlet to do Web page development, there is a mapping file with Web. XML, there is a mapping tag is used to do file mapping. When you enter the URL address in the browser, the file will be based on the name you write to a Java file, according to the content written in the Java file displayed in the browser, is a Web page, so the page name is casually written, random name, whatever you get up is. php. jsp. Do or everything else corresponds to this Java file, the code in this Java file to do what to do, display a word or connect the database or jump to other pages and so on, this Java file to encapsulate the data for security and easy to manage the role. In fact, this Java file compiled is a. Class of a bytecode file, there is not a similar HTML embedded tags and code page file. The difference between him and the JSP file is that the JSP embeds the code in the HTML tag. And the commit name in the action of the servlet or the HTML form in struts corresponds to a Java file, and struts is generally. Do, which is mapped as above.

The respective roles of the three main frameworks 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.