转: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. PAT1005—— 继续(3n+1)猜想

    卡拉兹(Callatz)猜想已经在1001中给出了描述.在这个题目里,情况稍微有些复杂. 当我们验证卡拉兹猜想的时候,为了避免重复计算,可以记录下递推过程中遇到的每一个数.例如对n=3进行验证的时候, ...

  2. spring3+struts2+hibernate3整合出现的问题,No mapping found for dependency [type=java.lang.String, name='struts.objectFactory.spring.enableAopSupport']

    七月 11, 2016 3:49:24 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin警告: [SetPropertiesRule ...

  3. C#代码配置IIS 操纵IIS

    前言: IIS到目前经历了四个版本分别为 IIS4.0  IIS5.0 IIS6.0 IIS7.0,其中IIS6.0 IIS7.0是在5.0的安全问题的基础上获得的发展,目前为止.6.0版本以后的都是 ...

  4. Memcached解决单台服务器故障问题

    <beitmemcached> <add key="name1" value="server1:port" /> <add key ...

  5. Ubuntu上OpenStack DashBoard主题修改的方案

    最近终于把OpenStack的整个初步环境安装部署并配置成功,后续工作就是安装一些可选项了,如Cinder.Swift部件了.我们的整个项目采用的颜色方案主要为清淡色系,蓝色为主,可OpenStack ...

  6. (转)RabbitMQ 集群与高可用配置

    集群概述 环境 配置步骤 集群概述 通过 Erlang 的分布式特性(通过 magic cookie 认证节点)进行 RabbitMQ 集群,各 RabbitMQ 服务为对等节点,即每个节点都提供服务 ...

  7. java使用sigar 遇到问题的解决方案

    先给大家介绍一个开源工具Sigar 官网:http://sigar.hyperic.com/ API:http://www.hyperic.com/support/docs/sigar/index-a ...

  8. java web 实现验证码

    验证码的作用:通常的登录或者注册系统时,都会要求用户输入验证码,以此区别用户行为和计算机程序行为,目的是有人防止恶意注册.暴力破解密码等. 实现验证码的思路:用 server 实现随机生成数字和字母组 ...

  9. Codevs 1205 单词翻转

    时间限制: 1 s  空间限制: 128000 KB  题目等级 : 青铜 Bronze 题解       题目描述 Description 给出一个英语句子,希望你把句子里的单词顺序都翻转过来 输入 ...

  10. wordpress修改固定链接及修改链接后链接提示404错误的解决办法

    wordpress默认的url实在是不好看又不好记忆,而且还不利于SEO.因此,我就捣鼓着把url做一个自定义.自定义的方式如下: 建议使用/%postname%的形式,这样利于SEO. 修改之后,l ...