Posts:
20,296
Registered:
12/6/03
|
|
|
|
Understanding service granularity
Posted:
Aug 26, 2003 11:00 PM
|
|
[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
|
|
Posts:
20,296
Registered:
12/6/03
|
|
|
|
Re: Understanding service granularity
Posted:
Sep 3, 2003 11:00 PM
in response to:
import-bot
|
|
[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
|
|