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

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
The GitHub Blog
The GitHub Blog
C
Check Point Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
F
Full Disclosure
Microsoft Security Blog
Microsoft Security Blog
爱范儿
爱范儿
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
G
GRAHAM CLULEY
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
K
Kaspersky official blog
博客园 - 司徒正美
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
Project Zero
Project Zero
云风的 BLOG
云风的 BLOG
Cisco Talos Blog
Cisco Talos Blog
Know Your Adversary
Know Your Adversary
雷峰网
雷峰网
V
V2EX - 技术
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Spread Privacy
Spread Privacy
罗磊的独立博客
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
SecWiki News
SecWiki News
Schneier on Security
Schneier on Security
O
OpenAI News
Jina AI
Jina AI
PCI Perspectives
PCI Perspectives
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed
I
InfoQ
D
Docker
P
Palo Alto Networks Blog
Recorded Future
Recorded Future
M
MIT News - Artificial intelligence
博客园 - Franky
B
Blog
Scott Helme
Scott Helme
博客园 - 叶小钗
D
DataBreaches.Net

博客园 - John Yang

【转】批处理命令基础教程 《Transact-sql权威指南》学习日记 安装与配置IIS 一些常见的C#面试问题和答案 排序算法 什么是SQL注入式攻击 什么是手册报关 策略模式 C#入门(一) 什么是PMP认证 - John Yang - 博客园 [好文共享] 哈佛讲师讲授幸福:我们越来越富有为何仍不开心 设计模式之工厂模式 42个项目管理过程 - John Yang 项目管理过程组与知识领域表 背完这444句,你的口语绝对不成问题了 SQL SERVER性能优化 [白领栏目] 创造“我生命中的鼎盛之年”五大原则 【三星系列】真正的三星F278秘笈 让人生成功的49个细节
设计原则
John Yang · 2010-08-29 · via 博客园 - John Yang

1.找出应用中可能需要变化之处,把他们独立出来,不要和那些不不要变化的代码混在一起。

把会变化的部分取出并“封装”,好让其他部分不会受到影响。

2.针对接口编程,而不是针对实现编程。

一些具体的实现被放到分开的类中,此类专门提供某行为接口的实现。

3.多用组合,少用继承。

4.类应该对扩展开放,对修改关闭。