You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Budianto Lie <po...@gmail.com> on 2012/02/26 15:23:07 UTC

different between service and event

Hello,
What's the difference between service and event ?
When to used them?

Thanks,
popo

Re: different between service and event

Posted by Calvin Jiang <wi...@gmail.com>.
Thanks so much. It make us those fresher to learn ofBiz better understand
ofBiz.

On Mon, Feb 27, 2012 at 12:09 PM, Ankush Upadhyay <
ankush.upadhyay@hotwaxmedia.com> wrote:

> Some differences are :--
> (1)Services are used for the Business logics to achieve some specific task
>     and  Events are Used specially for the some kind of Validation before
> performing Business oriented task. but in the Events we can also perform
> every         thing that we can done in Services. but the Best practices
> says that you should separated Business Logics and validation or conversion
> related logics          to avoid code complexity and increase readability.
> (2) Services return Map whereas Events return String but not Map.
> (3) Service definitions are loaded when you start the server and in each
> time when any changes in service definition not in implementation(when
> services     implemented in miniLang not in java) you should have to reload
> the services means restart the server. but for the Event you should have to
> give path         where this event exist in controller in request-map not
> need to restart the server(when in miniLang).
> (4) we can call service inside Event but we can not call Event inside
> Service.
>
>
>
> On 02/26/2012 09:22 PM, varun bhansaly wrote:
>
>> Have a look at these -
>> https://cwiki.apache.org/**OFBIZ/faq-tips-tricks-**
>> cookbook-howto.html#FAQ-Tips-**Tricks-Cookbook-HowTo-**
>> WhatisthedifferencebetweenEven**tandService%3F<https://cwiki.apache.org/OFBIZ/faq-tips-tricks-cookbook-howto.html#FAQ-Tips-Tricks-Cookbook-HowTo-WhatisthedifferencebetweenEventandService%3F>
>>
>> http://ofbiz.135035.n4.nabble.**com/Best-practices-Event-vs-**
>> Service-td2306346.html<http://ofbiz.135035.n4.nabble.com/Best-practices-Event-vs-Service-td2306346.html>
>>
>>
>> On Sun, Feb 26, 2012 at 7:53 PM, Budianto Lie<po...@gmail.com>  wrote:
>>
>>  Hello,
>>> What's the difference between service and event ?
>>> When to used them?
>>>
>>> Thanks,
>>> popo
>>>
>>>
>>
>>
> --
> Thanks&  Regards
> Ankush Upadhyay
>
>

Re: different between service and event

Posted by Ankush Upadhyay <an...@hotwaxmedia.com>.
Some differences are :--
(1)Services are used for the Business logics to achieve some specific task
      and  Events are Used specially for the some kind of Validation 
before performing Business oriented task. but in the Events we can also 
perform every         thing that we can done in Services. but the Best 
practices says that you should separated Business Logics and validation 
or conversion related logics          to avoid code complexity and 
increase readability.
(2) Services return Map whereas Events return String but not Map.
(3) Service definitions are loaded when you start the server and in each 
time when any changes in service definition not in implementation(when 
services     implemented in miniLang not in java) you should have to 
reload the services means restart the server. but for the Event you 
should have to give path         where this event exist in controller in 
request-map not need to restart the server(when in miniLang).
(4) we can call service inside Event but we can not call Event inside 
Service.


On 02/26/2012 09:22 PM, varun bhansaly wrote:
> Have a look at these -
> https://cwiki.apache.org/OFBIZ/faq-tips-tricks-cookbook-howto.html#FAQ-Tips-Tricks-Cookbook-HowTo-WhatisthedifferencebetweenEventandService%3F
>
> http://ofbiz.135035.n4.nabble.com/Best-practices-Event-vs-Service-td2306346.html
>
>
> On Sun, Feb 26, 2012 at 7:53 PM, Budianto Lie<po...@gmail.com>  wrote:
>
>> Hello,
>> What's the difference between service and event ?
>> When to used them?
>>
>> Thanks,
>> popo
>>
>
>

-- 
Thanks&  Regards
Ankush Upadhyay


Re: different between service and event

Posted by varun bhansaly <vb...@gmail.com>.
Have a look at these -
https://cwiki.apache.org/OFBIZ/faq-tips-tricks-cookbook-howto.html#FAQ-Tips-Tricks-Cookbook-HowTo-WhatisthedifferencebetweenEventandService%3F

http://ofbiz.135035.n4.nabble.com/Best-practices-Event-vs-Service-td2306346.html


On Sun, Feb 26, 2012 at 7:53 PM, Budianto Lie <po...@gmail.com> wrote:

> Hello,
> What's the difference between service and event ?
> When to used them?
>
> Thanks,
> popo
>



-- 
Regards,
Varun Bhansaly

Re: different between service and event

Posted by Budianto Lie <po...@gmail.com>.
Hi All,
Thanks for the information :)

Popo

On Mon, Feb 27, 2012 at 12:25 PM, Brajesh Patel <br...@gmail.com>wrote:

> hi Popo,
>
> Major difference between service and event is that service perform
> transaction rollback if any error occur at the time of transaction but in
> event not.
>
> Thanks
>
> On Sun, Feb 26, 2012 at 7:53 PM, Budianto Lie <po...@gmail.com> wrote:
>
> > Hello,
> > What's the difference between service and event ?
> > When to used them?
> >
> > Thanks,
> > popo
> >
>
>
>
> --
> Thanks
> Brajesh Patel
>
> Salmon Software India Pvt. Ltd
> Cell:- +91 8750709907
>

Re: different between service and event

Posted by Shrikant Jaiswal <sh...@yahoo.com>.
Hi ,
 We use events to shear the unwanted load from service engine. The additional tasks are performs in events such as validation checking etc. 
There are main four difference between event and services that are: 
1. Service tack map as an input and gives map as output, while events tack map as input and gives string as output .
2. Session related tasks are performed in events .
3.We can call a service from an event, but we not call any event from service .
4.We use services in outer world while, we not use uses the events that is events are application specific.

Regards ,
Shrikant Jaiswal
Enterprise Software Developer 
HotWax Media 
shrikant.jaiswal@hotwaxmedia.com

________________________________
 From: Brajesh Patel <br...@gmail.com>
To: user@ofbiz.apache.org 
Sent: Monday, February 27, 2012 10:55 AM
Subject: Re: different between service and event
 
hi Popo,

Major difference between service and event is that service perform
transaction rollback if any error occur at the time of transaction but in
event not.

Thanks

On Sun, Feb 26, 2012 at 7:53 PM, Budianto Lie <po...@gmail.com> wrote:

> Hello,
> What's the difference between service and event ?
> When to used them?
>
> Thanks,
> popo
>



-- 
Thanks
Brajesh Patel

Salmon Software India Pvt. Ltd
Cell:- +91 8750709907

Re: different between service and event

Posted by Brajesh Patel <br...@gmail.com>.
hi Popo,

Major difference between service and event is that service perform
transaction rollback if any error occur at the time of transaction but in
event not.

Thanks

On Sun, Feb 26, 2012 at 7:53 PM, Budianto Lie <po...@gmail.com> wrote:

> Hello,
> What's the difference between service and event ?
> When to used them?
>
> Thanks,
> popo
>



-- 
Thanks
Brajesh Patel

Salmon Software India Pvt. Ltd
Cell:- +91 8750709907