转: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. Datazen 自定义地图--中国地图

    背景: 关于Datazen可以google一下,因为目前Datazen还没有中文版,所以google出来的资料会多一点,由于公司想用Datazen来做报表展示,所以有了下文. 参考文章: 中文---h ...

  2. DateDiff函数 asp运算时间

    DateDiff DateDiff函数 返回 返回 Variant (Long) 的值,表示两个指定日期间的时间间隔数目. 语法 DateDiff(interval, date1, date2[, f ...

  3. js jquery jquery.wordexport.js 实现导出word

    由于工作需要,将一个页面导出word文档,主要是简历!经过百度搜索之后,没找到结果,无奈之下只能求助Google,意外发现jquery一款插件可以实现这个功能!而且效果还算可以! 基本可以实现想要的功 ...

  4. ebay的api的开发技术笔记

    使用eBay API基本步骤介绍 要开始使用eBay API,需要如下基本步骤: 1.    注册开发帐号: https://developer.ebay.com/join/Default.aspx ...

  5. QA在网站建设中的作用

    在网站建设项目中,有一个团队负责产品测试并识别产品中的缺陷是很有意义的.问题在于,不应该只依赖这个团队来发现所有的缺陷,就像航空公司不能只依靠空乘人员确保飞机安全一样.这个观点的核心是一个简单的事实, ...

  6. [Android开发系列]IT博客应用

    1.关于坑 好吧,在此之前先来说一下,之前开的坑,恩,确实是坑,前面开的两个android开发教程的坑,对不起,实在是没什么动力了,不过源码都有的,大家可以参照github这个应用 https://g ...

  7. Objective-C 【电商APP应用代码-系统分析-详细注释-代码实现】

    ------------------------------------------- 电商APP应用 ************************************************ ...

  8. js_event.keycode值大全

    onkeydown 当用户按下键盘按键时触发onkeypress   当用户按下字面键时触发 onkeyup  当用户释放键盘按键时触发 =============================== ...

  9. JavaScript之Function函数深入总结

    整理了JavaScript中函数Function的各种,感觉函数就是一大对象啊,各种知识点都能牵扯进来,不单单是 Function 这个本身原生的引用类型的各种用法,还包含执行环境,作用域,闭包,上下 ...

  10. 【原创】微信公众号与HTML 5混合模式揭秘3——JSSDK获取地理位置

    微信公众号与HTML 5混合模式揭秘1——如何部署JSSDK 微信公众号与HTML 5混合模式揭秘2——分享手机相册中照片 JSSDK为开发者提供了两个位置API服务:获取地理位置和使用微信内置地图查 ...