Deal of the Day

Home » Main » Manning Forums » 2003 » Bitter EJB

Thread: Understanding service granularity

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 1 - Pages: 1 - Last Post: Sep 3, 2003 11:00 PM by: import-bot Threads: [ Previous | Next ]
import-bot

Posts: 20,296
Registered: 12/6/03
Understanding service granularity
Posted: Aug 26, 2003 11:00 PM
  Click to reply to this thread Reply

[Originally posted by karldjemal]

Hi

I've just started to read the Bitter EJB book. Having completed chapter 2,
I'm a little bit confused by what you mean by a coarse grained service Vs a
fine grained one (see table 2.4). Could you pls. provide a bit more detail
(May be its just my brain not working this morning).

Thanks

Karl


import-bot

Posts: 20,296
Registered: 12/6/03
Re: Understanding service granularity
Posted: Sep 3, 2003 11:00 PM   in response to: import-bot in response to: import-bot
  Click to reply to this thread Reply

[Originally posted by crazybob]

> Hi
>
> I've just started to read the Bitter EJB book. Having completed chapter 2,
> I'm a little bit confused by what you mean by a coarse grained service Vs a
> fine grained one (see table 2.4). Could you pls. provide a bit more detail
> (May be its just my brain not working this morning).
>
> Thanks
>
> Karl

Fine grained:

setFirstName(String value);
setLastName(String value);
setAge(int value);

Coarse grained:

setData(String firstName, String lastName, int age);

A fine grained interface is more flexible in use and reuse whereas the coarse
grained interface requires
fewer method invocations. The fine grained interface is more desirable from a
design standpoint
however the coarse is sometime necessary for performance reasons, i.e. network
round trips.


Legend
Gold: 300 + pts
Silver: 100 - 299 pts
Bronze: 25 - 99 pts
Manning Author
Manning Staff
Manning Developmental Editor