惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
Schneier on Security
Schneier on Security
B
Blog RSS Feed
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
A
About on SuperTechFans
Recorded Future
Recorded Future
Recent Announcements
Recent Announcements
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
V2EX - 技术
V2EX - 技术
N
Netflix TechBlog - Medium
F
Fortinet All Blogs
V
Visual Studio Blog
Martin Fowler
Martin Fowler
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
The Exploit Database - CXSecurity.com
F
Full Disclosure
Scott Helme
Scott Helme
H
Heimdal Security Blog
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
Application and Cybersecurity Blog
Application and Cybersecurity Blog
V
Vulnerabilities – Threatpost
Blog — PlanetScale
Blog — PlanetScale
Security Latest
Security Latest
WordPress大学
WordPress大学
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Troy Hunt's Blog
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
Jina AI
Jina AI
S
Securelist
小众软件
小众软件
Simon Willison's Weblog
Simon Willison's Weblog
J
Java Code Geeks
AWS News Blog
AWS News Blog
N
News and Events Feed by Topic
博客园 - 三生石上(FineUI控件)
量子位

博客园 - default.aspx

POSA 模式集合 store procedure 优缺点 collection software architecture Software process. InsertTag.java taglib.tld - default.aspx - 博客园 伟大的杰拉德 2col_leftNav.css Test the difference among association, aggregation and composition sbull 设计模式-创建型 linux device driver (转帖) c++ file operation reference(6) c++ file operation (reference 5) c ++ file operate (Reference 3) linux device driver(scull) warn when using insmod 61条面向对象设计的经验原则
Agile programming principle
default.aspx · 2005-04-04 · via 博客园 - default.aspx

(1)SRP 单一职责原则
就一个类而言,应该仅有一个引起它变化的原因。
职责即为"变化的原因".

(2)OCP 开放封闭原则
软件实体(类、模块、函数等)应该是可以扩展的,但是不可修改。
对于扩展是开放的,对于更改是封闭的.
关键是抽象.将一个功能的通用部分和实现细节部分清晰的分离开来.
开发人员应该仅仅对程序中呈现出频繁变化的那些部分作出抽象.拒绝不成熟的抽象和抽象本身一样重要.

(3)LSP Liskov替换原则

子类型必须能替换掉他们的基本类型

(4)DIP 依赖倒置原则

抽象不应该依赖于细节。细节应该依赖于抽象。
Hollywood原则: "Don't call us, we'll call you".程序中所有的依赖关系都应该终止于抽象类和接口。针对接口而非实现编程。
任何变量都不应该持有一个指向具体类的指针或引用。
任何类都不应该从具体类派生。
任何方法都不应该覆写他的任何基类中的已经实现了的方法。

(5)ISP 接口隔离原则

不应该强迫客户依赖于他们不用的方法。接口属于客户,不属于他所在的类层次结构。
多个面向特定用户的接口胜于一个通用接口。

(6)REP 重用发布等价原则

重用的粒度就是发布的粒度.

(7)CCP 共同重用原则

一个包中的所有类应该是共同重用的。如果重用了包中的一个类,那么就要重用包中的所有类。
相互之间没有紧密联系的类不应该在同一个包中。

(8)CRP 共同封闭原则

包中的所有类对于同一类性质的变化应该是共同封闭的。一个变化若对一个包影响,则将对包中的所有类产生影响,而对其他的包不造成任何影响.

(9)ADP 无依赖原则
在包的依赖关系中不允许存在环.
细节不应该被依赖.

(10)SDP 稳定依赖原则
朝着稳定的方向进行依赖.
应该把封装系统高层设计的软件(比如抽象类)放进稳定的包中,不稳定的包中应该只包含那些很可能会改变的软件(比如具体类)。

(11)SAP 稳定抽象原则

包的抽象程度应该和其他稳定程度一致.
一个稳定的包应该也是抽象的,一个不稳定的包应该是抽象的.

(12)DAP(Default Abstraction Principle)缺省抽象原则
在接口和实现接口的类之间引入一个抽象类,这个类实现了接口的大部分操作.

(13)IDP(Interface Design Principle)接口设计原则
规划一个接口而不是实现一个接口。

(14)BBP(Black Box Principle)黑盒原则
多用类的聚合,少用类的继承。

(15)DCSP(Don't Concrete Supperclass Principle)不要构造具体的超类原则
避免维护具体的超类。