转:http://www.codeproject.com/Articles/703634/SOLID-architecture-principles-using-simple-Csharp?msg=4729987#xx4729987xx

http://www.codeproject.com/Articles/28309/Design-pattern-FAQ-Part-1-Training

S stands for SRP (Single responsibility principle):- A class should take care of only one responsibility.

O stands for OCP (Open closed principle):- Extension should be preferred over modification.

L stands for LSP (Liskov substitution principle):- A parent class object should be able to refer child objects seamlessly during runtime polymorphism.

I stands for ISP (Interface segregation principle):- Client should not be forced to use a interface if it does not need it.

D stands for DIP (Dependency inversion principle) :- High level modules should not depend on low level modules but should depend on abstraction.

There are three basic classifications of patterns Creational, Structural, and Behavioral patterns.

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 in which only a single instance can exist

Note: - The best way to remember Creational pattern is by remembering ABFPS (Abraham Became First President of States).
Structural Patterns

• Adapter:-Match interfaces of different classes . 
• Bridge:-Separates an object’s abstraction 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.

• Mediator:-Defines simplified communication between classes.
• Memento:-Capture and restore an object's internal state. 
• Interpreter:- A way to include language elements in a program.
• Iterator:-Sequentially access the elements of a collection. 
• Chain of Resp: - A way of passing a request between a chain of objects.
• Command:-Encapsulate a command request as an object. 
• State:-Alter an object's behavior when its state changes. 
• Strategy:-Encapsulates an algorithm inside a class. 
• Observer: - A way of notifying change to a number of classes. 
• Template Method:-Defer the exact steps of an algorithm to a subclass. 
• Visitor:-Defines a new operation to a class without change.

SOLID architecture principles using simple C# examples的更多相关文章

  1. Architecture Principles

    Architecture Principles - Completed Components Name Statement Rationale Implications TOGAF Principle ...

  2. 让姑姑不再划拳 码农也要有原则 : SOLID via C#

    “姑娘,别这样.我们是有原则的.” “一个有原则的程序猿是不会写出 “摧毁地球” 这样的程序的,他们会写一个函数叫 “摧毁行星”而把地球当一个参数传进去.” “对,是时候和那些只会滚键盘的麻瓜不同了, ...

  3. 一年开发ASP.NET MVC4项目经验总结

    一年开发ASP.NET MVC4项目所用所学技术经验总结 阅读目录 文章背景 前端所用技术摘要 后端所用技术摘要 1. 文章背景 本人2014年从Java转行到C#从事BS项目的开发,刚开始接触的是A ...

  4. C# 之设计原则

    代码也需要有秩序,就像世界需要秩序,基于SOLID architecture principles. 一.SOLID原则 S.O.L.I.D.是一组面对面向对象设计的最佳实践的设计原则.术语来自Rob ...

  5. 设计模式之设计原则 C#

    成为一名资深架构师首先要懂设计模式,在懂之前,要清楚设计原则,原来我就吃过这个亏,很久以前有人问我设计原则,我是一头茫然,不是只有设计模式吗?且不知设计原则就像是写书法一样,楷体就是方正,竖道有垂露等 ...

  6. Service Oriented Architecture and WCF 【转】

    http://www.codeproject.com/Articles/515253/Service-Oriented-Architecture-and-WCF Introduction This a ...

  7. Optimizing subroutine calls based on architecture level of called subroutine

    A technique is provided for generating stubs. A processing circuit receives a call to a called funct ...

  8. Architecture Patterns

    This chapter provides guidelines for using architecture patterns. Introduction Patterns for system a ...

  9. PHP的SOLID设计原则

    SOLID Design Principles, 这是一个比设计模式更高级别的概念, 以构建良好代码为目标,真正掌握了就是大师级别了. 我~~~仅知晓~ /*SOLID Design Principl ...

随机推荐

  1. XAPI(XenAPI)

      转载:http://www.cnblogs.com/dkblog/archive/2011/07/07/2099885.html 初识toolstack--XEN的XenServer管理的核心 什 ...

  2. Cocos移植到Android的一些问题-SQLite3数据库移植问题

    首选我们讨论一下SQLite3数据库移植问题.我们在第14章节介绍了在Win32平台使用SQLite3数据库,我们介绍了两种配置环境的方法:一种是使用Cocos2d-x提供的SQLite3库配置,另一 ...

  3. IoC容器的初始化过程

    1.简单来说,IoC容器的初始化是由前面介绍的refresh()方法来启动的,这个方法标志着IoC容器的正式启动. 2.具体来说,这个启动包括BeanDefinition的Resource定位.载入和 ...

  4. (转)消息中间件的技术选型心得-RabbitMQ、ActiveMQ和ZeroMQ

    RabbitMQ.ActiveMQ和ZeroMQ都是极好的消息中间件,但是我们在项目中该选择哪个更适合呢?很多开发者面临这个烦恼.下面我会对这三个消息中间件做一个比较,看了后你们就心中有数了. Rab ...

  5. JavaScript 全局

    JavaScript 全局 JavaScript 全局属性和方法可用于创建Javascript对象. JavaScript 全局属性 属性 描述 Infinity 代表正的无穷大的数值. NaN 指示 ...

  6. C++ Vector 动态数组

    Vectors 包含着一系列连续存储的元素,其行为和数组类似.访问Vector中的任意元素或从末尾添加元素都可以在常量级时间复杂度内完成,而查找特定值的元素所处的位置或是在Vector中插入元素则是线 ...

  7. Nginx在嵌入式系统中的应用

    -----------------本文转载自 http://blog.csdn.net/xteda/article/details/39708009 ------------------------- ...

  8. 《用户和组的管理》Redhat6.3

    linux下有三类用户:  1.超级用户 :root 具有操作系通的一切权限 uid 0 2.普通用户:普通用户具有操作系统有限的权限 uid 500-6000 3.伪用户 :是为了方便系统管理,满足 ...

  9. Azure + vsftpd + ubntu14 + 虚拟用户 遇到的问题:从网上摘抄

    :在Azure安装好ubuntu虚拟机,安装包选择ubuntu14.04 LTS,选择LTS,以便微软对其以后的更好支持,不选就可能技术支持不会很久,现只开一台,端口默认选择22 :打开虚拟机,进入端 ...

  10. Lucene Field

    org.apache.lucene.demo.IndexFiles类中,使用递归的方式去索引文件.在构造了一个IndexWriter索引器之后,就可以向索引器中添加Doucument了,执行真正地建立 ...