Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Clean Architecture

Avatar for Buzzvil Buzzvil
April 18, 2018

Clean Architecture

By Yohan

Avatar for Buzzvil

Buzzvil

April 18, 2018
Tweet

More Decks by Buzzvil

Other Decks in Programming

Transcript

  1. Clean Code - quick summary • Naming • Small functions

    • Meaningful comments • Data abstraction • Error Handling • TDD(Unit Tests) • Building Systems
  2. Goals At working at module level, software structure should •

    Tolerate changes • Easy to understand • Basic components for reuse
  3. Our Enemies • Rigidity - difficult to change • Fragility

    - easy to break • Immobility - difficult to reuse • Viscosity - resistance against making changes
  4. Open-closed Principle • Open for extension but closed for modification

    • Example with inheritance ◦ Bad ◦ Good
  5. Liskov Substitution Principle • If for each object o1 of

    type S, there is an object o2 of type T, such that, for all programs P defined in terms of T, the behavior of P is unchanged when o1 is substituted for o2, then S is a subtype of T
  6. Dependency Inversion Principle • Source code should interact with abstractions,

    not concretions • Stable vs volatile concrete elements
  7. Takeaways • Consider actors in the system • Keep options

    open with layers • Interact with abstractions over details