Design mode first discussion outline

xiaoxiao2021-03-06  37

A pair of design patterns

basic concepts

Design mode species and classification

How to create, combine representations

THE Simple Factory

The factory method

The Abstract Factory Pattern

The Singleton Pattern

The Builder Pattern

The Prototype Pattern

How to combine a larger structure

The Adapter Pattern

The Bridge Pattern

The Composite Pattern

The Decorator Patter

The façade pattern

The Flyweight Pattern

The Proxy Pattern

The allocation of the algorithm and inter-object responsibilities not only describe objects or classes, but also describes communication methods

Chain of Responsibility

THE Command Pattern

The Interpreter Pattern

The iterator patter

The Mediator Pattern

The Memento Pattern

The Observer Pattern

The State Pattern

THE Strategy Pattern

THE TEMPLATE METHOD PATTERN

The Visitor Pattern

l Main implementation method Abstract, inherit, gathered

l For system designers, help mutual understanding and improve design level; familiar with Case tools, understand some concepts in .NET;

l Relationship between reconstruction and design patterns

l

2 The corresponding issues in the development of the development

l No abstract class

l No inheritance

For example, passenger class and employee

Basic definition and language implementation of three UML maps

The writing of class diagrams, inherits, indicates that the representation of the combination, the representation of each other; examples P.242 /

Four Visitor as an example, explore how to learn design patterns

l The role: acting on each element operation in an object structure, defining a new operation without changing the class, separating the actual operation with the object itself;

l Interface:

l code implementation:

The class itself does not need to know what needs to be implemented. It is determined by calling, adding a Visitor subclass. When the call is called, change ELEMENT's processing method by changing the type of Vistor as this new subclass, not Need to change the operation of the Element itself, the operation result is reflected by Visitor. .NET example, EMP / BOSS

l How to write if you press us?

转载请注明原文地址:https://www.9cbs.com/read-64628.html

New Post(0)