06 2020 档案
摘要:名称: 中介者模式(Mediator Pattern)-对象行为型模式 问题: The Mediator pattern simplifies communication among objects in a system by introducing a single object that ma
阅读全文
摘要:名称: 观察者模式(Observer Pattern)-对象行为型模式 问题: Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all i
阅读全文
摘要:名称: 状态模式(State Pattern)-对象行为模式 问题: The State pattern allows an object to alter its behavior when its internal state changes. The object appears to cha
阅读全文
摘要:名称: 责任链模式 (Chain of Responsibility Pattern)-对象行为型模式 问题: The Chain of Responsibility pattern establishes a chain within a system, so that a message can
阅读全文
摘要:名称: 命令模式(Command Pattern)-对象行为型模式 问题: The Command pattern encapsulates a request in an object, which enables you to store the command, pass the comman
阅读全文
摘要:名称: 策略模式(Strategy Pattern)-对象行为模式 问题: The intent of the Strategy Pattern is to define a family of algorithms, encapsulate each algorithm, and make the
阅读全文
摘要:名称: 模板方法模式(Template Method Pattern)-类行为型模式 问题: The Template Method pattern provides a method that allows subclasses to override parts of the method wi
阅读全文
摘要:名称: 组合模式(Composite Pattern)-对象结构型模式 问题: Compose Objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individ
阅读全文
摘要:名称: 享元模式(Flyweight Pattern)-对象结构型模式 问题: The flyweight design pattern enables use sharing of objects to support large numbers of fine-grained objects e
阅读全文
摘要:名称: 外观模式(Facade Pattern)-对象结构型模式 问题: The Facade pattern provides a unified interface to a group of interfaces in a subsystem. The Facade pattern defin
阅读全文
摘要:名称: 装饰模式(Decorator Pattern)-对象结构型模式 问题: Wikipedia: The decorator pattern can be used to extend (decorate) the functionality of a certain object static
阅读全文
摘要:名称: 桥接模式(Bridge Pattern)-对象结构型模式 问题: Bridge pattern decouples an abstraction from its implementation so that the two can vary independently. 将抽象部分与它的实
阅读全文
摘要:名称: 适配器模式(Adapter Pattern)-类对象结构型模式 别名:包装器Wrapper 问题: The Adapter pattern acts as an intermediary between two classes, converting the interface of one
阅读全文
摘要:名称: 代理模式(Proxy Pattern)-对象结构型模式 问题: The Proxy design pattern Provides a surrogate or placeholder for another object to control access to it. 为其他对象提供一种
阅读全文
摘要:名称: 原型模式(Prototype Pattern)-对象创建型模式 问题: Specify the kind of objects to create using a prototypical instance, and create new objects by copying this pr
阅读全文
摘要:名称: 建造者模式(Builder Pattern)-对象创建型模式 问题: Separate the construction of a complex object from its representation so that the same construction process can
阅读全文
摘要:名称: 抽象工厂模式(Abstract Factory Pattern)-对象创建型模式 问题: Provide an interface for creating families of related or dependent objects without specifying their c
阅读全文
摘要:名称: 工厂方法(FactoryMethod Pattern)-对象创建型模式。 问题: 定义一个用于创建对象的接口,让子类决定实例化哪一个类。工厂方法使一个类的实例化延迟到其子类。 Define an interface for creating an object,but let subclas
阅读全文
摘要:名称: 单例模式(Singleton Pattern)-对象创建型模式。 问题: 保证一个类仅有一个实例,并提供一个访问它的全局访问点 Ensure a class has only one instance, and provide a global point of access to it.
阅读全文
摘要:设计模式是软件开发过程中解决特定问题的一些经验总结。 为什么要学习设计模式 记得读研时,啃了几天GoF的《设计模式:可复用面向对象软件的基础》,觉得一头雾水,那时的项目经验比较少,没觉得这么做有什么道理。 后来代码撸多了,觉得到了瓶颈,就又拾起了设计模式。 再次看设计模式,发现目的是好的,但抽象能力
阅读全文