Skip to content

lucaminudel/tensions_and_synergies_between_design_principles

Repository files navigation

Tensions and synergies between design principles

Between different object-oriented design principles there are tensions and synergies.

A professional software developer should have an overall sense of all the forces at work in the code design when coding.

Ilias Bartolini developed a coding-dojo that a group of people can run multiple times to explore and develop a sense of the forces generated in the code by different design principles.

Code examples

In this repo you find small code examples, each showing a tension or a synergy between two object-oriented design principles.

If you have more examples, please share them with a pull request.

Additional Refactoring Coding-Dojo

From the original coding-dojo, attendees can refactor the 'Before' code by applying one design principle producing an 'After' code and then observing the tension with another design principle.

Here I'm adding more refactoring exercises where attendees are asked to refactor the 'After' code to resolve the tension by finding a good tradeoff.

For the facilitator, I've added a C# example for the 'TensionBetweenSRPandEncapsulation' with a 'Worse' solution and a 'Beter' solution and some notes for the facilitator. More examples are needed for the other cases of tension and for the other languages.

Credits

Thanks to Ilias Bartolini for creating a coding-dojo that explores this topic and inspired these code samples.

Thanks to Daniel Tsadok for the porting of the examples to Ruby.

Thanks to Peter Oxenham for the porting of the examples to Java.

Thanks to Jonathan Reyes for the porting of the examples to JavaScript.

About

Code examples of tensions and synergies between object-oriented design principles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published