Just sharing some of my inconsequential lunch conversations with you... RSS  

Wednesday, September 12, 2007

Domain Model or Service Model? Is this the question?

I started developing professionally in C and C++ over 15 years ago. To some extent one could argue that there is some parallel between the Service Layer on C typical programming and the Domain Model on C++. So I grew up learning the methods near data Stroustrupian way of life, and feeling comfortable with it.

But still I can recognize the advantages of the Service Model, like the entity decoupling and wireability. And above all the capability to inject dependencies and mock objects.

This is an option I come across every now and then. The rational answer is probably the Service Model, but it isn't always the choice I make. Isn't it funny when we choose worse solutions just to stay on our comfort zone?

Mental note: choose more often the Service Manager pattern.

No comments:

Development Catharsis :: Copyright 2006 Mário Romano