Re: Domain Model and Service Layer
- From: "Mikeon" <mikeon@xxxxxxxxx>
- Date: 7 Feb 2007 07:42:47 -0800
First I have a hard time reading the responses using the new Google's
group interface - there is no tree view so I don't really know which
response comes where.
Sorry for that. I also hope that this post is addressed to me.
To be completely fair, the use of terminology on this question appears to
mix paradigms. I'm not sure which model you've picked. Can you please
outline your use of terms? Are you coding in an MVC or MFC model? Sorry
about that.
I'm using a DDD (domain driven design) terminology as far as I
remember it.
You refer to services, yet you did not reply to my other response on this
thread, so I'm left to guess if you are using a service oriented model for
the entire application. If you are, I answered in the prior message: you
call the e-mail service endpoint in a composite that you call at the point
when you wish to commit the creation of the user.
Services layer also known as application layer is a layer above domain
code. It is a kind of fascade over the system. It is not a service
oriented architecture.
I shall assume that you are not using that model, and thus the lack of
reply. In that case, the answer to your original question is to place the
business rules in the application layer. The decision of whether to send an
e-mail, or not, is clearly a business rule. In a single-component
monolithic model, business rules live in the app layer. In a distributed
system (SOBA) model, they live in composite services and rules-oriented
services.
According to DDD business rules should be kept inside the domain code.
That is also what my experience tells me - it prevents situations
where rules are bypassed.
I have moved with my questions to a more appropriate place as pointed
to me by someone here, but thanks anyway for your effort.
--
Michal
.
- References:
- Re: Domain Model and Service Layer
- From: qu0ll
- Re: Domain Model and Service Layer
- From: Nick Malik [Microsoft]
- Re: Domain Model and Service Layer
- Prev by Date: Re: Specification Pattern vs Data Mapper
- Next by Date: Re: Enforcing domain rules
- Previous by thread: Re: Domain Model and Service Layer
- Next by thread: Re: Domain Model and Service Layer
- Index(es):
Relevant Pages
|