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
Manoj DegaManoj Dega 

What is difference between helper and handler classes ?

HI Everyone,

I have a confusion about Helper and Handler classes.
Can some please explain briefly what are those?

Thanks in advance
$hwet@$hwet@
Hi Manoj,

I myself was searching the same and got this. 
https://webcache.googleusercontent.com/search?q=cache:jSv16-XL3Q4J:https://blog.mirketa.com/salesforce-developer-guide-use-of-helperhandler-class-to-manage-trigger-execution/+&cd=10&hl=en&ct=clnk&gl=ph

Do let me know if you find anything else. It will be a great help.

Regards,
Shweta
Raj VakatiRaj Vakati

A 'Handler' is usually a single function wrapped in an object. These are needed when programming in legacy languages without first-class functions.




"helper " has no official definition. It is just a code you want to reuse any where that helps or assists other functions.
Deepali KulshresthaDeepali Kulshrestha
Hi Manoj,

There is a simple and basic difference between both the classes

The term Handler is basically used while using triggers. Handlers classes are used to Handle the execution of triggers.
If you are working on custom application development on force.com or customizing salesforce to do event-driven updates,
you will end up writing quite a few triggers and in some cases more than one trigger on the same object.

You usually deal with helper classes when you are working on the Lightning platform.
The helper is javascript "shared code", and reduces the memory footprint of each component by sharing common methods. 
The controller itself is duplicated each time, so it should be as small as possible to reduce memory usage. 

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha
Rama Gaikwad 1Rama Gaikwad 1
Hi Deepali , 
                      Can you explain above  in brief with example.
Sreenu Reddy 16Sreenu Reddy 16
Hi Deepali ,
can you explaine some more details with examples .
Thsnks,
Srini