Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Beyond SOLID:
The Package Principles
Red Panda Innovation Labs
Code Words 2016-04-22
Christian Hujer
CEO / CTO Nelkinda So...
Agenda
1.The Four Design Smells
2.Origins and Reprise of SOLID
3.ACCESS / CASE - The Package Principles
a.Package Cohesion...
Definitions
Software Entity
Statement / line / method / class / package / service
Component
Logical (model / architecture ...
1.
The Four Design Smells
The Four Design Smells
●Rigidity
●Fragility
●Immobility
●Viscosity
Rigidity
What is Rigidity?
Existing Code that causes Effort (known Effort)
What causes Rigidity?
Coupling
Fragility
●What is Fragility?
○Existing Code that causes Risk (unknown Effort)
●What causes Fragility?
○Coupling
○Lack of ...
Immobility
What is Immobility?
The difficulty (extra Effort) to reuse something.
Rigidity and Fragility in the context of ...
Viscosity
What is Viscosity?
Continuous extra Effort (Time)
What causes Viscosity?
Coupling
Bad development setup / tools
2.
The SOLID Principles
A short reminder
SRP - Single Responsibility
OCP - Open-Closed
LSP - Liskov Substitution
ISP - Interface Segregation
DIP - Dependency Inver...
Design Principles and Design
Patterns (2000)
Mentions 10 principles
● Principles of Object Oriented Class Design:
OCP, LSP...
3.
The Package Principles
The Package Principles
Package Cohesion Principles
REP - Release Reuse Equivalency
CCP - Common Closure
CRP - Common Reuse...
3.a.
Package Cohesion
Principles
Release Reuse Equivalency Principle
“The granule of reuse is the granule of release.”
Reuse === Release
Bundler / Gems, NP...
Common Closure Principle (Cohesion)
“Classes that change together belong
together.”
⇒ This also is a nice pragmatic defini...
Common Reuse Principle (Cohesion)
“Classes that aren’t reused together should not
be grouped together.”
This is really the...
3.b.
Package Coupling
Principles
Acyclic Dependencies Principle
“The dependencies between packages must
not form cycles.”
Stable Dependencies Principle
“Depend in the direction of stability.”
Stable Abstractions Principle
“Stable packages should be abstract
packages.”
3.c.
Mnemonics
How to remember all this stuff?!
ACCESS
Your new mnemonic acronym
Combine to SOLID ACCESS
ACCESS Mnemonic Acronym
ADP - Acyclic Dependencies
CCP - Common Closure (Cohesion Collocation)
CRP - Common Reuse
REP - Re...
CASE
A shorter mnemonic acronym
Combine to SOLID CASE
CASE - A new mnemonic acronym
Cohesion / Common
CCP / CRP Common Closure / Reuse
Acyclic
ADP Acyclic Dependencies
Stabilit...
Related Topics
Software Architecture and Design
Software Metrics
Clean Code
Refactoring
TDD, ATDD and BDD
Agile Methods, S...
References
● SOLID and Package Principles, Design Smells: Design
Principles and Design Patterns (Robert C. Martin, 2000)
●...
Thank you!
Questions?
Follow me on Twitter:
@christianhujer
Upcoming SlideShare
Loading in …5
×

of

2016-04-22: Beyond SOLID: The Package Principles Slide 1 2016-04-22: Beyond SOLID: The Package Principles Slide 2 2016-04-22: Beyond SOLID: The Package Principles Slide 3 2016-04-22: Beyond SOLID: The Package Principles Slide 4 2016-04-22: Beyond SOLID: The Package Principles Slide 5 2016-04-22: Beyond SOLID: The Package Principles Slide 6 2016-04-22: Beyond SOLID: The Package Principles Slide 7 2016-04-22: Beyond SOLID: The Package Principles Slide 8 2016-04-22: Beyond SOLID: The Package Principles Slide 9 2016-04-22: Beyond SOLID: The Package Principles Slide 10 2016-04-22: Beyond SOLID: The Package Principles Slide 11 2016-04-22: Beyond SOLID: The Package Principles Slide 12 2016-04-22: Beyond SOLID: The Package Principles Slide 13 2016-04-22: Beyond SOLID: The Package Principles Slide 14 2016-04-22: Beyond SOLID: The Package Principles Slide 15 2016-04-22: Beyond SOLID: The Package Principles Slide 16 2016-04-22: Beyond SOLID: The Package Principles Slide 17 2016-04-22: Beyond SOLID: The Package Principles Slide 18 2016-04-22: Beyond SOLID: The Package Principles Slide 19 2016-04-22: Beyond SOLID: The Package Principles Slide 20 2016-04-22: Beyond SOLID: The Package Principles Slide 21 2016-04-22: Beyond SOLID: The Package Principles Slide 22 2016-04-22: Beyond SOLID: The Package Principles Slide 23 2016-04-22: Beyond SOLID: The Package Principles Slide 24 2016-04-22: Beyond SOLID: The Package Principles Slide 25 2016-04-22: Beyond SOLID: The Package Principles Slide 26 2016-04-22: Beyond SOLID: The Package Principles Slide 27 2016-04-22: Beyond SOLID: The Package Principles Slide 28 2016-04-22: Beyond SOLID: The Package Principles Slide 29 2016-04-22: Beyond SOLID: The Package Principles Slide 30
Upcoming SlideShare
Vertical vs horizontal software architecture ruby conf india 2016
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

2016-04-22: Beyond SOLID: The Package Principles

Download to read offline

Reprise: The four design smells (Rigidity, Fragility, Immobility, Viscosity)
SOLID reprise: Quick overview of the first five principles
SRP Update: It's not just about classes!
Package Cohesion Principles:
* Release-Reuse Equivalency Principle (REP)
* Common Closure / Cohesion Collocation Principle (CCP)
* Common Reuse Principle (CRP)
Package Coupling Principles:
* Acyclic Dependencies Principle (ADP)
* Stable Dependencies Principle (SDP)
* Stable Abstractions Principle (SAP)
Mnemonics for remembering them: ACCESS, CASE
And don't forget Robert "Uncle Bob" C. Martin!

This is the original Google Drive slides:
https://docs.google.com/a/nelkinda.com/presentation/d/1yEOCYWhIgMfiDAJYtvB5ongE2qvcA91tPqLB4TzEcwM/edit?usp=sharing

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

2016-04-22: Beyond SOLID: The Package Principles

  1. 1. Beyond SOLID: The Package Principles Red Panda Innovation Labs Code Words 2016-04-22 Christian Hujer CEO / CTO Nelkinda Software Craft Pvt Ltd
  2. 2. Agenda 1.The Four Design Smells 2.Origins and Reprise of SOLID 3.ACCESS / CASE - The Package Principles a.Package Cohesion Principles b.Package Coupling Principles c.Mnemonics
  3. 3. Definitions Software Entity Statement / line / method / class / package / service Component Logical (model / architecture / design) group of Software Entities Package Physical (e.g. directory, gem, jar) group of Software Entities Collocation Putting things in the same Component / Package Cohesion Things that are changed together Coupling Dependency that potentially propagates change
  4. 4. 1. The Four Design Smells
  5. 5. The Four Design Smells ●Rigidity ●Fragility ●Immobility ●Viscosity
  6. 6. Rigidity What is Rigidity? Existing Code that causes Effort (known Effort) What causes Rigidity? Coupling
  7. 7. Fragility ●What is Fragility? ○Existing Code that causes Risk (unknown Effort) ●What causes Fragility? ○Coupling ○Lack of Cohesion
  8. 8. Immobility What is Immobility? The difficulty (extra Effort) to reuse something. Rigidity and Fragility in the context of reuse. What causes Immobility? Coupling Lack of Cohesion
  9. 9. Viscosity What is Viscosity? Continuous extra Effort (Time) What causes Viscosity? Coupling Bad development setup / tools
  10. 10. 2. The SOLID Principles A short reminder
  11. 11. SRP - Single Responsibility OCP - Open-Closed LSP - Liskov Substitution ISP - Interface Segregation DIP - Dependency Inversion Reminder of SOLID
  12. 12. Design Principles and Design Patterns (2000) Mentions 10 principles ● Principles of Object Oriented Class Design: OCP, LSP, DIP, ISP ● Principles of Package Architecture: REP, CCP, CRP, ADP, SDP, SAP Origin of SOLID
  13. 13. 3. The Package Principles
  14. 14. The Package Principles Package Cohesion Principles REP - Release Reuse Equivalency CCP - Common Closure CRP - Common Reuse Package Coupling Principles ADP - Acyclic Dependencies SDP - Stable Dependencies SAP - Stable Abstractions
  15. 15. 3.a. Package Cohesion Principles
  16. 16. Release Reuse Equivalency Principle “The granule of reuse is the granule of release.” Reuse === Release Bundler / Gems, NPM, Jars / Maven, RPM, APT, Brew...
  17. 17. Common Closure Principle (Cohesion) “Classes that change together belong together.” ⇒ This also is a nice pragmatic definition of cohesion and that cohesive elements should be collocated. I call it: Cohesion Collocation Principle
  18. 18. Common Reuse Principle (Cohesion) “Classes that aren’t reused together should not be grouped together.” This is really the inversion of the idea that “Classes that change together belong together.”
  19. 19. 3.b. Package Coupling Principles
  20. 20. Acyclic Dependencies Principle “The dependencies between packages must not form cycles.”
  21. 21. Stable Dependencies Principle “Depend in the direction of stability.”
  22. 22. Stable Abstractions Principle “Stable packages should be abstract packages.”
  23. 23. 3.c. Mnemonics How to remember all this stuff?!
  24. 24. ACCESS Your new mnemonic acronym Combine to SOLID ACCESS
  25. 25. ACCESS Mnemonic Acronym ADP - Acyclic Dependencies CCP - Common Closure (Cohesion Collocation) CRP - Common Reuse REP - Release Reuse Equivalency SAP - Stable Abstractions SDP - Stable Dependencies
  26. 26. CASE A shorter mnemonic acronym Combine to SOLID CASE
  27. 27. CASE - A new mnemonic acronym Cohesion / Common CCP / CRP Common Closure / Reuse Acyclic ADP Acyclic Dependencies Stability SAP / SDP Stable Abstractions / Dependencies Equivalence REP Release Reuse Equivalency
  28. 28. Related Topics Software Architecture and Design Software Metrics Clean Code Refactoring TDD, ATDD and BDD Agile Methods, Scrum, Extreme Programming Continuous Integration / Delivery / Deployment, DevOps Software Craftsmanship Law of Demeter / Tell Don’t Ask CQS - Command Query Separation Programming Paradigms (Functional, Structured, Object-Oriented, Object- Functional, Logic)
  29. 29. References ● SOLID and Package Principles, Design Smells: Design Principles and Design Patterns (Robert C. Martin, 2000) ● ACCESS mnemonic: Christian Hujer ● CASE mnemonic: Christian Hujer and Mark Burns
  30. 30. Thank you! Questions? Follow me on Twitter: @christianhujer

Reprise: The four design smells (Rigidity, Fragility, Immobility, Viscosity) SOLID reprise: Quick overview of the first five principles SRP Update: It's not just about classes! Package Cohesion Principles: * Release-Reuse Equivalency Principle (REP) * Common Closure / Cohesion Collocation Principle (CCP) * Common Reuse Principle (CRP) Package Coupling Principles: * Acyclic Dependencies Principle (ADP) * Stable Dependencies Principle (SDP) * Stable Abstractions Principle (SAP) Mnemonics for remembering them: ACCESS, CASE And don't forget Robert "Uncle Bob" C. Martin! This is the original Google Drive slides: https://docs.google.com/a/nelkinda.com/presentation/d/1yEOCYWhIgMfiDAJYtvB5ongE2qvcA91tPqLB4TzEcwM/edit?usp=sharing

Views

Total views

960

On Slideshare

0

From embeds

0

Number of embeds

7

Actions

Downloads

17

Shares

0

Comments

0

Likes

0

×