desing principles: tensions and synergies
DESCRIPTION
Learnign OO principles exploring tensions and synergies. See for details: https://github.com/iliasbartolini/design_principles_dojoTRANSCRIPT
Design Principles Tensions & Synergies
Ilias Bartolini
J u l y 2 0 1 4
2
HOW IT WORKS
● Divide into pairs ● Start setup development environment● Explain the tensions & synergies● Choose a design principle or rule● Game of life● Implement a new user story (30min)● Showcase changes
How did it affect other principles? Post-it!!Repeat
● Conclusions● Feedback
3
http://bit.ly/oo_dojo 1.Fork me!2.
4
AN EXAMPLE
5
AN EXAMPLE
Encapsulation
Single Responsibility
6
AN EXAMPLE
7
AN EXAMPLE
Encapsulation
Single Responsibility
8
Single Responsibility vs Encapsulation
9
Conway's Game of Life 1. Any live cell with fewer than two live neighbours dies,
as if caused by under-population.2. Any live cell with two or three live neighbours lives on to the next
generation.3. Any live cell with more than three live neighbours dies,
as if by overcrowding.4. Any dead cell with exactly three live neighbours becomes a live cell,
as if by reproduction.
http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
10
As the supreme product ownerI want any cell with >= 4 alive
neighbours to become a zombieso that apocalypse can begin..
#5
11
As the supreme product ownerI want any cell with >= 4 alive
neighbours to become a zombieso that apocalypse can begin..(ps. Zombies will be forever
zombie, cannot die or become alive
again)
#5
12
Design decisions are trade-offs
13
Questions?
14
Feedback
15
THANKSModify and reuse freely
Help of:Luca Minudel
Matteo Vaccari
Creative Commons credits:https://www.flickr.com/photos/torek/4444673930