A great article Framework Patterns talking about approaches to framework implementation:
- Callback function
- Subclassing
- Interfaces
- Imperative registration API
- Convention over configuration
- Metaclass based registration
- Language integrated registration
- DSL-based declaration
- Imperative declaration
- Language integrated declaration