Instantly share code, notes, and snippets.

@jmewes /notes.md Secret
Created Oct 26, 2017

Embed
What would you like to do?
Hexagonal architecture -- Alistair Cockburn

http://alistair.cockburn.us/Hexagonal+architecture

  • aka. Ports & Adapters

  • allows an application to be controlled by different input source, e.g. users, scripts, and automated tests

  • creates a new layer without business logic

  • every piece of functionality is offered via an API

  • "the application communicates over ‘’ports’’ to external agencies."

  • port ~ generic interface; adapter ~ specific implementation

  • The the port is injected into the application e.g. via the constructor

Related pattern

  • Factory Pattern (=> GoF)
  • Adapter Pattern (=> GoF)
  • Dependency injection (=> Martin Fowler)
  • Inversion of Control (=> Robert Martin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment