BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Implementing Hexagonal Architecture using Life Preserver and Spring Framework

Implementing Hexagonal Architecture using Life Preserver and Spring Framework

This item in japanese

Bookmarks

We have all been there, the moment when someone asks you to make a change in the software, a change that you know you can’t do, at least not without a lot of effort, Russ Miles started his presentation at a recent meeting with the London Spring user group.
Russ calls this “the inconvenient truth of the killer change”; when you realise that the different assumptions about how the system or software will evolve was wrong and that you have to answer with some bad news.

Helping with this problem, Russ shares some techniques he uses when developing Java and Spring applications that helps him experience this moment less often. What he wants from a system is adaptability. The real world changes and we want to adapt to this, but the software we build is often less adaptable than we are as developers.

For this Russ goes back to 2005 when Alistair Cockburn presented his Hexagonal Architecture as a solution to some problems he wanted to solve:

  • Problems with traditional Layering, which is not how we develop software.
  • Problems with Coupling, which e.g. show up when you do a refactoring in a development tool and lots of classes or files are changing, an evidence of of coupling.
  • Entanglement, where multiple things are going on when there shouldn’t be, which makes the software harder to understand. This is also a common place for bugs.

Russ takes the hexagonal architecture a step further and has made what he calls the Life Preserver, a tool that lets him organise and visualise how an application is separated into different subdomains or components.

To show how his thoughts can be implemented using Java and Spring, Russ goes through an example with a real application, a simplified order processing system, which is an implementation of the hexagonal architecture using an event driven architecture with all subdomains communicating by sending messages.

Earlier this year Russ made two presentations around the same subject, about using events in a systems architecture and later about building simplicity into a system with events.

A variant of the life preserver and hexagonal architectures is Clean Architecture by Robert C. Martin, “Uncle Bob”, which he talked about in June earlier this year.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT