Architecture

Onion Architecture

Description

Similar to Hexagonal/Clean. It relies on the Dependency Inversion Principle. The application core needs no dependencies.

Where to use

  • Highly testable systems.

Real World Example

Core Domain -> Domain Services -> Application Services -> UI/Infra.

Code Example

class OnionArchitecture:\n    def __init__(self):\n        pass\n\n    def execute(self):\n        print('Executing Onion Architecture')