Content deleted Content added
→Principle: Fixed typo Tags: Mobile edit Mobile web edit |
m Task 16: replaced (1×) / removed (3×) deprecated |dead-url= and |deadurl= with |url-status=; |
||
Line 1:
The '''hexagonal architecture''', or '''ports and adapters architecture''', is an architectural pattern used in [[software design]]. It aims at creating loosely coupled application components that can be easily connected to their software environment by means of ports and adapters. This makes components exchangeable at any level and facilitates test automation.<ref name=":0">{{Cite web|url=http://alistair.cockburn.us/Hexagonal+architecture|title=Hexagonal architecture|last=Alistair|first=Cockburn|date=2005-04-01|website=alistair.cockburn.us|archive-url=https://web.archive.org/web/20180822100852/alistair.cockburn.us/Hexagonal+architecture|archive-date=2018-08-22|
== Origin ==
The hexagonal architecture was invented by [[Alistair Cockburn]] in an attempt to avoid known structural pitfalls in [[Object-oriented analysis and design|object oriented software design]], such as undesired dependencies between [[Layer (object-oriented design)|layers]] and contamination of [[user interface]] code with [[business logic]], and published in 2005.<ref>{{Cite web|url=https://www.infoq.com/news/2014/10/exploring-hexagonal-architecture/|title=Exploring the Hexagonal Architecture|last=Stenberg|first=Jan|date=2014-10-31|website=InfoQ
The term "hexagonal" comes from the graphical conventions that shows the application component like a [[hexagon]]al cell. The purpose was not to suggest that there would be six borders/ports, but to leave enough space to represent the different interfaces needed between the component and the external world.<ref name=":0" />
Line 25:
== Variants ==
The onion architecture proposed by Jeffrey Palermo in 2008 is similar to the hexagonal architecture: it also externalizes the infrastructure with proper interfaces to ensure loose coupling between the application and the database.<ref>{{Cite web|url=https://jeffreypalermo.com/2008/07/the-onion-architecture-part-1/|title=The Onion Architecture : part 1|last=Jeffrey|first=Palermo|date=2008-07-29|website=Programming with Palermo|language=en-US
The clean architecture proposed by [[Robert C. Martin]] in 2012 combines the principles of the hexagonal architecture, the onion architecture and several other variants; It provides additional levels of detail of the component, which are presented as concentric rings. It isolates adapters and interfaces (user interface, databases, external systems, devices) in the outer rings of the architecture and leaves the inner rings for [[use case]]s and [[Entity class|entities]]<ref>{{Cite web|url=https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html|title=The Clean architecture {{!}} Clean Coder Blog|last=Martin|first=Robert, C.|date=2012-08-12|website=blog.cleancoder.com
== See also ==
|