AOP and OOP a little difference

xiaoxiao2021-03-06  47

AOP - Aspect Oriented Programming, facing aspects, from literal and object-oriented programming. However, the two still have a big difference in design ideas.

A step or stage of the AOP bias business process, emphasizes the coupling of the module to make the code have better portability.

Object-oriented programming is a method and attribute of the entity extracted in business analysis. It can also be said AOP is a verb field facing business, OOP is facing a noun.

A very important feature of AOP is that the source code is independent, that is, if the AOP component is referenced in our system, even if we remove the component, the system code should be able to compile. To achieve this, you can use dynamic proxy mode, this already implemented in Spring, the transaction management in Spring uses AOP. (Take a good look at Spring in the near future, a very good stuff)

转载请注明原文地址:https://www.9cbs.com/read-83264.html

New Post(0)