Skip to content

Commit d99b81e

Browse files
committed
Merge remote-tracking branch 'upstream/gh-pages' into gh-pages
# Conflicts: # README.md
2 parents d3561c1 + 265a41c commit d99b81e

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

_frontmatter.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: index
3+
type: project
4+
title: Programming Principles
5+
slug: programming-principles
6+
---
7+

index.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ The list was inspired by [The Principles of Good Programming](http://www.artima.
3030
* [Law of Demeter](#law-of-demeter)
3131
* [Composition Over Inheritance](#composition-over-inheritance)
3232
* [Orthogonality](#orthogonality)
33+
* [Robustness Principle](#robustness-principle)
3334

3435
### Module/Class
3536

3637
* [Maximise Cohesion](#maximise-cohesion)
3738
* [Liskov Substitution Principle](#liskov-substitution-principle)
38-
* [Open/Closed Principle](#open-closed-principle)
39+
* [Open/Closed Principle](#openclosed-principle)
3940
* [Single Responsibility Principle](#single-responsibility-principle)
4041
* [Hide Implementation Details](#hide-implementation-details)
4142
* [Curly's Law](#curlys-law)
@@ -257,6 +258,25 @@ Source: [Be Orthogonal](http://www.artima.com/intv/dry3.html)
257258
258259
Source: [Orthogonality](http://en.wikipedia.org/wiki/Orthogonality_(programming))
259260

261+
## Robustness Principle
262+
263+
> Be conservative in what you do, be liberal in what you accept from others
264+
265+
Collaborating services depend on each others interfaces. Often the interfaces need to evolve causing the other end to receive unspecified data. A naive implementation refuses to collaborate if the received data does not strictly follow the specification. A more sophisticated implementation will still work ignoring the data it does not recognize.
266+
267+
Why
268+
269+
* In order to be able to evolve services you need to ensure that a provider can make changes to support new demands while causing minimal breakage to their existing clients.
270+
271+
How
272+
273+
* Code that sends commands or data to other machines (or to other programs on the same machine) should conform completely to the specifications, but code that receives input should accept non-conformant input as long as the meaning is clear.
274+
275+
Resources
276+
277+
* [Robustness Principle in Wikipedia](https://en.wikipedia.org/wiki/Robustness_principle)
278+
* [Tolerant Reader](http://martinfowler.com/bliki/TolerantReader.html)
279+
260280
## Maximise Cohesion
261281

262282
Cohesion of a single module/component is the degree to which its responsibilities form a meaningful unit; higher cohesion is better.

0 commit comments

Comments
 (0)