Mainly divided into two parts of the IOC and AOP.
IoC: Control reversal
In the use of JavaBean, we basically use the factory model, we need to plant class production objects, and then the corresponding data into the object, inevitable, factory classes and objects still have a certain degree of coupling, in the code to modify or expand the need to change several classes, The idea of the IOC is that the process of producing objects and assigning values to the factory is independent, taking the outside of the factory and using the configuration file to complete the process.
AOP: Slice-oriented programming
In front of the interceptor section of struts, in fact, the idea is that for many actions, if you use the idea of OOP before, you need to write a method to each object, which is obviously not efficient, the best solution is for the execution of a certain action, When it comes to a pointcut, we put the section code in, and the idea is that it's a facet-oriented programming idea.