Introduction to AOP technology-(Introduction)

Source: Internet
Author: User
Software design is gradually enriched by the introduction of object-oriented ideas. The essence of "Everything is an object" simplifies the logic to be processed in the program world. developers can use a group of objects and the relationships between these objects to visually express the software system. From the definition of objects, to the definition of modules, to the definition of components, the idea of encapsulation, inheritance, and Polymorphism of object-oriented ideas enables software system development to step by step like building a house, from bricks and stones to floors, and then to the completion of the whole building. The Application of Object-oriented thinking can shorten the development cycle when designing systems with larger scales and more complex logic. Naturally, it is necessary to apply the development definition of software engineering, process control of processes, and quality defect management. However, from the technical details, the object-oriented design technology is remarkable. However, the only problem with object-oriented design is that it is static and closed in nature, and minor changes to any requirement may have a significant impact on the development progress.

The possible solution to this problem is the design mode. Gof records the design experience of object-oriented software as a design pattern. It allows people to reuse the successful design and architecture more easily and easily, and helps developers make choices that are conducive to system reuse. The design pattern solves specific design problems, makes object-oriented design more flexible and elegant, and achieves better reusability. However, although the Design Pattern provides us with a design model and criterion, we can use the object-oriented features to the greatest extent, such as inheritance and polymorphism, separation of responsibility, and inversion of dependency, abstract-oriented and interface-oriented, finally designs flexible, scalable, and reusable class libraries and components, and the entire system architecture. In the design process, various modes are used to demonstrate the behavior, exposed interfaces, relationships between objects, and forms of objects at different layers. However, in view of the particularity of object encapsulation, the tentacles of the "Design Pattern" are always in the interface and abstract, while there is nothing to do with the internal objects.

Aspect-oriented programming (AOP) can solve this problem exactly. It allows developersDynamicModify the static oo model to construct a system that can continuously grow to meet new requirements, just as objects in the real world will constantly change themselves in their lifecycles, applications can also have new features in development. AOP utilizes aCross-cutting"Technology, anatomy of the encapsulated object, andAffects the behavior of multiple classes encapsulated into a reusable module, and its name is "aspect", that is, the aspect. The so-called "aspect" refers to the logic or responsibility for calls by business modules that are irrelevant to the business, such as transaction processing, log management, and permission control, encapsulated to reduce repeated system code, reduce coupling between modules, and facilitate future operability and maintainability.

Aspect-oriented programming (AOP) is a programming paradigm invented by Xerox PARC in the 1990s s of the Xerox Corporation. However, the real development has emerged in recent years, the research on software design is in the ascendant. As software systems become more and more complex, large enterprise-level applications needCore BusinessAndPublic BusinessSeparated. The AOP technology is precisely by writing code for cross-cutting concerns, that is, "aspect ",Isolate Common ServicesTo form a unified functional architecture. It canBusiness LogicThe same asGeneral ServiceThis separation frees developers from repetitive efforts to solve general services, and focuses only on the core business logic of the enterprise. Therefore, the AOP technology has received more and more attention, and the AOP technology applied to various platforms has also emerged. However, compared with the mature OOP technology, the AOP technology has yet to be improved in terms of performance, stability, and applicability. At the same time, the AOP technology has not yet formed a unified standard, this makes the research of AOP technology more cutting-edge exploration value.

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.