2009年9月8日星期二

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

On Mon, Sep 7, 2009 at 14:43, Pádraic Brady<padraic.brady@yahoo.com> wrote:
> Hi Colin,
>
> The Service Layer is a very thin layer, a place where you find methods for
> easing the interaction with the Model with more aggregate means. For
> example, tasks which don't fit in just one domain object or mapper, or tasks
> which may use multiple model classes that can be aggregated into a single
> operation. There's no reason to use the Service Layer only - using the Model
> directly is perfectly fine.

Another good use cases for service layer is when you want use the same
operations
on Models in controller and web services like SOAP or XMLRPC.

regards,
Paweł Chuchmała

没有评论: