General paradigm of the third lesson (3)
3.3-Slice paradigm--looking at problems from many angles
Transverse as the ridge side Chengfeng--"Su Shi-lin-xi wall"
Keywords: programming paradigm, Soc,dry,aop,aspect,join Point,pointcut,advice,oop
Summary: A brief talk on AOP
? Questions
What are SOC and dry?
How to effectively avoid disordered, loose, repetitive code?
What are the principles of abstraction and decomposition?
What are crosscutting concerns?
What is the difference between an access point and a pointcut?
What is knitting? What are the different knitting methods?
What are the steps to implement AOP?
Why is AOP a complement to OOP?
Why advocate reading the original books and materials as much as possible?
: Explain
As soon as the break was over, the quotes reopened the topic: "OOP is in the ascendant and AOP is starting to emerge again." Is AOP a complement, a branch or an transcendence of oop? ”
Exclamation: "OOP has not fully digested, but also what AOP." ”
"Different people take different attitudes towards new things. "Colon Wang," fans tend to blindly sought after, lest outdated, they believe that the trendy, popular is good; the old school tends to instinct resistance, avoid novelty, they think the classic, traditional is good. ”
The quotes and the exclamation marks look at each other and reluctantly put on the old hat they were handing out.
The colon continued: "From a macroscopic point of view, there is nothing new in the sun--AOP is no more than the SOC principle and the dry principle of an application; from the microscopic point of view, the sun every day is a fresh--aop from the soil of the OOP, but from the barrier self-contained, and grafted to the non-OOP Not only in the pure process language, functional language, and even logical language development, but also has a certain declarative language features, as a new way of software modularization. ”
Question mark Raise your hand: "What is SOC and dry?" ”
Quotation mark: "Soc is separation of concerns, which is separation of concerns; dry is don ' t Repeat yourself, that is, to minimize duplication of code. ”
"The answer is right, add very!" "The colon drama," The bad code usually has two kinds of symptoms: first, the structure is chaotic, or gather to tangle knot, or scatter to pieces, second is code repetition, duplication, bloated unbearable. An effective way to treat this type of illness is to abstract and decompose: abstract some concerns from the problem and then decompose it on this basis. After the decomposition of the problem of the subject is distinct and independent and complete, neither far-reaching, nor fragmented, fragmentation. At the same time, the part with the same characteristics can be extracted as the common factor in algebra, which improves the reusability and reduces the repeatability. ”