Description
Also known as Ports and Adapters. It allows an application to easier be tested in isolation from external devices like databases or the web.
Where to use
- Domain-Driven Design (DDD). \n
- Complex business logic.
Real World Example
The Core logic is in the center. Database adapters and REST adapters plug into the Core.
Code Example
class HexagonalArchitecture:
def __init__(self):
pass
def execute(self):
print('Executing Hexagonal Architecture')
