This project documents a concrete implementation of a light-weight version of the FFLIB Trigger Framework, based on the Apex Enterprise Pattern Github workspace.
SObjbectDomain: basevirtualclass that constitutes what logics should be run in the particular trigger events, and more importantly: ensures that those key 'logics' methods are called in the right order and timing(see thetriggerHandler()method).OpportunityTrigger2&OpportunityTriggerHandler2is a demonstration-only purpose example implementation of such a framework, illustrating how an actual implementation could look like:- Highlights: the application of the
onApplyDefaults()andonValidate()methods illustrates some core advantages of such a framework that provides ease in extensibility and maintenance.
- Highlights: the application of the
The classes OpportunityTrigger2, OpportunityTriggerHandler2, and so on, are for illustrative purposes only.
Furthermore, the OpportunityTriggerHandler2Test class was introduced just as a starting point for properly configured & healthy unit tests.
The postfix 2 has been added to facilitate a potential installation on a target org where there could already be an OpportunityTrigger/Handler/Test and so on.
TBD
The MIT License (MIT).