AOP (GO)

Source: Internet
Author: User

What is AOP?
AOP (aspect-oriented programming), aspect-oriented programming, looks pretty similar to OOP (object-oriented programming), but what difference does it actually make? OOP has encapsulation, inheritance, polymorphism and other things to define from the top to the bottom of this hierarchical relationship, but to achieve from left to right relationship between the beginning a little acclimatized, such as the user's permission control, operation Log, and so on, these and we want to achieve the core function is not very related to the things scattered in our code around, show very bad. So we introduced the pattern of AOP.

We usually implement a page logic, usually along with the operation of the log, security monitoring, transaction processing and other logic, in the implementation of the logic of the time to write a lot of this code. AOP is to encapsulate these logic code that is not related to the principal business, but also to serve the business, and to reduce the coupling between modules. The cylinder in the good example of our business process, AOP represents the horizontal operation, commonly known as cutting-plane programming. Perhaps the above theory is a bit of a headache, for AOP My general understanding is: The business core is not very relevant to the assorted of things independent, each time the business core is implemented before or after the call to the corresponding method.

AOP has a lot to do with this aspect programming, such as verifying logins, permissions, performance checks, error logging, and so on, and the purpose of AOP is to isolate these things and let developers focus on their core concerns.

Http://www.cnblogs.com/powerdk/p/4150112.html

AOP (GO)

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.