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.

wonderful world
  • 8,704
  • 14
  • 76
  • 142

1 Answers1

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.

naXa
  • 26,677
  • 15
  • 154
  • 213
user2342460
  • 114
  • 4
  • 1
    Your link for "this conference" is the same as "Alistair Cockburn". Do you have the actual link still? – Paul Mar 25 '14 at 12:39
  • I am not sure I follow you. The link to "this conference" is not the same as "Alistair Cockburn". Please clarify? – user2342460 Sep 09 '15 at 00:49
  • 1
    Matteo Vaccari made a birthday greetings kata which might be valuable as an example as well. http://matteo.vaccari.name/blog/archives/154 Nat Pryce described in his book " Growing Object­-Oriented Software Guided by Tests." http://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. http://www.natpryce.com/articles/000772.html – user2342460 Sep 09 '15 at 00:51
  • That's because Loofer fixed it for you. – Paul Sep 09 '15 at 07:54