On Tue, Jul 28, 2009 at 2:59 PM, David Leangen<[email protected]> wrote:

> Aren't you talking about Bounded Contexts here? I guess what you mean by
> "view" is a Bounded Context in DDD terms...
>
> If so, I would say that queries are very much domain related, just in a
> different BC, which means that it may not necessarily be the same as the
> model as seen in the "principal" BC (i.e. the one in which the objects were
> constructed).

Well, in a way yes. Although BC in DDD is a lot about separation of
responsibilities and allowing two similar (possibly originally same)
domain models to evolve independently. This is in DDD often described
as 'state translations' and similar very crude mechanisms.

What I think we have recognized in Qi4j is that it is sweeter to
'specify' the context requirements (in terms of interfaces) and then
'teach' the relevant part of the domain model the abilities to perform
in the context, without having a 'translation' happening at a
'boundary'.
IOW, the app I am working on (and Rickard is seeing the same), I have
context interfaces that are Qi4j artifacts free. The application (not
the model) is described in very plain terms. Those interfaces are
implemented by mixins that uses private mixins within the composite
that holds the domain model.
So, in Rickard's new "Events & Commands" pattern, I think that for me
the Commands would operate largely on the application context whereas
the events would operate on the domain model sitting inside the
composites.

I think this line of thinking is not present at all in the DDD book,
and when I discussed it with Eric earlier in the year, I think he
perceived me as a nutcase gone mad, and couldn't grasp the benefits
(maybe there are none). So don't expect it to show up in an revisioned
edition of the book.



Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to