Skip to content

Instantly share code, notes, and snippets.

@jmewes 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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.