Apex Trigger Framework in Salesforce with best practise
Trigger framework is not just needed for having single object per trigger guidance but also helps in different other reasons. According to the trigger framework : 1) Create a single trigger for each object. 2) A handler class which will call Action or Apex Interface based Trigger Framework Implementation One Trigger -One Object Policy Framework Implementation Bulkified Code Avoid SOQL Queries or DML statements inside FOR Loops Using Collections, Streamlining Queries, and Efficient For Loops No Hardcoding IDs Types of Framework available : 1.Handler/Controller Framework 2.Lightweight Apex Trigger Framework (Source: http://chrisaldridge.com/triggers/lightweight-apex-trigger-framework/ ) Handler Framework Example: trigger ABCTrigger on Account( after insert, after update, before insert, before update) { ABCHandler handlerFM = new ABCHandler(Trigger.isExecutin