Design Smells And OO Design Principles

原创 2004年08月24日 13:52:00

Design Smell - The Odors of Rotting Software

1.Rigidity - THe system is hard to change because every change forces many other changes to other parts of the system.
2.Fragility - Changes cause the system to break in places that have no conceptual relationship to the part that was changed.
3.Immobility - It is hard to disentangle the system into components that can be reused in other system.
4.Viscosity - Doing things right is harder than doing things wrong.
5.Needless Complexity - The design contains infrastructure that adds no direct benefit.
6.Needless Repetition - The design contains repeating structures that could be unified under a single abstract.
7.Opacity - It is hard to read and understand.It does not express its intent well

Princples of object-oriented design that help developers  eliminate design smells and build the best designs for the current set of features

SRP - The Single Responsibility Principle
OCP - The Open-Closed Principle
LSP - The Liskov Substitution Principle
DIP - The Dependency Inversion Principle
ISP - The Interface Segregation Principle

SRP: A class should have only one reason to change.
OCP: Software entities(classes,modules,functions,ect.)should be open for extension,but closed for modification.
LSP: Subtypes must be substitutable for their base types.
DIP: High-level modules should not depend on low-level modules.Both should depend on abstractoins;Abstractions should not depend on details.Details should depend on abstractions.
ISP: Classes have "fat" interface can be broken into groups of methods by,each group serves a different set of clients;clients should not know about them as a single class.

refer to the  <<Agile Software Development>> -- Martin

principles of good restful api design(中文)

好的restful风格API设计原则 中文译文
  • qq_35799003
  • qq_35799003
  • 2016年08月25日 17:35
  • 530

《Concurrent Programming in Java: Design Principles and Patterns》Second Edition

个人编写程序也算有些年头了, 多线程并发程序也编写过, 但都是些无关大局的东西, 最近在写一个中间件, 感觉自己在并发程序设计方面的知识储备不足, 才想起看这本书来. 书有些老, 代码风格也不合我的口...
  • saintxzm
  • saintxzm
  • 2007年08月09日 10:26
  • 1606

API Design Principles

API设计原则。 转载自: ...
  • caohao2008
  • caohao2008
  • 2011年11月22日 11:58
  • 1431

Design Principles and Design Patterns(设计原则与设计模式) -Robert C. Martin

What is software architecture? The answer is multitiered. At the highest level, there are the archit...
  • zhaohuabing
  • zhaohuabing
  • 2011年07月24日 12:13
  • 1412

一些常见面试OO design题目总结

最近很多公司面试喜欢问一些OO design的题目, 我总结了一些比较高频的题目, 需求不一定准确, 设计的也不一定好, 欢迎提出建议.  1. 电梯设计  2. 停车厂设计  3. 通用卡牌游戏bl...
  • qq508618087
  • qq508618087
  • 2016年11月24日 06:09
  • 3078

Maze problem 的OO Design - 写给煜小堆

Question:  How do you design a Maze and what kind of data structures you use for Maze. In addition,...
  • Race6006
  • Race6006
  • 2016年02月28日 12:35
  • 204

Dynamic Adaptive Streaming ove HTTP(DASH) Design Principles and Standards

Dynamic Adaptive Streaming ove HTTP(DASH) Design Principles and Standards 3GP 的 DASH设计原则与标准 Thomas...
  • coloriy
  • coloriy
  • 2015年08月12日 12:57
  • 563


本书是编译原理课程的经典教材,作者曾多次使用本书的内容在贝尔实验室、哥伦比亚大学、普林斯顿大学和斯坦福大学向本科生和研究生讲授初等及高等编译课程。 本书作者Alfred V.Aho、Ravi Se...
  • AeiouKong
  • AeiouKong
  • 2014年06月20日 09:25
  • 429

说Hand-over-hand lock: 通读Concurrent Programming in Java: Design Principles and Patterns (1)

网络是个好东西,想学什么想用什么,一搜就基本能找到, 有时由于输入的关键词不佳, 难找到合适的结果, 有时干脆就是没有相关的网页(或者是问题太简单), 这样的时候自已难免会多花时间琢磨, 这些琢磨的结...
  • revv
  • revv
  • 2008年03月13日 10:12
  • 1708

six OO design principles

1) single responsibility principle. 2) Liskov substitution principle. functions that use point...
  • lxz_lj
  • lxz_lj
  • 2013年02月01日 15:12
  • 76
您举报文章:Design Smells And OO Design Principles