2009年9月1日星期二

Re: [fw-mvc] Understanding 'Service Layer' and 'Domain Model'

Avi

Thanks for the reply. Does this mean that the service layer should simply
hand things over to a method on the model, unless it needs to do some work
on access control for example? I suppose I am having trouble distinguishing
between 'business logic' in the domain model and whatever needs to go in the
service layer. Is it just that there aren't particularly any rules about
what goes where but good practice might be ACL in the service layer?

Colin


Avi Block wrote:
>
> The service layer is helpfulc in shielding your controller from nasty
> logic
> involving one or more domain objects. For example, if there is some
> complicated logic involved in creating a new event (let's say there's a
> difference between whether an administrator is creating it or an
> "organization" is creating it, that would go in the service layer. Or
> perhaps if you need to do some ACL checks while looking retrieving some
> resources, that would go in the service layer.
> On Tue, Sep 1, 2009 at 7:48 AM, Colin J
> <colin.johnson@johnguest.co.uk>wrote:
>

--
View this message in context: http://www.nabble.com/Understanding-%27Service-Layer%27-and-%27Domain-Model%27-tp25238912p25243385.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: