Continuous Design

https://www.martinfowler.com/ieeeSoftware/continuousDesign.pdf

T
he
rising popularity of refactoring, tools
such as JUnit, and agile methodologies
such as Extreme Programming (XP) has
brought a new style of design into view.
Continuous design
is the process of us-
ing refactoring to continuously improve
a program’s design. Initially a skeptic, I’ve been
experimenting with continuous design for four

years, and it’s changed the way I program

Design Goals in Continuous Design
Continuous design makes change easy by focusing on these design goals:
■
DRY (Don’t Repeat Yourself):
There’s little duplication.
■
Explicit:
Code clearly states its purpose, usually without needing comments.
■
Simple:
Specific approaches are preferred over generic ones. Design pat-
terns support features, not extensibility.
■
Cohesive:
Related code and concepts are grouped together.
■
Decoupled:
Unrelated code and concepts can be changed independently.
■
Isolated:
Third-party code is isolated behind a single interface.
■
Present-day:
The design doesn’t try to predict future features.
■
No hooks:
Interfaces, factory methods, events, and other extensibility “hooks”

are left out unless they meet a current need

Cohesive

内聚 -- 相关的代码和逻辑,放在一起。 不要离散存放。

Isolated & Decoupled

去耦合 -- 将无关和不必要的粘连,切除掉。目标为更加内聚。

隔离 -- 将不同内聚的模块, 切分清楚, 将模块之间的接口描述清楚。

Continuous Design的更多相关文章

  1. DDD:Strategic Domain Driven Design with Context Mapping

    Introduction Many approaches to object oriented modeling tend not to scale well when the application ...

  2. Domain Driven Design and Development In Practice--转载

    原文地址:http://www.infoq.com/articles/ddd-in-practice Background Domain Driven Design (DDD) is about ma ...

  3. Go as continuous delivery tool for .NET

    http://simon-says-architecture.com/2014/02/28/go-as-continuous-delivery-tool-for-net/ Following my p ...

  4. Fitting Bayesian Linear Mixed Models for continuous and binary data using Stan: A quick tutorial

    I want to give a quick tutorial on fitting Linear Mixed Models (hierarchical models) with a full var ...

  5. Android设计和开发系列第二篇:Action Bar(Design)

    Action Bar The action bar is a dedicated piece of real estate at the top of each screen that is gene ...

  6. 论文阅读 | Formalizing Visualization Design Knowledge as Constraints: Actionable and Extensible Models in Draco

    1. Introduction 程序员编写的可视化图表与专家眼中的设计标准总存在差距.我们无法每次都向可视化专家咨询设计上的意见,所以我们需求将设计标准,研究成果应用于自动化设计工具的正式框架,这些工 ...

  7. Comparing Two High-Performance I/O Design Patterns--reference

    by Alexander Libman with Vladimir GilbourdNovember 25, 2005 Summary This article investigates and co ...

  8. TimescaleDB1.3 的新特性——Continuous aggregates: faster queries with automatically maintained materialized views

    One characteristic of time-series data workloads is that the dataset will grow very quickly. Without ...

  9. behavior planning——15.cost function design weightTweaking

    Designing cost functions is difficult and getting them all to cooperate to produce reasionable vehic ...

随机推荐

  1. centos7下mysql半同步复制原理安装测试详解

    原理简介: 在MySQL5.5之前,MySQL的复制其实都是异步复制(见下图),主库和从库的数据之间存在一定的延迟,这样存在一个隐患:当在主库上写入一个事务并提交成功,而从库尚未得到主库推送的BinL ...

  2. D: Starry的神奇魔法(矩阵快速幂)

    题目链接:https://oj.ismdeep.com/contest/Problem?id=1284&pid=3 D: Starry的神奇魔法 Time Limit: 1 s      Me ...

  3. webpack入门(七) API in LOADERS

    介绍 loaders允许你用require() 预处理文件(preprocess files)或者加载他们,在其他的构建工具中,loaders就是一种像“任务(tasks)”的东西.他提供了一种处理前 ...

  4. go语言通道详解

    https://www.ardanlabs.com/blog/2017/10/the-behavior-of-channels.html Introduction When I started to ...

  5. 区间最深LCA

    求编号在区间[l, r]之间的两两lca的深度最大值. 例题. 解:口胡几种做法.前两种基于莫队,第三种是启发式合并 + 扫描线,第四种是lct + 线段树. ①: 有个结论就是这个答案一定是点集中D ...

  6. Django 自定义过滤器

    设定自定义过滤器之前要现在配置文件内把自己项目名在 INSTALLED_APPS 内导入 #已安装的django应用 INSTALLED_APPS = [ 'django.contrib.admin' ...

  7. Linux:在文件最后一列添加递增数(awk,cat函数)

    假设有文件file1.txt: aa eeeee bb eeeee cc eeeee dd eeeee 先修改为: aa eeeee 1 bb eeeee 2 cc  eeeee3 dd eeeee ...

  8. 斯坦福大学公开课机器学习: advice for applying machine learning - evaluatin a phpothesis(怎么评估学习算法得到的假设以及如何防止过拟合或欠拟合)

    怎样评价我们的学习算法得到的假设以及如何防止过拟合和欠拟合的问题. 当我们确定学习算法的参数时,我们考虑的是选择参数来使训练误差最小化.有人认为,得到一个很小的训练误差一定是一件好事.但其实,仅仅是因 ...

  9. bash 5

    1)bash支持一维数组(不支持多维数组),并且没有限定数组的大小. 类似于 C 语言,数组元素的下标由 0 开始编号.获取数组中的元素要 利用下标,下标可以是整数或算术表达式,其值应大于或等于 0. ...

  10. TODO java-web相关 servlet过滤器+监听器

    servlet过滤器 定义: 过滤器是小型的web组件,它负责拦截请求和响应,以便查看.提供或以某种方式操作正在客户机和服务器之间交换的数据. 与过滤器相关的servlet共包含3个简单接口:Filt ...