You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Narayan Patil <nm...@gmail.com> on 2010/03/08 07:28:05 UTC

Event & Service

Hi List,

What is the difference between Event and Service ?

Regards
Narayan

Re: Event & Service

Posted by Akhilesh Madmale <ak...@hotwaxmedia.com>.
Hi Narayan!
some of Basic differences are

1)Service returns map but, event returns String.
2)Services are loads when we restart the server.
3)we can call service inside event.But we cannot call event inside service.

Event types= java events, minilang events
Service engine types= simple, java, entity auto,interface and group

two primary tasks for events: validation and conversion using map processor
primary tasks for services: create,update,delete

Regards
Akhilesh

Narayan Patil wrote:
> Hi List,
>
> What is the difference between Event and Service ?
>
> Regards
> Narayan
>
>   

Re: Event & Service

Posted by Santosh Malviya <sa...@gmail.com>.
Hello Narayan,

Events are used for validation and conversion while services are used for
business logic like CRUD operations.
If you are a beginner in ofbiz then go to following link and try this
tutorial: -

http://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide

HTH

Thanks and Regards
Santosh Malviya


On Mon, Mar 8, 2010 at 11:58 AM, Narayan Patil <nm...@gmail.com> wrote:

> Hi List,
>
> What is the difference between Event and Service ?
>
> Regards
> Narayan
>

Re: Event & Service

Posted by Jacques Le Roux <ja...@les7arts.com>.
Actually I think it like that: an event which is not a service is an event 

Jacques

From: "James McGill" <ja...@ableengineering.com>
> On Mon, Dec 6, 2010 at 1:45 AM, pankaj savita <pa...@gmail.com> wrote:
>> Hi Jacques,
>>
>> One more point can be added...
>> In Service we can perform additional check for authentication. After
>> controller it will recheck for auth="true" in service.
>> But in Event we don't have this facility, Events are called directly form
>> the controller.
> 
> The only point of confusion for me is in <event type="service"...>
> 
> In this case, an event *is* a service.
> 
> -- 
> James McGill
> Phoenix AZ
>


Re: Event & Service

Posted by James McGill <ja...@ableengineering.com>.
On Mon, Dec 6, 2010 at 1:45 AM, pankaj savita <pa...@gmail.com> wrote:
> Hi Jacques,
>
> One more point can be added...
> In Service we can perform additional check for authentication. After
> controller it will recheck for auth="true" in service.
> But in Event we don't have this facility, Events are called directly form
> the controller.

The only point of confusion for me is in <event type="service"...>

In this case, an event *is* a service.

-- 
James McGill
Phoenix AZ

Re: Event & Service

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Pankaj,

This is very specific and I wonder if we should add this to the FAQ. For instance I think there are no such use cases OOTB. How did 
you cross this need?

Thanks

Jacques

From: "pankaj savita" <pa...@gmail.com>
> Hi Jacques,
>
> One more point can be added...
> In Service we can perform additional check for authentication. After
> controller it will recheck for auth="true" in service.
> But in Event we don't have this facility, Events are called directly form
> the controller.
>
> -- 
> Thanks & Regards,
> Pankaj Savita
> Mob: +91 9890262476
> Mail to: pankajsavita@gmail.com
>
>
> On Sun, Dec 5, 2010 at 4:39 PM, Jacques Le Roux <
> jacques.le.roux@les7arts.com> wrote:
>
>> Done at
>> https://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-Miscellaneous
>> from http://markmail.org/message/bie7fqs4f6bk6ykx
>>
>> Really a beautiful piece of simple collaboration
>>
>> Thanks guys!
>>
>> Jacques
>>
>> From: "Jacques Le Roux" <ja...@les7arts.com>
>>
>>  This thread contains a pretty complete definition of event vs service. I
>>> will try to put this in FAQ... some day...
>>>
>>> Thanks guys!
>>>
>>> Jacques
>>>
>>> From: "Bilgin Ibryam" <bi...@gmail.com>
>>>
>>>> Hans Bakker wrote:
>>>>
>>>>> An event is specific local piece functionality normally used in one
>>>>> place for one purpose and called from its location.
>>>>>
>>>>> A service is a piece of functionality which can be located anywhere on
>>>>> the network, is most of time used in several different places and is
>>>>> called by its 'name'
>>>>>
>>>>> Regards,
>>>>> Hans
>>>>>
>>>>>  In addition, in case of events you have access to HttpServletRequest
>>>> and HttpServletResponse obejcts and you can read/write whatever you want.
>>>> In case of services, you have access only to service parameters.
>>>>
>>>> Bilgin
>>>>
>>>>
>>>
>>
>>
> 



