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

推荐订阅源

N
News | PayPal Newsroom
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
H
Hacker News: Front Page
Apple Machine Learning Research
Apple Machine Learning Research
TaoSecurity Blog
TaoSecurity Blog
Help Net Security
Help Net Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
人人都是产品经理
人人都是产品经理
博客园 - 三生石上(FineUI控件)
Security Latest
Security Latest
Cloudbric
Cloudbric
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Know Your Adversary
Know Your Adversary
A
Arctic Wolf
L
LangChain Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
W
WeLiveSecurity
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
M
MIT News - Artificial intelligence
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
小众软件
小众软件
NISL@THU
NISL@THU
云风的 BLOG
云风的 BLOG
P
Privacy & Cybersecurity Law Blog
S
Security @ Cisco Blogs
博客园 - 【当耐特】
I
InfoQ
Vercel News
Vercel News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Proofpoint News Feed
O
OpenAI News
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
K
Kaspersky official blog
T
Threat Research - Cisco Blogs
量子位
宝玉的分享
宝玉的分享

博客园 - xiaosonl

学习手札#3 NHibernate缓存 产品的简单性 让ASP.NET MVC的Controller输出不同类型数据 学习手札#2 故事点和小时数的思考 学习笔记#1 键值对数据库 SQLite数据迁移 探讨一种在Silverlight不普及情况下的部署策略 有用的文档 Silverlight产品布署策略 探讨一种Silverlight的异步编程模式 代码的注释 下半年要看完消化的技术类书籍 中小型企业的人员流失 谈谈Ruby On Rails和ASP.NET 工作中的系统学习 Uml中的关联与依赖关系 TDD与重构设计 C#中使用位运算来实现权限管理 Silverlight中JavaSciprt无法访问托管类抽象成员的解决方法
关于过度设计的思考(上)
xiaosonl · 2010-05-30 · via 博客园 - xiaosonl

关于过度设计的思考(上)

2010-05-30 15:18  xiaosonl  阅读(648)  评论(0)    收藏  举报

设计是一个取舍的过程,无论是过度设计还是设计不足的问题,都是取舍的结果:

1. 如果不预先设计,随着时间越久,更改成本越大

2. 如果预先设计,会增加当前程序的复杂度

这种取舍没有放之四海皆准的标准,需要根据不同项目不同人员做选择。在我开发经验当中,总结几条参考标准:

1. 可隔离的实现不做优化设计,当性能需要时再进行优化,需要单元测试支持。

2. 如何为扩展性预留设计?

这是个很纠结的问题,这里面其实有两个概念:扩展和设计。设计是为了扩展,但是设计不能完全解决扩展问题,如果非要用设计解决所有的扩展问题,那基本上就会造成过度设计。其实很多大型项目,到了一定阶段,就是基本上重写架构了。这时候,相比可扩展的复杂设计,倒不如简单的设计,但是因为设计简单,所以代码更易懂,更容易被重写。之前看到过一句话:有一种设计,很复杂,不会有明显的问题;有一种设计,很简单,明显不会有问题。我们应该选择后者。