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<[email protected]> wrote:
Hello,
What's the difference between service and event ?
When to used them?
Thanks,
popo
--
Thanks& Regards
Ankush Upadhyay