Spring Framework Overview

Source: Internet
Author: User

Spring is the most popular Java Enterprise Application Development Framework, and millions of developers around the world are using the spring framework to create high-performance, easy-to-test, reusable code.

The core features of the spring framework can be applied to any Java application, but Web applications can be built on an extended Java EE platform. The goal of the spring framework is to make the development of the Java EE easier and promote good programming practices through the POJO programming model.

POJO (Plain old Java Object), is such a "pure" JavaBean, in which there is nothing else except the methods and properties of the JavaBean specification, That is, the private property and the get and set methods of public for this property method. We will find that this kind of javabean is very "simple", it can only load data, as the carrier of data storage, and not have the ability of business logic processing. So the following code is considered to be pojo.

public class Dbhello implements Hello {   private Dictionarydao dao;   public void Setdao (Dictionarydao dao) {          This.dao = DAO;   }}

In fact, that is a problem. This is a concept that arises from the development of a different period:

JavaBean-->pojo---> EJB 2---> Spring---->ejb3/spring

This is a rough historical journey, the JavaBean 1.00-a specification was released by Sun Company in December 96, and the JavaBean specification defines the software component model. Although JavaBean is designed to define reusable application components, they seem too simple to be competent for any "real" work, and the needs of enterprise-level developers are not met.

Complex applications require services such as transaction management, security, and distributed computing, but the JavaBean specification is not directly available. So in March 98, Sun released the EJB 1.0 specification, which extends the design philosophy of Java components to the server side and provides many of the required enterprise-class services, but it is no longer as simple as the JavaBean specification, in fact, in addition to the name, the EJB Beans and JavaBean no longer have any relationship.

Although many successful systems are built on the EJB, EJB never does its purpose: simplifying the development of enterprise-class applications. Declarative programming of EJBS simplifies development at the basic framework level, such as transactions and security, but on the other hand EJB becomes unusually complex in terms of supporting code implementations and deployment descriptors.

As time went on, people began to look for simpler ways to get the Java component design concept back on track. There is a new concept with respect to the EJB bean: POJO, a simple generic Java object that does not inherit or implement any other Java framework classes or interfaces.

Pojo later extended to a non-intrusive pronoun, that is to say: choose a technical framework or development framework, you can not let others based on your framework development of JavaBean rely on your framework, to achieve this goal, need to be injected through di dependency AOP and other technologies to achieve.

Objectively speaking, the development of EJBS has facilitated the Pojo-based programming model, introducing new concepts such as AOP and Di, and the latest EJB specification has never been simpler than before, but for many developers, the change is too late. By the time EJB3 was released, other Pojo-based development frameworks had become a reality standard in the Java community.

The spring framework has become a leader in a lightweight development framework based on Pojo.

JavaBean is a reusable component written in the Java language. Its method naming, construction and behavior must conform to a specific convention:

    1. This class must have a public default constructor.
    2. The properties of this class are accessed using getter and setter, and other methods conform to standard naming conventions.
    3. This class should be serializable.

Spring uses beans or JavaBean to represent application components, but this does not mean that spring components must follow the JavaBean specification. A spring component can make any form of Pojo. Pojo can be seen as a "broad definition" of JavaBean.

Spring Framework Overview

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.