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. Mysql数据库操作笔记

     如果数据库表字段存在,则删除该表 drop table if exists `table_name` 创建数据库表语句 create table `table_name`( `id` ) not n ...

  2. [国家集训队]middle 解题报告

    [国家集训队]middle 主席树的想法感觉挺妙的,但是这题数据范围这么小,直接分块草过去不就好了吗 二分是要二分的,把\(<x\)置\(-1\),\(\ge x\)的置\(1\),于是我们需要 ...

  3. BZOJ3029守卫者的挑战(概率dp)

    题目大意:给定n个事件,第i个事件发生的概率为pi,收益为ai,初始收益为k,求n个事件之后发生的事件数>=l且收益>=0的概率 收益只可能是正整数或-1. Solution dp[i][ ...

  4. poj 3666 Making the Grade(离散化+dp)

    Description A straight dirt road connects two fields on FJ's farm, but it changes elevation more tha ...

  5. hdu 1503 Advanced Fruits(LCS输出路径)

    Problem Description The company "21st Century Fruits" has specialized in creating new sort ...

  6. ACM-ICPC 2018 焦作赛区网络预赛 G. Give Candies (打表找规律+快速幂)

    题目链接:https://nanti.jisuanke.com/t/31716 题目大意:有n个孩子和n个糖果,现在让n个孩子排成一列,一个一个发糖果,每个孩子随机挑选x个糖果给他,x>=1,直 ...

  7. angularjs优化方略

    angular优化方略,闲的没事想重构的人来瞅瞅. 1.减少$watch 减少$watch,减少$watch,减少$watch.不仅仅是$watch监听,还有ng-model,别闲的没事就加个ng-m ...

  8. 编写高质量代码:改善Java程序的151个建议 --[26~36]

    提防包装类型的null值 public static int testMethod(List<Integer> list) { int count = 0; for (Integer i ...

  9. Opennebula常用命令

    查看虚拟机状态信息: [oneadmin@localhost /]$ onevm list 查看虚拟机配置: [oneadmin@localhost /]$ onevm show 25 启动虚拟机: ...

  10. [luogu4860][Roy&October之取石子II]

    题目链接 思路 这个题和上个题类似,仔细推一下就知道这个题是判断是否是4的倍数 代码 #include<cstdio> #include<iostream> #define f ...