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