Niclas Hedhman wrote:
> Which is good not only for the Oredev conference, but for the larger
> DDD community to provide feedback on whether Qi4j is as excellent as
> we think it is. I would love for our 'version' to actually be hosted
> on the dddsample project and not here, hence that I have kept the
> se.citerus package names.

Hm.. I don't think Citerus would be happy about that. I wouldn't be if 
someone wrote code and put "se.jayway" as package name. Please use 
org.qi4j instead!

> Speaking of it; There are 2 'use-cases' that are a bit unclear to me
> how to handle.
> 
> 1. Singletons
> They have Location.UNKNOWN and CarrierMovement.NONE as singletons
> inside the bean. And in Qi4j these are interfaces. For now, I have put
> in a separate class, but realize that is fairly dumb, so should we
> have singletons expressed as methods in the repository?
> 
> public interface LocationRepository
> {
>     :
>     Location unknownLocation();
> }

Yeah, that would make sense. In SiteVision I had a couple of "well known 
entities" which were generated at startup with well-known identities, 
and which could be accessed using static methods. This might be an 
example of that.

> 2. Specification
> dddsample have a Specification and a lot of classes around it. IMHO,
> it is a bit messy, where the Specification usage API (isSatisfiedBy)
> is mixed up with the fluent API for construction;
> 
> public interface Specification<T> {
>   boolean isSatisfiedBy(T t);
>   Specification<T> and(Specification<T> specification);
>   Specification<T> or(Specification<T> specification);
>   Specification<T> not(Specification<T> specification);
> }
> 
> AND
> the only place where it is used, RoutingSpecification, they have not
> implemented anything yet.
> 
>   public boolean isSatisfiedBy(Itinerary itinerary) {
>     // TODO implement
>     return true;
>   }
> 
> I also don't really understand how the RoutingSpecification fits into
> the bigger picture, such as "Why is the RoutingSpecification created
> from a Cargo instance?"

This just came up on the DDD Sweden mailing list today. It's messed up. 
I would replace most of that with the Query API, if possible.

/Rickard

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

Reply via email to