软件设计模式C#
2004-11-22 02:29
573 查看
软件设计模式C#
Software Design Patterns in C#
设计模式(Design Patterns)是你在实际应用程序开发中,对不断发现的软件设计问题的重复解决方案。设计模式是关于对象的设计和交互,关于对经常出现的软件开发挑战的一些完美和重用的解决方案,也提供了一个交流平台,
“四人帮”(GOF)模式被认为是所有其他模式的基础,23种设计模式分为3类:创建型模式(Creational Pattern),结构型模式(Structural Pattern)和行为型模式(Behavioral Pattern)。
为了让你先起步,这里提供了2种形式的源码:结构方面的(structural)和现实应用方法的(real-world)。结构方面的代码使用模式定义和UML类图中提供的类型名称,而实际应用方面的代码提供了你需要使用模式的真实设计情况。
原英文URL:
http://www.dofactory.com/Patterns/Patterns.aspx#list
上述各类模式的链接均提供了简单的解释、UML类图、Structural code(C#)和Real-world code(C#)。
Software Design Patterns in C#
设计模式(Design Patterns)是你在实际应用程序开发中,对不断发现的软件设计问题的重复解决方案。设计模式是关于对象的设计和交互,关于对经常出现的软件开发挑战的一些完美和重用的解决方案,也提供了一个交流平台,
“四人帮”(GOF)模式被认为是所有其他模式的基础,23种设计模式分为3类:创建型模式(Creational Pattern),结构型模式(Structural Pattern)和行为型模式(Behavioral Pattern)。
为了让你先起步,这里提供了2种形式的源码:结构方面的(structural)和现实应用方法的(real-world)。结构方面的代码使用模式定义和UML类图中提供的类型名称,而实际应用方面的代码提供了你需要使用模式的真实设计情况。
Creational Patterns 创建型模式 | |
Abstract Factory | Creates an instance of several families of classes |
Builder | Separates object construction from its representation |
Factory Method | Creates an instance of several derived classes |
Prototype | A fully initialized instance to be copied or cloned |
Singleton | A class of which only a single instance can exist |
Structural Patterns 结构型模式 | |
Adapter | Match interfaces of different classes |
Bridge | Separates an object’s interface from its implementation |
Composite | A tree structure of simple and composite objects |
Decorator | Add responsibilities to objects dynamically |
Façade | A single class that represents an entire subsystem |
Flyweight | A fine-grained instance used for efficient sharing |
Proxy | An object representing another object |
Behavioral Patterns 行为型模式 | |
Chain of Resp. | A way of passing a request between a chain of objects |
Command | Encapsulate a command request as an object |
Interpreter | A way to include language elements in a program |
Iterator | Sequentially access the elements of a collection |
Mediator | Defines simplified communication between classes |
Memento | Capture and restore an object's internal state |
Observer | A way of notifying change to a number of classes |
State | Alter an object's behavior when its state changes |
Strategy | Encapsulates an algorithm inside a class |
Template Method | Defer the exact steps of an algorithm to a subclass |
Visitor | Defines a new operation to a class without change |
http://www.dofactory.com/Patterns/Patterns.aspx#list
上述各类模式的链接均提供了简单的解释、UML类图、Structural code(C#)和Real-world code(C#)。
相关文章推荐
- Bridge Pattern using C#
- 用C#编写发手机中文短信息Windows服务
- Changing IE setting in C#
- Inside c#_Chapter1(02)
- 使用 Visual C# .NET 向 Microsoft Excel 2002 传输 XML 数据
- 天天学C#-委托(delegate)
- Inside c#_Chapter1(01)
- C#使用CDO发送邮件
- Proxy Pattern using C#
- P/Invoke
- c#中在DataGrid里创建一个弹出式窗口------可实现源代码
- 刀兄写的IIS管理类(C#) 选择自 iwebsms 的 Blog
- C#实现的18位身份证格式验证算法[转载] 选择自 mYang 的 Blog
- C# 编码规范和编程好习惯
- c#中结构与类的区别
- [翻译]C#中的泛型 (From dotNet SDK 2.0 Beta1)
- 设计模式:利用C#的Delegate来改进Observer模式
- C#.NET里面的多线程处理
- C#高级编程(第二版)
- 在c#中操作xml