You are correct. I have limited experience using the service layer pattern. Having it focus on the object graph does make more sense. I just wonder about a scenario where a developer needs to get a list of domain objects, and a service class may be overkill. I don't think I want him/her just calling the mappers from the presentation layer, but I'm not sure. Perhaps a less dogmatic approach is advisable. However, because I want unit testing, I really want the mapping interaction to be abstracted for testing/mocking purposes. I am also trying to get all infrastructure related concerns out of our presentation layer. That I won't bend on ;-)
> Date: Tue, 22 Apr 2008 10:54:23 -0400> From: [EMAIL PROTECTED]> To: > [email protected]> Subject: Re: Abstracting Mappers> > On Tue, Apr > 22, 2008 at 9:39 AM, Sal Bass <[EMAIL PROTECTED]> wrote:> >> The> > downside > is that if I want abstraction (I do), I need a service class for> > each > domain object.> >> > In practice, is that true? I find you end up working on > object> graphs, not individual objects, so a service class would know how to> > operate on a group of objects, not just a single object. But you are> > correct, it can be a verbose pattern to implement.> > Sheldon _________________________________________________________________ Spell a grand slam in this game where word skill meets World Series. Get in the game. http://club.live.com/word_slugger.aspx?icid=word_slugger_wlhm_admod_april08

