
Design Pattern
NonStatic
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
一句话Design Pattern:Bridge
定义:The bridge pattern is a design pattern used in software engineering which is meant to "decouple an abstraction from its implementation so that the two can vary independently". The bridge uses encap原创 2015-09-04 23:57:31 · 462 阅读 · 0 评论 -
一句话Design Pattern:Decorator
定义:The Decorator Pattern attaches additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.一句话:Subclass里面有一个base class原创 2015-09-04 23:56:34 · 302 阅读 · 0 评论 -
我的“一句话Design Pattern”
当年备战高考作文,无奈读书太少,每逢写议论文总是内容干瘪,没有论据。遂与同学相约借来“名人轶事六百则”上下册潜心研究。但总是看后面就忘前面,事后查找起来也不甚方便。终于决定一人一本,各花了一个月的课余时间,把每一个故事总结成一行字,然后复印了交换背熟。结果发现效果很好,每篇作文至少能弄出三五个故事充场面,两人作文最终以高分收场。后来看design pattern,几十个pattern看下来也是狗熊原创 2015-09-04 23:56:26 · 278 阅读 · 0 评论 -
一句话Design Pattern:Template Method
定义:The Template Method Pattern defines the skeleton of an algorithm in a method, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without chan原创 2015-09-04 23:56:58 · 321 阅读 · 0 评论 -
一句话Design Pattern:Command
定义:The Command Pattern encapsulates a request as an object, thereby letting you parameterize other objects with different requests, queue or log requests, and support undoable operations.一句话:把一个reques原创 2015-09-04 23:56:50 · 315 阅读 · 0 评论 -
一句话Design Pattern:Facade
定义:The Facade Pattern provides a unified interface to a set of interfaces in a sub-system. Facade defines a higher-level interface that makes the subsystem easier to use.一句话:为了好用而给一个subsystem写一套接口类比:类原创 2015-09-04 23:56:55 · 316 阅读 · 0 评论 -
一句话Design Pattern:Abstract Factory
定义:The Abstract Factory Pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes.一句话:为了实现一组对象的创建,用object composition,每个object都可以用Fa原创 2015-09-04 23:56:42 · 365 阅读 · 0 评论 -
一句话Design Pattern:Adapter
定义:The Adapter Pattern converts the interface of a class into another interface the clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces一句话:当两原创 2015-09-04 23:56:52 · 301 阅读 · 0 评论 -
一句话Design Pattern:Singleton
定义:The Singleton Pattern ensures a class has only one instance, and provides a global point of access to it一句话:系统里有些东西只需要一个,于是控制这个东西的constructor不能被外界访问。用途:thread pool, dialog, caches, registry, etc.原创 2015-09-04 23:56:47 · 371 阅读 · 0 评论 -
一句话Design Pattern:Strategy
定义:The strategy pattern defines a family of algorithm, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.一句话:action不是object原创 2015-09-04 23:56:29 · 348 阅读 · 0 评论 -
一句话Design Pattern:Observer
定义:The Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all of its dependents are notified and updated automatically.一句话:注册+通知机制类比:不需要C#:Event o原创 2015-09-04 23:56:31 · 383 阅读 · 0 评论 -
一句话Design Pattern:Factory
定义:The Factory Method Pattern defines an interface for creating an object, but lets subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.一句话:构造一个原创 2015-09-04 23:56:39 · 369 阅读 · 0 评论