Recent aspect oriented programming has become a very stylish topic in the industry. Indeed, AOP's design ideas are distinguished with future procedural design paradigms, which provide a special perspective of analyzing problems, which is very important for scale-wide software development. But I always have a suspicious attitude towards AOP, starting to be an intuition, as well as a man who is used to design philosophy of philosophy to inefficient things. Come in, many colleagues in the laboratory have begun more extensive research on AOP. I have also begun to think more about AOP.
From the most typical application of AOP, it is closer to modifying the behavior of the program with a Patch. In the later maintenance of the software, it is very effective in improving the efficiency of this method during the later maintenance process of the software. However, if you start using this method from the system modeling, is this design style more valuable? Cross Cut should be separated, but should it be separated by aspect? From the facilities provided by AspectJ, the code embedded by Aspect is is not very different from embedded a function call. If the system has a relatively clear understanding of the system, the Cross CUT behavior can be more convenient in the program in the programs. On the other hand, Aspect itself must be evolved in the development process, and Advice that may work on a program point is also evolving, and the way AOP is likely to make problems more complicated.
AOP disrupts the cohesiveness of the module. When there is no AOP, the understanding of a single module only depends on the segment of the program that can be not known. After introducing AOP, a program point can be modified in a non-invasive manner. Understanding a program is likely to be able to understand the entire Aspect code, which may make maintenance personnel, and even programmers itself in trouble. In a collaborative development environment, a programmer written by a programmer may be modified by other programmers, so the entire development team has to carefully maintain the relationship between code. Explicitly indicate the relationship between the Aspect class and the Class class, the type of Join Point may be an effective way to ensure aspect work in a more secure way. But in this way, the basic original intention of AOP is originally used to efficiently add cross-cutting functions.
How can I use AOP in a more reasonable way, I still have a lot of confusion about this, but I can't get the guidance of the high-person person, I can only explore it later.