Advantages of spring ioc aop

Source: Internet
Author: User

What are the advantages of spring?
1. Reduced coupling between components and realized decoupling between layers of software
2. You can use many services that are easy to provide, such as transaction management and message service.
3. Container supports Singleton Mode
4. The Container provides the AOP technology, which can easily implement functions such as permission interception and runtime monitoring.
5. The Container provides many helper classes to accelerate application development.
6. spring provides integration support for mainstream application frameworks, such as hibernate, JPA, and Struts.
7. spring is a low-intrusion design with extremely low code pollution
8. Independent from various application servers
9. The di mechanism of spring reduces the complexity of Business Object replacement.
10. Spring is highly open and does not force applications to rely entirely on Spring. developers can freely choose some or all of spring's

What is DI mechanism?
Dependecy Injection and Inversion of Control are the same concepts. Specifically, when a role
When another role is needed, in the traditional programming process, the caller usually creates the instance of the caller. But in spring
Creating a caller is no longer done by the caller. Therefore, it is called control inversion. Spring completes the creation of the called USER and then injects the caller
Therefore, it is also called dependency injection.
Spring Manages objects in a dynamic and flexible manner, and sets injection and constructor injection in two ways.
Advantages of Setting Injection: intuitive and natural
Advantage of constructor injection: you can determine the order of dependencies in the constructor.

What is AOP?
Improve spring dependency injection (DI) for Aspect-oriented programming (AOP). Aspect-Oriented Programming mainly involves two aspects in spring.
1. Declarative Transaction Management for Aspect-Oriented Programming
2. spring supports custom aspect

Aspect-oriented programming (aop) is a supplement to Object-Oriented Programming (oop,
Object-Oriented Programming splits the program into objects at various layers, and object-oriented programming splits the program running process into various sections.
AOP considers the program structure from the perspective of program running and extracts the aspect of the business processing process. oop is a static abstraction, and aop is a dynamic abstraction,
Abstract The steps in the application execution process to obtain the logical division between steps.

The aop framework has two features:
1. Good isolation between steps
2. Source Code independence

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.