Oltre ai design pattern a livello di oggetti, i modelli architetturali definiscono la struttura di alto livello delle applicazioni — come a livelli, esagonale (ports and adapters), clean architecture, e event-driven. Organizzano interi sistemi per manutenibilità, testabilità e flessibilità.
Architettura a livelli (n-tier)
LAYERED → organize the app into horizontal LAYERS, each with a responsibility:
PRESENTATION (UI) → APPLICATION/business logic → DATA ACCESS → DATABASE
→ each layer depends only on the layer below; clear separation
✓ simple, common, organized ✗ can become rigid; layers can leak; less flexible
