Skip to content

kkisiele/awesome-clean-code

Repository files navigation

Awesome Clean Code Awesome

Design Principles

Acronym coined by Robert C. Martin (Uncle Bob) to descibe the following five principles:

  1. The Single Responsibility Principle A class should have only one reason to change.
  2. The Open Closed Principle Software entities should be open for extension, but closed for modification.
  3. The Liskov Substitution Principle Derived classes must be substitutable for their base classes.
  4. The Interface Segregation Principle Make fine grained interfaces that are client specific.
  5. The Dependency Inversion Principle Depend on abstractions, not on concretions.

A local copy of "Design Principles and Design Patterns" by Robert C. Marin from objectmentor.com website. More about this principles with examples can be found here

Kent Beck's Four Rules of Simple Design

A design which:

  1. Passes all tests.
  2. Reveals intention.
  3. No duplication.
  4. Fewest elements.
  1. No null.
  2. No code in constructors.
  3. No getters and setters.
  4. No mutable objects.
  5. No static methods, not even private ones.
  6. No instanceof, type casting, or reflection.
  7. No public methods without @Override.
  8. No statements in test methods except assertThat.
  9. No implementation inheritance.
  1. Composable: plays well with others
  2. Unix philosophy: does one thing well
  3. Predictable: does what you expect
  4. Idiomatic: feels natural
  5. Domain-based: the solution domain models the problem domain in language and structure

Featured Articles

Tutorials

Videos

Code Examples

Git Hub

Blogs

Twitter

Books

Other

Releases

No releases published

Packages

No packages published