The issue at hand was why you don't put domain objects on the wire directly.

Here's a few reasons.

1) You can't vary your internal functionality separately from your
external functionality. You have lost any concept of encapsulation.
2) You lose the concept of having a meaningful architectural seam
3) Your wire protocol generally should not match up with your domain
model (you want to focus on use case/ui analysis to minimize round
trips which will lead to data from multiple aggregates etc being sent
at once). I think you will find it hard to find people who believe in
chatty interfaces, the way to get rid of chatty interfaces is to focus
on making screens 1-1 with calls on your api. The domain is focused on
how best to execute your transactions
4) Sending too *much* data. Often I only need some subset of a graph,
opposite problem as #3
5) You lose any hope of being able to versionize your contract (let's
talk about how deployment works again in your distributed
environment?)
6) You are allowing clients to take dependencies on the shape of your
domain ... again lets talk about deployment?


re: anti-pattern discussion: this has been beaten to death on the DDD lists.

Consider for a moment that this boundary is an anti-corruption layer
for your domain from those who use it and vice-versa. There are very
limited places where you may want to break this rule but the
difficulty is in finding those limited places that also fit into where
you would want to use a domain model.

Greg


On Thu, Feb 5, 2009 at 12:18 PM, Richard (Google)
<[email protected]> wrote:
>
> Is that a requirement to implement Domain Model + Service Layer + Remote
> Facade?
>
> --------------------------------------------------
> From: "Greg Young" <[email protected]>
> Sent: Thursday, February 05, 2009 5:14 PM
> To: <[email protected]>
> Subject: [nhusers] Re: Should I use NHibernate+WCF?
>
>>
>> Can you make changes to your "data on the inside" without affecting
>> your "contract on the outside"?
>>
>> Cheers,
>>
>> Greg
>>
>> On Thu, Feb 5, 2009 at 12:13 PM, Richard (Google)
>> <[email protected]> wrote:
>>>
>>> Can you explain the bit that's an anti-pattern?  (citing a source if
>>> possible?)
>>>
>>> --------------------------------------------------
>>> From: "Greg Young" <[email protected]>
>>> Sent: Thursday, February 05, 2009 5:11 PM
>>> To: <[email protected]>
>>> Subject: [nhusers] Re: Should I use NHibernate+WCF?
>>>
>>>>
>>>> Why do you not need them?
>>>>
>>>> Do you understand all of the arguments against your current
>>>> methodology? What you are doing is an anti-pattern in most contexts.
>>>>
>>>> Greg
>>>>
>>>> On Thu, Feb 5, 2009 at 12:10 PM, Richard (Google)
>>>> <[email protected]> wrote:
>>>>>
>>>>>
>>>>> I DO start with the domain objects (or really their tests).  In an
>>>>> ideal
>>>>> scenario, the database comes next from SchemaExport()).
>>>>>
>>>>> Anything else I might need would be generated from the domain objects,
>>>>> but
>>>>> if I don't need DTOs I don't see any need to complicate things further.
>>>>>
>>>>> Cheers,
>>>>>    Richard
>>>>>
>>>>> --------------------------------------------------
>>>>> From: "Greg Young" <[email protected]>
>>>>> Sent: Thursday, February 05, 2009 5:03 PM
>>>>> To: <[email protected]>
>>>>> Subject: [nhusers] Re: Should I use NHibernate+WCF?
>>>>>
>>>>>>
>>>>>> see qualification "If you are heads down coding CRUD stuff"
>>>>>>
>>>>>> Why not define it in metadata and generate everything?
>>>>>> Why not generate from the database?
>>>>>> Why not go another way and create your domain class then generate
>>>>>> everything else?
>>>>>>
>>>>>> simple CRUD ... the models are all the same it doesn't matter which
>>>>>> one you start with.
>>>>>>
>>>>>> Greg
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> >
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> It is the mark of an educated mind to be able to entertain a thought
>>>> without accepting it.
>>>>
>>>> >
>>>>
>>>
>>> >
>>>
>>
>>
>>
>> --
>> It is the mark of an educated mind to be able to entertain a thought
>> without accepting it.
>>
>> >
>>
>
> >
>



-- 
It is the mark of an educated mind to be able to entertain a thought
without accepting it.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to