2009年9月7日星期一

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

Keith

Thanks for your reply. It is starting to make some sense now. Would you
say that is it best practice that the Controller should always talk to the
service layer, or can it also talk to the Model (I mean model, not direct
sql queries!), for example, if it was a call to fetch a list of data from
the database?

Regards

Colin


keith Pope-4 wrote:
>
> 2009/9/1 Colin J <colin.johnson@johnguest.co.uk>:
>
>
> Technically services are part of the domain, they have a bit of a
> special place in the domain though, they provide services that do not
> naturally fit into the domain. (this is how I read the DDD book
> anyway)
>
> I have things like IO services as well as things that "extend" my core
> domain models like JSON services that transform the models output into
> JSON.
>
> Services are great for keeping things out of the main domain models.
>
> ACL in a service layer makes sense, much more than the in the
> application layer as you can then use it outside the MVC triad.
>
>
>

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

没有评论: