ports and adapters architecture

Last month Alistair began using a new name for the Hexagonal Architecture pattern – he now calls it the Ports and Adapters Architecture.

Now I believe that names are immensely important, and so I applaud Alistair’s search for the right name for this concept. But for some reason PortsAndAdapters rings no bells for me. Maybe I’ve simply become used to the old name, or maybe I’m averse to change. (That would be ironic for an agile coach, but I guess we all have comfort zones…) So what is it with this new name – or what does the old name have instead?

Obviously I have no quibble with the ‘Adapters’ part, because I’ve been using that term for long enough myself. But ‘Ports’? From that term I would tend to infer a fixed set of pre-existing conduits, sending and receiving signals from something specific. Whereas I tend to think of a hexagonal architecture as something much more flexible, able to post adapters (more on this soon) to a less prescribed set of real-world entities.

I tend to view the physical world as an amorphous soup to which the software system can connect adapters in fluid ways. I know that’s inherently impractical, but it makes for a great mental model when whiteboarding a system. And I think this gets near to the crux of my unease at the new name. I think of a hexagonal architecture as a whole-system view, whereas PortsAndAdapters seems to look only at the system’s connections with the physical world. The key, for me, is the symmetry, and the consequent removal of the constraints of the layered model. I don’t care about the Ports; I’m interested instead in the central core where the knowledge lives, and the ability to interact with that core in flexible ways. To me, hexagonal architecture is all about inner and outer, core and periphery, business knowledge and interfaces.

Why so much about just a name? After all, it’s clear that neither name comes close to expressing the above…

Advertisements

One thought on “ports and adapters architecture

  1. “Wabi Sabi” I say!

    I’ve recently read the book Wabi Sabi that has been advertised here on Kevin’s blog. Reading this post about finding the right name for the Hexagonal architecture reminded me of some of the Wabi Sabi concepts – perhaps they are relevant…

    It seems to me that the Hexagonal architecture and the ideas/concepts behind it are evolving. Not everyone thinks in the “hexagonal” way. It’s experimental. It’s “work in progress”.

    Maybe we should just accept this state and get on with it. Get on with using the architecture and developing it. We’re not dealing with something static or finished, so looking for a more accurate name that describes the architecture precisely isn’t that useful.

    I happen to like the term “Hexagonal Architecture”. Leaving it as it is allows room for things to move around a little – for variation.

    There was a particular phrase in the book that I liked a lot: “those who know don’t say. Those who say don’t know”. As Kevin mentioned above, the Hexagonal architecture is all about the inner and outer, business knowledge and interfaces. That’s the key to it! Why not just leave it at that?

    Gavin

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s