Re: Event & Service

Posted by pankaj savita <pa...@gmail.com>.
Hi Jacques,

One more point can be added...
In Service we can perform additional check for authentication. After
controller it will recheck for auth="true" in service.
But in Event we don't have this facility, Events are called directly form
the controller.

-- 
Thanks & Regards,
Pankaj Savita
Mob: +91 9890262476
Mail to: pankajsavita@gmail.com


On Sun, Dec 5, 2010 at 4:39 PM, Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:

> Done at
> https://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-Miscellaneous
> from http://markmail.org/message/bie7fqs4f6bk6ykx
>
> Really a beautiful piece of simple collaboration
>
> Thanks guys!
>
> Jacques
>
> From: "Jacques Le Roux" <ja...@les7arts.com>
>
>  This thread contains a pretty complete definition of event vs service. I
>> will try to put this in FAQ... some day...
>>
>> Thanks guys!
>>
>> Jacques
>>
>> From: "Bilgin Ibryam" <bi...@gmail.com>
>>
>>> Hans Bakker wrote:
>>>
>>>> An event is specific local piece functionality normally used in one
>>>> place for one purpose and called from its location.
>>>>
>>>> A service is a piece of functionality which can be located anywhere on
>>>> the network, is most of time used in several different places and is
>>>> called by its 'name'
>>>>
>>>> Regards,
>>>> Hans
>>>>
>>>>  In addition, in case of events you have access to HttpServletRequest
>>> and HttpServletResponse obejcts and you can read/write whatever you want.
>>> In case of services, you have access only to service parameters.
>>>
>>> Bilgin
>>>
>>>
>>
>
>

Re: Event & Service

Posted by Jacques Le Roux <ja...@les7arts.com>.
Done at 
https://cwiki.apache.org/confluence/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-Miscellaneous
from http://markmail.org/message/bie7fqs4f6bk6ykx

Really a beautiful piece of simple collaboration

Thanks guys!

Jacques

From: "Jacques Le Roux" <ja...@les7arts.com>
> This thread contains a pretty complete definition of event vs service. I will try to put this in FAQ... some day...
>
> Thanks guys!
>
> Jacques
>
> From: "Bilgin Ibryam" <bi...@gmail.com>
>> Hans Bakker wrote:
>>> An event is specific local piece functionality normally used in one
>>> place for one purpose and called from its location.
>>>
>>> A service is a piece of functionality which can be located anywhere on
>>> the network, is most of time used in several different places and is
>>> called by its 'name'
>>>
>>> Regards,
>>> Hans
>>>
>> In addition, in case of events you have access to HttpServletRequest and HttpServletResponse obejcts and you can read/write 
>> whatever you want.
>> In case of services, you have access only to service parameters.
>>
>> Bilgin
>>
> 



Re: Event & Service

Posted by Jacques Le Roux <ja...@les7arts.com>.
This thread contains a pretty complete definition of event vs service. I will try to put this in FAQ... some day...

Thanks guys!

Jacques

From: "Bilgin Ibryam" <bi...@gmail.com>
> Hans Bakker wrote:
>> An event is specific local piece functionality normally used in one
>> place for one purpose and called from its location.
>>
>> A service is a piece of functionality which can be located anywhere on
>> the network, is most of time used in several different places and is
>> called by its 'name'
>>
>> Regards,
>> Hans
>>   
> In addition, in case of events you have access to HttpServletRequest and 
> HttpServletResponse obejcts and you can read/write whatever you want.
> In case of services, you have access only to service parameters.
> 
> Bilgin
>


Re: Event & Service

Posted by Bilgin Ibryam <bi...@gmail.com>.
Hans Bakker wrote:
> An event is specific local piece functionality normally used in one
> place for one purpose and called from its location.
>
> A service is a piece of functionality which can be located anywhere on
> the network, is most of time used in several different places and is
> called by its 'name'
>
> Regards,
> Hans
>   
In addition, in case of events you have access to HttpServletRequest and 
HttpServletResponse obejcts and you can read/write whatever you want.
In case of services, you have access only to service parameters.

Bilgin

Re: Event & Service

Posted by Hans Bakker <ma...@antwebsystems.com>.
An event is specific local piece functionality normally used in one
place for one purpose and called from its location.

A service is a piece of functionality which can be located anywhere on
the network, is most of time used in several different places and is
called by its 'name'

Regards,
Hans
-- 
Antwebsystems.com: Quality OFBiz services for competitive rates

On Mon, 2010-03-08 at 11:58 +0530, Narayan Patil wrote:
> Hi List,
> 
> What is the difference between Event and Service ?
> 
> Regards
> Narayan