How are GoF patterns used in modern frameworks like Spring and Django?

Answer

Modern frameworks are essentially codified collections of GoF patterns applied at scale. In Spring: the IoC container is an Abstract Factory that creates and wires beans; every singleton bean is a Singleton; @Transactional uses a Proxy (AOP) to wrap methods with transaction management; JdbcTemplate uses Template Method, with the SQL and result extraction as the variable steps; ApplicationEvents implement Observer. In Django: the ORM's QuerySet uses a lazy Proxy; Django signals implement Observer; class-based views use Template Method; the AUTH_USER_MODEL setting is an Abstract Factory substitution. In Laravel: facades are essentially a Proxy + Singleton combination, the service container is an Abstract Factory, Eloquent model events use Observer, and middleware implements Chain of Responsibility. Understanding these mappings lets you reason about framework behavior at a deeper level.