Hello,
What's the difference between service and event ? When to used them? Thanks, popo |
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 <[hidden email]> wrote: > Hello, > What's the difference between service and event ? > When to used them? > > Thanks, > popo > -- Regards, Varun Bhansaly |
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<[hidden email]> wrote: > >> Hello, >> What's the difference between service and event ? >> When to used them? >> >> Thanks, >> popo >> > > -- Thanks& Regards Ankush Upadhyay |
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 < [hidden email]> 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<[hidden email]> wrote: >> >> Hello, >>> What's the difference between service and event ? >>> When to used them? >>> >>> Thanks, >>> popo >>> >>> >> >> > -- > Thanks& Regards > Ankush Upadhyay > > |
In reply to this post by Budianto Lie
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 <[hidden email]> 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 |
Hi All,
Thanks for the information :) Popo On Mon, Feb 27, 2012 at 12:25 PM, Brajesh Patel <[hidden email]>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 <[hidden email]> 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 > |
In reply to this post by brajeshpatel
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 [hidden email] ________________________________ From: Brajesh Patel <[hidden email]> To: [hidden email] 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 <[hidden email]> 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 |
Free forum by Nabble | Edit this page |