You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Mayank Lambhate <ma...@hotwaxsystems.com> on 2017/11/03 06:32:55 UTC

Worker, Helper and Util Classes

Hello,

Recently, I was exploring about multiple class patterns in OFBiz like
Worker, Helper and Util classes.

I understood the importance of Util classes, however I am not able to
clearly distinguish between Worker and Helper classes, as both classes
mostly have static methods and are not used for business logic.

Both the classes contains methods that simply, either fetch data, or just
prepare a data set to be used further use in business logic. Also, in
Worker methods, we put some additional logics and calculations to fetch the
desired records, which seems to be less followed in Helper classes.

Can anyone help me understand the difference and the use cases of these
methods?


*-Mayank Lambhate* | Enterprise Software Engineer
HotWax Commerce <http://www.hotwax.co/> by HotWax Systems
<http://www.hotwaxsystems.com/>

Re: Worker, Helper and Util Classes

Posted by James Yong <ja...@apache.org>.
Hi Mayank,

Please see this:
http://ofbiz.135035.n4.nabble.com/Helper-Worker-Wrapper-td4041022.html

Regards,
James Yong

On 2017-11-03 14:32, Mayank Lambhate <ma...@hotwaxsystems.com> wrote: 
> Hello,
> 
> Recently, I was exploring about multiple class patterns in OFBiz like
> Worker, Helper and Util classes.
> 
> I understood the importance of Util classes, however I am not able to
> clearly distinguish between Worker and Helper classes, as both classes
> mostly have static methods and are not used for business logic.
> 
> Both the classes contains methods that simply, either fetch data, or just
> prepare a data set to be used further use in business logic. Also, in
> Worker methods, we put some additional logics and calculations to fetch the
> desired records, which seems to be less followed in Helper classes.
> 
> Can anyone help me understand the difference and the use cases of these
> methods?
> 
> 
> *-Mayank Lambhate* | Enterprise Software Engineer
> HotWax Commerce <http://www.hotwax.co/> by HotWax Systems
> <http://www.hotwaxsystems.com/>
>