function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Manj_SFDCManj_SFDC 

Trigger Design Pattern

Hello everyone,

While developing the trigger the logic can be added in the trigger or can be included in the Handler classes and those handlers can be used in the trigger, will there be any disadvantages of using trigger handlers?
Steven NsubugaSteven Nsubuga
To the best of my knowledge, I have never heard of any disadvantages. 
I guess 1 disadvantage would be increased complexity, not having the logic self contained within the trigger itself. 
TSMETSME
One advantage of putting the logic in a seperate handler class is that you could reuse the created function within other apex classes and triggers. 
As far as I know there is no disadvantage and can you use the method you prefer