- 浏览: 224450 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (226)
- websphere (12)
- Websphere Portlet Factory (2)
- portal (8)
- SOA (14)
- Requirement (5)
- Management (23)
- Open Source (9)
- design (21)
- JDK (34)
- Diary (16)
- Database (26)
- UI (18)
- Audio (1)
- Security (5)
- 水平网站 (2)
- 其他 (6)
- J2EE事务相关 (8)
- Spring (3)
- Integration (3)
- Mobile Programming (1)
- Cloud (2)
- 性能调优 (11)
- Hibernate (5)
- 算法 (1)
最新评论
-
hanmiao:
我在IBM网站上找到这篇文章,比较详细的介绍了信息分片与信息分 ...
Websphere MQ -
lancezhcj:
...
Oracle索引 -
shaier:
讲的很不错啊!
SERVICE_NAME, SID和schema区别 -
echohfut:
好久没有关注了。但是取下来的代码怎么导入Eclipse呢?
liferay笔记 -
webee:
已经有ide了!命令都可以不要了!
liferay笔记
SOLID
1. SRP
A Single Responsibility Principle
A class should have one, and only one, reason to change.
2. OCP
A module should be open for extension but closed for modification.
polymorphism is a way to implement it.
Q: what's the difference between static polymorphism and dynamic polymorphism?
3. The Liskov Substitution Principle(LSP)
Subclasses should be substitutable for their base classes.
we should note the canonical Ellipse/Circle dilemma
4. The Dependency Inversion Principle(DIP)
Depend upon Abstractions instead of concretions.
we should note the difference between procedural architecture and OO architecture.
5. The Interface Segregation Principle(ISP)
Many Client specific interfaces are better than one general purpose interface.
so we can isolate the individule interface change. we can define interface according to the client category. Any change needed to be made on the existing interfaces, we can add a new interface instead of changing the existing interfaces. So we can avoid the issue of recompilation and redeployment.
6. Principles of Package Architecture
how to group together package
6.1 The Release Reuse Equivalency Principle(REP)
The granule of resue is the granule of release
6.2 The Common Closure Principle(CCP)
Classes that change together, belong together. So the package impact from release will be minimized.
6.3 The Common Reuse Principle(CRP)
Classes that aren't resued together should not be grouped together
6.4 The Acyclic Dependencies Principle(ADP)
The dependencies between packages must not form cycles.
Cycles can be broken in two ways:
1. create a new package
2. make use of the DIP and ISP
add a interface on the user side(who use the function) and the other side implement the interface.
6.5 The Stable Dependencies Principle(SDP)
Depend in the direction of stability.
I(Instability) = Ce/(Ca+Ce)
Ce: Efferent Coupling, outgoing dependencies
Ca: Afferent Coupling, incoming dependencies
So SDP can be rephrased as: Depend upon package whose I metric is lower than yours.
6.6 The Stable Abstractions Principle(SAP)
stable package should be abstract packages.
The stable package maybe hard to change, so it is not flexible; But we can make the stable package abstract, so it is easy to extend.
This is just a restatement of the DIP. That is , the package that the most depended upon should also be the most abstract.
A(Abstractness) = Na/Nc
Na: Number of abstract classes in the package
Nc: Number of classes in the package
7. KISS
Keep it simple and stupid.
Less is more.
8. CoC
Convention over Configuration, e.g. ROR
9. YAGNI
You Ain't Gonna need it. 极限编程中的一个概念,只实现目前需要的功能。
1. SRP
A Single Responsibility Principle
A class should have one, and only one, reason to change.
2. OCP
A module should be open for extension but closed for modification.
polymorphism is a way to implement it.
Q: what's the difference between static polymorphism and dynamic polymorphism?
3. The Liskov Substitution Principle(LSP)
Subclasses should be substitutable for their base classes.
we should note the canonical Ellipse/Circle dilemma
4. The Dependency Inversion Principle(DIP)
Depend upon Abstractions instead of concretions.
we should note the difference between procedural architecture and OO architecture.
5. The Interface Segregation Principle(ISP)
Many Client specific interfaces are better than one general purpose interface.
so we can isolate the individule interface change. we can define interface according to the client category. Any change needed to be made on the existing interfaces, we can add a new interface instead of changing the existing interfaces. So we can avoid the issue of recompilation and redeployment.
6. Principles of Package Architecture
how to group together package
6.1 The Release Reuse Equivalency Principle(REP)
The granule of resue is the granule of release
6.2 The Common Closure Principle(CCP)
Classes that change together, belong together. So the package impact from release will be minimized.
6.3 The Common Reuse Principle(CRP)
Classes that aren't resued together should not be grouped together
6.4 The Acyclic Dependencies Principle(ADP)
The dependencies between packages must not form cycles.
Cycles can be broken in two ways:
1. create a new package
2. make use of the DIP and ISP
add a interface on the user side(who use the function) and the other side implement the interface.
6.5 The Stable Dependencies Principle(SDP)
Depend in the direction of stability.
I(Instability) = Ce/(Ca+Ce)
Ce: Efferent Coupling, outgoing dependencies
Ca: Afferent Coupling, incoming dependencies
So SDP can be rephrased as: Depend upon package whose I metric is lower than yours.
6.6 The Stable Abstractions Principle(SAP)
stable package should be abstract packages.
The stable package maybe hard to change, so it is not flexible; But we can make the stable package abstract, so it is easy to extend.
This is just a restatement of the DIP. That is , the package that the most depended upon should also be the most abstract.
A(Abstractness) = Na/Nc
Na: Number of abstract classes in the package
Nc: Number of classes in the package
7. KISS
Keep it simple and stupid.
Less is more.
8. CoC
Convention over Configuration, e.g. ROR
9. YAGNI
You Ain't Gonna need it. 极限编程中的一个概念,只实现目前需要的功能。
发表评论
-
数据结构
2012-03-19 08:30 8911. bloom filter 用于测试一个元素是否在一个很 ... -
12306
2012-03-18 22:22 10291. manage 用户的expectation,不要造成无谓 ... -
测试知识
2011-03-11 10:35 7371. Quality Center9.2/10.0,以前称为T ... -
架构考虑的
2010-11-20 14:02 1048考量的是Non Functional factors, 其中有 ... -
lazy loading实现
2010-11-20 08:31 1129在进行O-R mapping时经常会碰到加载a graph o ... -
Enterprise Integration Pattern读中感
2010-09-07 15:13 1427最近在拜读Martin Fowler的Enterprise I ... -
一个金融系统考虑到的
2010-08-27 17:14 6811. 为了安全起见,所有的写操作都要计入Audit表中 2. ... -
4+1架构
2010-08-26 17:09 962为了从不同stake holder的角度来看架构,架构设计文档 ... -
事务之CAP/BASE
2010-08-23 21:17 1090CAP理论: Consistency Availabili ... -
我眼中的LLD
2010-08-23 11:01 696LLD一般与Functional Specification ... -
distributed caching and transaction
2010-08-19 13:45 779哪位兄弟可以谈谈这方面的理解?尤其是分布式Caching. -
来自EJB的回忆
2010-08-17 07:44 650在EJB开发过程中,根据JNDI找到Home接口再生成远程接口 ... -
SLSB的业务接口
2010-08-17 07:37 810今天在看EJB的相关知识时回忆起以前SLSB中业务接口的设计。 ... -
EJB
2010-08-16 13:17 1058针对session EJB的应用,原因有二: 1. Remo ... -
Java序列化
2010-03-08 09:01 842一般序列化的方式有: 1. 通过JDK 的Serializa ... -
日志系统
2008-09-02 22:51 735异步log to file1. 启动一个多线程,维护一个Lis ... -
Web相关
2009-11-12 22:09 6791. Tomcat load balance/cluster/ ... -
RESTful 笔记
2009-09-24 18:07 1054REST(Representational State Tra ... -
session 实现
2009-07-07 06:49 818我们知道session 实现有好几种机制,比如cookie, ... -
Top-Down and Botton-up
2009-06-28 09:09 772different perspectives SOA, the ...
相关推荐
而在面向对象的设计里面,可维护性复用都是以面向对象设计原则为基础的,这些设计原则首先都是复用的原则,遵循这些设计原则可以有效地提高系统的复用性,同时提高系统的可维护性。 面向对象设计原则和设计模式也是...
包括:系统总体设计原则,业务应用支撑平台设计原则,共享交换区数据库设计原则,档案管理系统设计原则,总集成设计原则 ,系统及应用支撑环境设计原则,安全保障体系设计原则,应用支撑平台设计原则 ,等等数十种...
emi设计原则 emi设计原则 emi设计原则 emi设计原则emi设计原则
高速PCB EMC设计的47个原则二、PCB设计原则归纳 原则1:PCB时钟频率超过5MHZ或信号上升时间小于5ns,一般需要使用多层板设计。 原因:采用多层板设计信号回路面积能够得到很好的控制。 原则2:对于多层板,关键...
JAVA 24种设计模式介绍与JAVA6大设计原则
24种设计模式介绍与6大设计原则24种设计模式介绍与6大设计原则
详细描述全部(23种)设计模式与设计原则(6种)。 (一)设计原则包括: 1、开闭原则 2、里氏代换原则 3、依赖转换原则 4、接口隔离原则 5、合成/聚合复用原则 6、最少知识原则 (二)设计模式 1)工厂模式...
android 24种设计模式介绍与6大设计原则
11个重要的数据库设计原则
UML简介与面向对象的设计原则 建模的重要性? 如果你想搭一个狗窝,你备好木料、钉子和一些基本工具(如锤子、锯和卷尺) ,就可以开始工作。从制定一点初步的计划到完成一个满足适当功能的狗窝,你 可能不用别人...
面向对象设计原则:面向对象设计原则、开闭原则、里氏替换原则、里氏替换原则、里氏替换原则
面向对象的设计原则 单一职责原则 开闭原则 里氏替换原则 依赖倒置原则 接口分离原则 迪米特法则 合成复用原则
网页设计原则.txt格式 网页设计前的必读之物 设计原则是非常重要的!!!
EMI设计原则及电磁兼容设计原则有助于在电路板设计时候的抗干扰性能
oracle数据库索引设计原则. 数据库索引设计原则.
面向对象设计模式设计原则 自己下了看吧,,面向对象程序设计时候的 几个基本原则了
各种给力,软件设计原则,设计软件原则,原则设计软件,阮设计原则