The task in the last two weeks is not very heavy. For a rookie who has just been on the job for 4 months, it is impossible to learn design patterns and use them flexibly. But when I asked my tutor what I needed to learn? “Java Design Patterns, this must be learned,” was the curt sentence that dismissed me. I spent nearly two weeks reading part of the Java Design Pattern, Google blog summary and sample display, reading some Java source code, let me have a comprehensive understanding of the Java design pattern.

Next, I will take time each week to present my understanding of Java design patterns, summarize the experiences of my predecessors, and integrate them into my projects to try to use simple design patterns and digest and compare the differences between different design patterns.

(I) Java design patterns fall into three broad categories:

(1) Creative design patterns (5 kinds) : factory method pattern, abstract factory pattern, singleton pattern, Builder pattern, prototype pattern;

(2) Structural design mode (7 kinds) : adapter mode, decorator mode, agent mode, combination mode, appearance mode, share yuan mode, bridge mode;

(3) Behavioral design patterns (11 kinds) : interpreter pattern, template pattern, visitor pattern, intermediary pattern, strategy pattern, memo pattern, state pattern, observer pattern, iterator pattern, command pattern, responsibility chain;

(II) Classification and interpretation of three different design modes:

(1) Creation mode: in software design, object creation and object use are separated, because object creation will consume a lot of resources of the system, so the creation of objects will be studied separately, so that efficient creation of objects is the creation mode to discuss the problem;

(2) Structural mode: how to design the structure, inheritance and dependency of the object will affect the maintenance of the subsequent program, the robustness of the code, coupling, etc., and many developers need to pay attention to it;

(3) Behavior mode: Behavior mode not only describes the mode of objects or classes, but also describes the communication mode between them; These patterns capture the difficulty of tracking complex control flows at runtime, and they shift your focus from control flows to how objects are connected; Behavior class patterns use inheritance mechanisms to dispatch behavior between classes, such as template patterns; Behavioral patterns use object aggregation and composition rather than inheritance. Some behavior object patterns describe how a group of peer objects collaborate to accomplish tasks that none of them can accomplish alone, such as the chain of responsibility, mediator and observer patterns, and so on.

(III) The list of specific design modes is as follows:

Come on, keep up, I will continue to update the Java design pattern list display, supervised learning together!

Create mode:

Java Design Patterns singleton: blog.csdn.net/super_YC/ar…

Java Design Patterns simple Factory Patterns: blog.csdn.net/super_YC/ar…

Java Design Patterns factory Method Pattern: blog.csdn.net/super_YC/ar…

Java Design Patterns abstract Factory Patterns: blog.csdn.net/super_YC/ar…

Java Design Patterns Builder Mode: blog.csdn.net/super_YC/ar…

Java Design Patterns prototype: blog.csdn.net/super_YC/ar…

Structural mode:

Java Design Patterns: blog.csdn.net/super_YC/ar…

Java Design Pattern appearance mode: blog.csdn.net/super_YC/ar…

Java Design Patterns proxy mode: blog.csdn.net/super_YC/ar…

Decorator mode for Java Design Patterns: blog.csdn.net/super_YC/ar…

Java Design Patterns bridge mode: blog.csdn.net/super_YC/ar…

Java Design Patterns adapter pattern: blog.csdn.net/super_YC/ar…

Behavioral patterns:

Java Design Pattern iterator pattern: blog.csdn.net/super_YC/ar…

Visitor Patterns for Java Design Patterns: blog.csdn.net/super_YC/ar…

Java Design Patterns Mediator Pattern: blog.csdn.net/super_YC/ar…

Java Design Patterns Strategy Patterns: blog.csdn.net/super_YC/ar…

Java Design Patterns observer Mode: blog.csdn.net/super_YC/ar…

Java Design Mode command mode: blog.csdn.net/super_YC/ar…

Java Design Patterns Memo mode: blog.csdn.net/super_YC/ar…

Java Design Patterns template pattern: blog.csdn.net/super_YC/ar…

Java Design Patterns state mode: blog.csdn.net/super_YC/ar…

Java Design Pattern’s Chain of Responsibility pattern: blog.csdn.net/super_YC/ar…