Design pattern - agent pattern
proxy pattern
Proxy Pattern refers to providing a proxy for other objects to control access to this object. It belongs to structural pattern. In some cases, an object is inappropriate or cannot directly reference another object, and the proxy object can act as an intermediary between the client and the target object.
The agent mode generally ...
Posted by dave_c00 on Thu, 30 Dec 2021 02:07:16 +0100
The builder of design pattern
Builder mode
Meaning: generator mode is a creation mode, which enables you to create complex objects step by step. You can use the same creation code to generate objects of different types and forms.
Looking at the picture, we can well understand that the picture is the assembly line mode in the factory. The builder is like the whole assemb ...
Posted by $0.05$ on Thu, 30 Dec 2021 01:58:06 +0100
Spring source code analysis the third bullet - AOP aspect programming analysis
Finally to AOP, the front did not understand must follow the code to read more, otherwise this article is easy to get lost! If you don't say much, you can't change without its sect. First, the picture above.
AOP sequence diagram
Source code analysis
1. Initialization phase - > method of matching tangent points
Go back to abstractautowi ...
Posted by mpharo on Wed, 29 Dec 2021 03:35:49 +0100
Basic understanding of design patterns
Baidu definition: design mode (Design pattern) is a set of code design experience that is repeatedly used, known by most people, classified and catalogued. The purpose of using design patterns is to reuse code, make code easier to be understood by others and ensure code reliability. There is no doubt that design patterns win more for themselves ...
Posted by sarika on Tue, 28 Dec 2021 14:52:57 +0100
Dimitt's law
Basic introduction
1) One object should have minimal knowledge of other objects
2) The closer the relationship between classes, the greater the degree of coupling
3) The Demeter Principle is also called the least known principle, that is, the less a class knows about the class it depends on, the better. That is, no matter how complex the dep ...
Posted by ron814 on Tue, 28 Dec 2021 12:57:27 +0100
Advanced learning journey - design mode (decorator mode & observer mode)
1. Course objectives
1. Master the characteristics and application scenarios of decorator mode.
2. Master the fundamental difference between decorator mode and adapter mode.
3. Application and implementation principle of observer mode in source code.
4. Understand the advantages and disadvantages of decorator mode and observer mode.
2. ...
Posted by ronniebrown on Tue, 28 Dec 2021 07:06:05 +0100
java uses static inner classes to realize chain calls
Usage scenario This is very important, because if you learn something and don't know what problem to solve, what's the use? The importance of understanding the usage scenario is much higher than whether you will implement this mode, because as long as you know what problems can be solved by using the builder mode, you can complete it after inve ...
Posted by WD.Gh0st on Tue, 28 Dec 2021 00:00:02 +0100
Behavioral model - memo model
Catalogue of series articles
Design pattern - design principle
Create mode - singleton mode (I) Creation mode - factory mode (II) Creation mode - prototype mode (III) Creative mode - builder mode (4)
Structural mode - adapter mode (I) Structural mode - bridge mode (II) Structural mode - decorator mode (III) Structural mode - combined mode ...
Posted by pete07920 on Mon, 27 Dec 2021 17:47:54 +0100
Common design patterns for Android Development
In the book design patterns: the basis of reusable object-oriented software published by GoF, 23 design patterns are recorded. The essence of these design patterns is the understanding of encapsulation, inheritance and polymorphism of object-oriented design. There are 8 design patterns used in app development.
Singleton mode
Singleton pattern ...
Posted by PHP Newb on Mon, 27 Dec 2021 00:01:44 +0100
Record of Head First design mode -- observer mode
The observer pattern defines a one to many dependency. When an object changes state, all its dependents will receive notification and update data.
For example, we commonly set up monitoring, button Setonclicklistener is also a kind of observer.
Core concerns
The observer and the observed are loosely coupled. The observed only needs to know t ...
Posted by HuggieBear on Sun, 26 Dec 2021 16:32:43 +0100