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

Q&A - Clean Architecture - 2PC

Q&A - Clean Architecture - 2PC

Ivan Paulovich

August 12, 2020
Tweet

More Decks by Ivan Paulovich

Other Decks in Programming

Transcript

  1. Agenda • Hexagonal Architecture Style • Dependency Inversion Principle •

    Ports and Adapters Pattern • Test-Driven Design Development (Practices) • Clean Architecture Style • Principles, Patterns and Practices. • Walkthrough an Use Case • Q&A @ivanpaulovich
  2. Dependency Inversion Principle (DIP) • High-level modules should not depend

    on low-level modules. Both should depend on abstractions. • Abstractions should not depend on details. • Details should depend on abstractions. @ivanpaulovich
  3. Business @ivanpaulovich 5 Ports and Adapters Cloud Messaging UI In

    Memory Persistence Tests In Memory Messaging SQL
  4. Business @ivanpaulovich 6 Ports and Adapters Cloud Messaging UI In

    Memory Persistence Tests In Memory Messaging SQL Ports
  5. Business v @ivanpaulovich 8 Ports and Adapters Cloud Messaging UI

    In Memory Persistence Tests In Memory Messaging SQL Adapters
  6. Clean Architecture Style Hexagonal Architecture Style Ports and Adapters Pattern

    Dependency Inversion
 Principle Test-Driven Development Object-Oriented Design
 Principles Use Cases as Central Organizing Structure Pluggable User Interface @ivanpaulovich
  7. Principles • SOLID Principles. • Package Cohesion Principles: • The

    Release Reuse Equivalency Principle. • The Common Closure Principle. • The Common Reuse Principle. • Coupling Packages Principles: • The Acyclic Dependencies Principle. • The Stable Dependencies Principle. • The Stable Abstractions Principle.
  8. Entities Entities Clean Architecture Entities Use Cases Controllers Gatew ays

    Presenters D evices W eb UI DB External Interfaces @ivanpaulovich •Abstractness increases with stability. •Modules depend in the direction of stability. •Classes that change together are packaged together.
  9. Entities Use Cases Controllers Presenters Gateways Devices UI DB Web

    External Interfaces Abstract,
 General,
 Stable,
 Consistent Concrete,
 Specific, 
 Unstable, Inconsistent Level Clean Architecture @ivanpaulovich
  10. Patterns • Use case as central organizing structure. • Ports

    and Adapters Pattern from Hexagonal Architecture.
  11. Wrapping up Clean Architecture • Clean Architecture is about usage

    and the use cases are the central organizing structure. • Use cases implementation are guided by tests. • The User Interface and secondary actors are designed to fulfil the core needs. • Defer decisions by implementing the simplest component first. 16 @ivanpaulovich