Worker, Helper and Util Classes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Worker, Helper and Util Classes

Mayank Lambhate
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/>
Reply | Threaded
Open this post in threaded view
|

Re: Worker, Helper and Util Classes

James Yong-2
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 <[hidden email]> 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/>
>