Should Business Interfaces be part of the Model layer?
Posted
by
Mik378
on Programmers
See other posts from Programmers
or by Mik378
Published on 2012-03-23T15:06:15Z
Indexed on
2012/03/23
17:39 UTC
Read the original article
Hit count: 164
In an oriented-services enterprise application, isn't it an antipattern to mix Service APIs (containing interface that external users depends on) with Model objects (entities, custom exceptions objects etc...) ?
According to me, Services should only depends on Model layer but never mixed with it.
In fact, my colleague told me that it doesn't make sense to separate it since client need both. (model and service interfaces)
But I notice that everytime a client asks for some changes, like adding a new method in some interface (means a new service), Model layer has to be also delivered...
Thus, client who has not interested by this "addition" is constrained to be concerned by this update of Model... and in a large enterprise application, this kind of delivery is known to be very risked...
What is the best practice ? Separate services(only interfaces so) and model objects or mix it ?
© Programmers or respective owner