What is Spring? What is Spring?

Source: Internet
Author: User

Spring Overview:

Spring is an open source framework that has been developed to address the complexities of enterprise application development.

From a simple, test-and loosely-coupled perspective, no Java application can benefit from spring.

In short, spring is a lightweight control inversion (IOC) and a facet-oriented (AOP) container framework.


Spring Main Features:
Light Weight:

Spring is lightweight in terms of both size and cost. In addition, spring is non-intrusive, using spring, our class or the Pojo class,

There is no need to inherit and implement spring classes and interfaces at all. In other words, spring's application does not depend on the specific class that implements SPIRNG.

IOC:

One of the most important concepts in spring. Spring facilitates loose coupling by controlling the inversion technique. When the IOC is applied,

Other objects that an object relies on are passed in passively, rather than creating or locating objects themselves. To think that the IOC is the opposite of Jndi,

It's not our own control. The object looks for dependencies from the container, but instead the container actively passes the dependency to it when the object is initialized, which is the injection dependency and also the control reversal.

Basically, the object does not have to be managed and created by itself, and is managed entirely by the container.

Aop:

Spring provides the aspect-oriented programming support that AOP extracts from content unrelated to the program's business, and the application object simply implements what they should do-that is, the business logic-that's all.

The Application object is not responsible for other system-level concerns, such as logging or transactional support. AOP cuts business-agnostic logic into real logic.

Container:

Spring includes and manages the configuration and lifecycle of the Application object, in this sense it is a container, you can individually configure how each of your beans is created, possibly based on a configurable prototype (prototype), Your bean can create a separate instance or generate a new instance each time it is needed, and how they relate, and the spring container is lightweight at the same time.

Framework:

Spring is able to combine simple component configurations into complex applications. In spring, the Application object is a combination of declarative expressions. Spring also provides a lot of basic functionality (transaction management, persistence framework integration, and so on), and users have many other time and effort to develop application logic.

These features of sring help us to write cleaner, more manageable and easy-to-test code. Now let's see what the basic strengths of spring are:

With spring, dependency injection and AOP are used to reduce the coupling between business logic and enhance the scalability of the system.

Integrate other frameworks to make existing technologies and frameworks easier to use. For example, the use of Hibernate, Sessionfactory, transaction management of the package, a more concise application framework hibernate.

With spring, instead of relying entirely on spring, developers are free to choose part or all of the spring framework.

Use the AOP idea to centralize business logic, reduce repetitive code, and build elegant solutions.

Low-intrusive design with very low code contamination.


Summarize:

Spring is dedicated to solving the various layers of the Java EE application, rather than focusing on a single layer of solutions. Can say spring is the "one-stop" choice of enterprise application development, and runs through the performance layer, the business layer, the persistence layer.

While Spring is a one-stop solution to the entire project problem, spring does not want to replace the existing frameworks, but rather seamlessly integrate them with them. Spring can reduce the difficulty of using various frameworks, it provides direct support for various excellent frameworks-struts2, Hiernatequartz and so on.

The main purpose of using spring is to make Java EE easy to use and promote good programming habits, and Spring's goal is to make existing technologies easier to use.

So, the important idea of spring is integration and compatibility.


What is Spring? What is Spring?

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.