设计模式

Creational Patterns
  • Factory - This pattern is used to create concrete class instances without specifying the exact class type.  
  • Abstract Factory - This pattern is used to create concrete class instances without specifying the exact class type. The Abstract Factory Pattern provides a way to encapsulate a group of individual factories that have a common theme.
  • Flyweight - A pattern used to maximize the sharing of objects resulting in reduced memory consumption.
  • Singleton - This pattern insures that only a single instance of a given object can exist.
  • Builder - This pattern separate the construction of a complex object from its representation so that the same construction process can create different representations..
Structural Patterns
  • Adapter - Convert the interface of a class into another interface clients expect. Adapter lets the classes work together that couldn't otherwise because of incompatible interfaces
  • Bridge - Decouples an abstraction from its implementation so that the two can vary independantly.
  • Composite - Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.
  • Decorator - Allows an objects behavior to be altered at runtime.
  • Facade - Used to provide a simpler interface into a more complicated portion of code. 
  • Proxy - Provides a Placeholder for another object to control access to it.
Behavioral Patterns
  • Chain of Responsibility - The chain of responsibility pattern is a way of communicating between objects.
  • Command - Encapsulates a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations.   
  • Iterator - Provides a way to sequentially access aggregate objects without exposing the structure of the aggregate.
  • Mediator - The mediator pattern encapsulate the interaction between a set of objects.
  • Memento - Allows you to save the state of an object externally from that object.
  • Observer - Allows a single object to notify many dependent objects that its state has changed.
  • State - Allows an object to change its behaviour when its internal state changes.
  • Strategy - Allows multiple algorithms to be used interchangeably at runtime.
  • Visitor - The visitor design pattern enables us to create new operations to be performed on an existing structure.
  • Template Method -  Defines the skeleton of an algorithm then lets subclasses implement the behaviour that can vary.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值