clean-architecture icon indicating copy to clipboard operation
clean-architecture copied to clipboard

A (work-in-progress) guide to the methodology behind Made Tech Flavoured Clean Architecture

Clean Architecture

How to begin with "Made Tech Flavoured Clean Architecture".

This style of architecture has had many names over the years including "Hexagonal", "Ports & Adapters" and "Boundary-Control-Entity".

Getting started

Architectural Concepts

  • Use Case
  • Domain
  • Gateway
  • Bounded Contexts

Learn by example (Ruby)

The best way to learn Clean Architecture is through deliberate practice.

(Work-in-progress)

Basics

  • The Mindset
  • Start with Acceptance Testing
  • Writing Fake Gateways
  • Use Cases organise your code
  • Constructors are for collaborators
  • Don't leak your internals!
  • TDD everything
  • Build in a reliable dependency upgrade path
  • Your first Real Gateway
  • Your first Delivery Mechanism

Intermediate

  • Presenters are more flexible
  • Keep your wiring DRY
  • Extend Use Case behaviour with Domain objects
  • Extracting a Use Case from a Use Case
  • Authentication
  • Authorisation

Advanced

  • Consider the Actors
  • Substitutable Use Cases
  • Feature Toggles
  • Keep your Domain object construction DRY

Examples in Languages

  • Ruby
  • Kotlin
  • Go
  • Clojure
  • JS

Further Reading

Clean Architecture by Robert C. Martin is extremely similar in nature to

The Made Tech flavour is slightly different still to exactly what is described in Robert C. Martin's book about Clean Architecture, the choice to rename certain basic concept is deliberate to aid:

  • Learning as a Junior
    • Relating Interactors (Robert's name for UseCase objects) to Use Case Analysis sessions
    • Retaining an eye on Domain-Driven-Design i.e. What are Domain objects?
    • Avoiding overloading terminology e.g. Entity (Robert's name for Domain Objects) with EntityFramework Entities

Made Tech flavour Clean Architecture is more prescriptive than any of these other examples

Reference