Design Patterns
文章平均质量分 64
iorichang
if (share.makesHappiness()) doSharing();
展开
-
Design Patterns Overview
Design Patterns Part 0/4: Overview目录Design Patterns Part 04 Overview目录什么是GoF用途划分依据具体分类1Summary什么是GoF?提到设计模式,就不得不提到GoF。 1994年,Erich Gamma, Richard Helm, Ralph Johnson 和 John Vlissides 出版了一本名叫De原创 2016-05-30 14:11:42 · 396 阅读 · 0 评论 -
Structural Patterns Part 7/7: Proxy Pattern
Structural Patterns Part 7/7: Proxy Pattern目录Structural Patterns Part 77 Proxy Pattern目录DefinitionUML Class DiagramImplementationDefinitionProxy Pattern提供了一种控制Real Object的创建和访问的方式,它通常代替了Real Objec原创 2016-06-06 18:58:45 · 264 阅读 · 0 评论 -
Behavioral Patterns Part 2/11: Command Pattern
Behavioral Patterns Part 2/11: Command Pattern目录Behavioral Patterns Part 211 Command Pattern目录DefinitionUML Class DiagramImplementationDefinitionCommand Pattern 把一个请求封装成对象,从而使客户端可以更灵活的处理请求,包括 请求队列原创 2016-06-27 17:09:59 · 808 阅读 · 0 评论 -
Behavioral Patterns Part 1/11: Chain Of Responsibility Pattern
Behavioral Patterns Part 1/11: Chain Of Responsibility Pattern目录Behavioral Patterns Part 111 Chain Of Responsibility Pattern目录DefinitionUML Class DiagramImplementationDefinition通过给每一个receiver有机会来接原创 2016-06-11 20:50:50 · 473 阅读 · 0 评论 -
Structural Patterns Part 5/7: Facade Pattern
Structural Patterns Part 5/7: Facade Pattern目录Structural Patterns Part 57 Facade Pattern目录DefinitionUML Class DiagramImplementationDefinitionFacade Pattern提供这样一个类,这个类里的方法需要做一系列的动作才能完成一件事情。一句话: On原创 2016-06-04 16:30:48 · 365 阅读 · 0 评论 -
Structural Patterns Part 4/7: Decorator Pattern
Structural Patterns Part 4/7: Decorator Pattern目录Structural Patterns Part 47 Decorator Pattern目录DefinitionUML Class DiagramImplementationDefinitionDecorator Pattern是对一个已有对象的再封装,可以说实现了一个Wrapper的功能。原创 2016-06-03 13:16:28 · 392 阅读 · 0 评论 -
Structural Patterns Part 1/7: Adapter Pattern
Structural Patterns Part 1/6: Adapter Pattern目录Structural Patterns Part 16 Adapter Pattern目录DefinitionUML Class DiagramImplementationDefinitionAdapter Pattern是连接两个互不兼容或者互相独立的类或接口的桥梁。一个现实中的例子就是读卡器,原创 2016-06-01 18:54:35 · 292 阅读 · 0 评论 -
Structural Patterns Part 2/7: Bridge Pattern
Structural Patterns Part 2/6: Bridge Pattern目录Structural Patterns Part 26 Bridge Pattern目录DefinitionUML Class DiagramImplementationDefinitionBridge Pattern是分离抽象和接口的模式,这样抽象的实现类就不用与接口紧密的耦合在一起了。一句话:原创 2016-06-02 13:41:48 · 563 阅读 · 0 评论 -
Structural Patterns Part 3/7: Composite Pattern
Structural Patterns Part 3/6: Composite Pattern目录Structural Patterns Part 36 Composite Pattern目录DefinitionUML Class DiagramImplementationDefinitionComposite Pattern是这样一种模式:它把一系列对象组合起来,形成一个树状的结构来代原创 2016-06-02 19:28:37 · 414 阅读 · 0 评论 -
Structural Patterns Part 6/7: Flyweight Pattern
Structural Patterns Part 6/7: Flyweight Pattern目录Structural Patterns Part 67 Flyweight Pattern目录DefinitionUML Class DiagramImpementationDefinitionFlyweight Pattern 主要是用来减少对象的创建次数从而降低内存占用,提升性能的。Fly原创 2016-06-06 09:41:21 · 377 阅读 · 0 评论 -
Creational Patterns Part 1/5: Factory Pattern
Creational Patterns Part 1/5: Factory Pattern目录Creational Patterns Part 15 Factory Pattern目录DefinitionUML Class DiagramImplementationDefinitionFactory Pattern是Java中最常用的设计模式之一。这个模式属于Creational Patt原创 2016-05-30 16:09:43 · 489 阅读 · 0 评论 -
Creational Patterns Part 2/5: Abstract Factory Pattern
Creational Patterns Part 2/5: Abstract Factory Pattern目录Creational Patterns Part 25 Abstract Factory Pattern目录DefinitionUML Class DiagramImplementationDefinitionAbstract Factory原创 2016-05-30 20:47:22 · 489 阅读 · 0 评论 -
Creational Patterns Part 3/5: Singleton Pattern
Creational Patterns Part 3/5: Singleton Pattern目录Creational Patterns Part 35 Singleton Pattern目录DefinitionUML Class DiagramImplementationDefinitionSingleton Pattern应该是设计模式中最简单的模式之一了。该模式保证一个类只会产生一个原创 2016-05-30 22:13:30 · 306 阅读 · 0 评论 -
Creational Patterns Part 5/5: Prototype Pattern
Creational Patterns Part 5/5: Prototype Pattern目录Creational Patterns Part 55 Prototype Pattern目录DefinitionUML Class DiagramImplementationDefinitionPrototype Pattern会根据指定的Prototype(原型)去制造(Make)而不是创原创 2016-05-31 01:55:34 · 325 阅读 · 0 评论 -
Creational Patterns Part 4/5: Builder Pattern
Creational Patterns Part 4/5: Builder Pattern目录Creational Patterns Part 45 Builder Pattern目录DefinitionUML Class DiagramImplementationDefinitionBuilder Pattern使用一些简单的对象来build一个复杂的对象,逐步完成build的过程。在F原创 2016-05-30 23:17:59 · 403 阅读 · 0 评论 -
Behavioral Patterns Part 3/11: Interpreter Pattern
Behavioral Patterns Part 3/11: Interpreter Pattern目录Behavioral Patterns Part 311 Interpreter Pattern目录DefinitionUML ClassImplementationDefinitionInterpreter Pattern 是这样一种模式(援引GoF的定义):给定一种语言(langua原创 2016-06-30 15:25:38 · 378 阅读 · 0 评论