N-Layer to Hexagonal (Ports and Adapters) architecture
Asked Answered
C

1

6

Alistair Cockburn introduced a Hexagonal architecture, now it is called Ports and Adapters pattern. In my understanding, the concept is similar to n-layer architecture where one layer depends on the other layer via abstraction (interface) only. For example, the application layer depends on the many repository services interfaces rather it's implementation. There is no need of a separate implementation of a ports or adapters here. An IoC container like Unity can inject the implementation of the repositories, so adapters are not necessary.

Am I confusing this ports and adapters pattern with DIP (Dependency Injection Principle)?

Can someone point me to an implementation of the ports and adapters pattern? Thanks.

Conjunctiva answered 22/6, 2013 at 18:25 Comment(0)
B
3

I was looking for this myself.

Alistair Cockburn has an example with an explanation that might help you out and there was an example was given at this conference.

Behemoth answered 1/9, 2013 at 12:48 Comment(4)
Your link for "this conference" is the same as "Alistair Cockburn". Do you have the actual link still?Ref
I am not sure I follow you. The link to "this conference" is not the same as "Alistair Cockburn". Please clarify?Behemoth
Matteo Vaccari made a birthday greetings kata which might be valuable as an example as well. matteo.vaccari.name/blog/archives/154 Nat Pryce described in his book " Growing Object­-Oriented Software Guided by Tests." growing-object-oriented-software.com how the different kinds of tests he use drive the design of a computer system and show how they guide the evolution of the system's structure towards the Ports and Adapters architecture. natpryce.com/articles/000772.htmlBehemoth
That's because Loofer fixed it for you.Ref

© 2022 - 2024 — McMap. All rights reserved.