随笔分类 -  Design Pattern

In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn't a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.
Design Pattern----07.Structural.Adapter.Pattern (Delphi Sample)
摘要:IntentConvert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces. Wrap an existing class with a new interface. Impedance match an old component to a new system ProblemAn “off the shelf” compone 阅读全文

posted @ 2011-06-22 13:34 Tony Liu 阅读(4396) 评论(0) 推荐(0)

Design Pattern----06.Creational.Singleton.Pattern (Delphi Sample)
摘要:IntentEnsure a class has only one instance, and provide a global point of access to it. Encapsulated “just-in-time initialization” or “initialization on first use”. ProblemApplication needs one, and only one, instance of an object. Additionally, lazy initialization and global access are necessary.Di 阅读全文

posted @ 2011-06-17 17:19 Tony Liu 阅读(764) 评论(0) 推荐(0)

Design Pattern----05.Creational.Prototype.Pattern (CSharp Sample)
摘要:IntentSpecify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype. Co-opt one instance of a class for use as a breeder of all future instances. The new operator considered harmful. ProblemApplication “hard wires” the class of object to creat 阅读全文

posted @ 2011-06-17 16:37 Tony Liu 阅读(525) 评论(0) 推荐(0)

Design Pattern----04.Creational.Object Pool.Pattern (Java Sample)
摘要:IntentObject pooling can offer a significant performance boost; it is most effective in situations where the cost of initializing a class instance is high, the rate of instantiation of a class is high, and the number of instantiations in use at any one time is low.ProblemObject pools (otherwise know 阅读全文

posted @ 2011-06-17 14:47 Tony Liu 阅读(702) 评论(0) 推荐(0)

Design Pattern----03.Creational.FactoryMethod.Pattern (Delphi Sample)
摘要:Intent Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses. Defining a “virtual” constructor... 阅读全文

posted @ 2011-06-17 14:14 Tony Liu 阅读(948) 评论(0) 推荐(0)

Design Pattern----02.Creational.Builder.Pattern (Delphi Sample)
摘要:Intent Separate the construction of a complex object from its representation so that the same construction process can create different representations. Parse a complex representation, create one of s... 阅读全文

posted @ 2011-06-17 13:44 Tony Liu 阅读(1099) 评论(0) 推荐(0)

Design Pattern----01.Creational.AbstractFactory.Pattern (Delphi Sample)
摘要:Intent Provide an interface for creating families of related or dependent objects without specifying their concrete classes. A hierarchy that encapsulates: many possible “platforms”, and the construct... 阅读全文

posted @ 2011-06-16 17:33 Tony Liu 阅读(724) 评论(0) 推荐(0)

Design Pattern----00.Summary
摘要:In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn't a finished design that can be transformed directly... 阅读全文

posted @ 2011-06-16 17:33 Tony Liu 阅读(281) 评论(0) 推荐(0)

Design Pattern----Creational.Pattern
摘要:Creational patternsIn software engineering, creational design patterns are design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situation. The basic form of object creation could result in design problems or added complexity to the design. C 阅读全文

posted @ 2011-06-16 17:33 Tony Liu 阅读(398) 评论(0) 推荐(0)

设计模式
摘要:序号样式说明00.设计模式简介1抽象工厂(Abstract Factory)提供一个接口来构建一群(families)相关(related)或相依(dependent)的对象;而无须具体指定(specify)它们的具体类别。02.Abstract Factory1建设者(Builder)将一个复杂对象的构建方法(construction)从其表现;(representation)中分离开来以便同样的构建方法可以建立不同的表现。03.Builder1工厂方法(Factory Method)工厂方法定义构建对象的接口;但是让子类别决定哪一个类别构建实体对象(instantiate),工厂方法将构建 阅读全文

posted @ 2011-06-09 22:40 Tony Liu 阅读(355) 评论(1) 推荐(0)

导航