- Simplicity
- Readability
- Separation of Concerns
- Multi-Dev Stream Friendly
- Order of Execution
- Muting
- 2 level simple structure for easy access and readability
- Descriptive business scenario based trigger handler name for easy understanding of business purpose
- Easy maintenance of single purpose handler class
- Trigger - High level trigger execution flow
- Trigger handler class - Detailed business logic code
- Trigger Data class - Collection of all data from trigger context
- Single purpose handler class means developers will never override each other's code
- Trigger handlers are executed in the order they are bound
- Consolidate common data loading in TriggerDataManager
- Consolidate DMLs in TriggerDataManager
- Virtual method to restrict data - Fast code execution and future proof
- Configurable trigger muting
- Profile & user level control
- Triggers
- TriggerHandlerBase
- TriggerDataManagerBase
- TriggerParameters
Sample code can be found here: https://github.com/ianhuang/AppFrameworkExamples
http://www.tgerm.com/2012/01/salesforce-apex-trigger-template.html