BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Implementing Hexagonal Architecture using Life Preserver and Spring Framework

| by Jan Stenberg on Aug 31, 2013. Estimated reading time: 1 minute |

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 Stage
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.

Tell us what you think

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

Email me replies to any of my messages in this thread
Community comments

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

Email me replies to any of my messages in this thread

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

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and dont miss out on content that matters to you

BT