- 浏览: 233151 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (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 9291. bloom filter 用于测试一个元素是否在一个很 ... -
12306
2012-03-18 22:22 10821. manage 用户的expectation,不要造成无谓 ... -
测试知识
2011-03-11 10:35 7671. Quality Center9.2/10.0,以前称为T ... -
架构考虑的
2010-11-20 14:02 1082考量的是Non Functional factors, 其中有 ... -
lazy loading实现
2010-11-20 08:31 1165在进行O-R mapping时经常会碰到加载a graph o ... -
Enterprise Integration Pattern读中感
2010-09-07 15:13 1473最近在拜读Martin Fowler的Enterprise I ... -
一个金融系统考虑到的
2010-08-27 17:14 7151. 为了安全起见,所有的写操作都要计入Audit表中 2. ... -
4+1架构
2010-08-26 17:09 1003为了从不同stake holder的角度来看架构,架构设计文档 ... -
事务之CAP/BASE
2010-08-23 21:17 1130CAP理论: Consistency Availabili ... -
我眼中的LLD
2010-08-23 11:01 732LLD一般与Functional Specification ... -
distributed caching and transaction
2010-08-19 13:45 822哪位兄弟可以谈谈这方面的理解?尤其是分布式Caching. -
来自EJB的回忆
2010-08-17 07:44 691在EJB开发过程中,根据JNDI找到Home接口再生成远程接口 ... -
SLSB的业务接口
2010-08-17 07:37 844今天在看EJB的相关知识时回忆起以前SLSB中业务接口的设计。 ... -
EJB
2010-08-16 13:17 1092针对session EJB的应用,原因有二: 1. Remo ... -
Java序列化
2010-03-08 09:01 883一般序列化的方式有: 1. 通过JDK 的Serializa ... -
日志系统
2008-09-02 22:51 777异步log to file1. 启动一个多线程,维护一个Lis ... -
Web相关
2009-11-12 22:09 7171. Tomcat load balance/cluster/ ... -
RESTful 笔记
2009-09-24 18:07 1086REST(Representational State Tra ... -
session 实现
2009-07-07 06:49 851我们知道session 实现有好几种机制,比如cookie, ... -
Top-Down and Botton-up
2009-06-28 09:09 816different perspectives SOA, the ...
相关推荐
以下是对各个设计原则的详细说明: 1. **系统总体设计原则**: - **统一设计原则**:这强调了在设计时需全局考虑,包括应用系统结构、数据模型、存储和扩展规划,确保一致性。 - **先进性原则**:采用成熟且先进...
而对于其他模式和原则,应以类似的方式进行学习和应用,不断深入理解每个设计模式的特点和适用场景,以及设计原则的核心指导思想,最终能够在实际开发中灵活运用,编写出高质量、高内聚低耦合、易于扩展的代码。
发现了在触摸屏界面设计上存在的问题,深感触摸屏界面可用性的重要性以及在设计中人力物力投资的重复性,从而得出了为触摸屏界面提供一套通用的设计原则的必要性。 文章开篇第一章首先说明了一下研究背景...
数据库索引设计原则 数据库索引设计原则是 Oracle 数据库管理系统中的一项重要技术,旨在提高数据库的查询效率和性能。以下是数据库索引设计原则的详细解释。 一、基本原则 数据库索引设计原则的基本原则是确保...
在Android开发中,设计模式和设计原则是提升代码质量、可维护性和可扩展性的重要工具。以下是关于"Android 24种设计模式介绍与6大设计原则"的详细阐述: 一、六大设计原则 1. **单一职责原则(Single ...
这个PDF文档“24种设计模式介绍与6大设计原则”旨在帮助开发者理解和应用这些模式,提高代码的可维护性和可扩展性。以下是其中的主要内容: 一、设计原则 1. 单一职责原则:一个类或模块应只有一个引起其变化的原因...
面向对象设计原则是软件开发中不可或缺的指导方针,它们旨在提升软件的可维护性和复用性,从而提高开发效率和质量。C++作为一门支持面向对象编程的语言,遵循这些原则可以使代码更加健壮和易于扩展。以下是7个常用的...
理解并遵循EMI设计原则和电磁兼容设计原则对于提升电路板的抗干扰性能至关重要。 首先,我们要明白EMI是指由于电路中电流的变化产生的电磁场对周围环境产生的影响,这可能会影响其他电子设备的正常工作。为了减少...
面向对象设计原则是软件开发中至关重要的一环,它关乎到代码的可维护性、扩展性和复用性。本文将深入探讨这些原则,并结合实例来解释它们的重要性。 首先,我们需要理解面向对象不仅仅是编程语言中的概念,如封装、...
【HWS公有云架构设计原则】 华为公有云架构设计遵循一系列关键原则,旨在构建一个高效、灵活且可扩展的云服务环境。以下是这些原则的详细解释: 1. **开放API原则**:所有子系统,包括Portal/Console、BSS...
通过以上三个面向对象的设计原则,我们可以构建出更加健壮、灵活且易于维护的软件系统。这些原则不仅适用于特定的语言环境,而且对于所有的面向对象编程语言都有普遍的意义。理解和掌握这些原则,对于提升软件开发的...
高速PCB EMC设计的47个原则二、PCB设计原则归纳 原则1:PCB时钟频率超过5MHZ或信号上升时间小于5ns,一般需要使用多层板设计。 原因:采用多层板设计信号回路面积能够得到很好的控制。 原则2:对于多层板,关键...
在软件设计领域,设计原则是指导软件系统构建的基础法则和最佳实践,它们可以帮助开发者构建出更加灵活、可维护和可扩展的系统。在嵌入式系统开发中,这些原则同样适用,并且需要根据嵌入式环境的特殊性进行适当的...
### Web界面设计原则详解 #### 引言 Web界面设计是一项综合艺术与科学的技能,旨在创造既美观又实用的在线体验。良好的Web界面不仅能够吸引用户,还能引导他们高效地完成目标。本文将深入探讨Web界面设计的核心...
### Java设计原则详解 #### 一、基本原则与实践 **原则1:避免不必要的代码重复** 根据Arthur J. Riel的观点,在设计时应当避免代码的重复。例如在第13页提到,应尽量减少相似功能模块的重写,这有助于提高代码的...
24种设计模式介绍与6大设计原则24种设计模式介绍与6大设计原则
面向对象设计原则是软件工程领域中的重要组成部分,旨在提高软件系统的可维护性、可扩展性和灵活性。其中,类设计原则尤为关键,它们指导着开发者如何合理地构建类,以适应不断变化的需求。以下是对给定文件中提及的...
数据采集系统设计原则与基本方法 数据采集系统设计原则与基本方法是数据采集系统设计的基础,掌握这些原则和方法是设计高质量的数据采集系统的关键。本文将对数据采集系统设计的基本原则和方法进行详细的解释。 一...
设计原则和设计模式是OOD的核心概念,它们为开发者提供了指导思想和最佳实践,以创建可维护、可扩展和易于理解的代码。在Swift中,遵循这些原则和模式可以帮助我们编写出更加灵活和高效的软件。 面向对象设计的原则...