+ 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
Hi Manoj,

I myself was searching the same and got this. 

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

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 5Rama Gaikwad 5
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 .