Architecture

Hexagonal Architecture

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:\n    def __init__(self):\n        pass\n\n    def execute(self):\n        print('Executing Hexagonal Architecture')