On Tue, Oct 21, 2008 at 9:34 AM, Rickard Öberg <[EMAIL PROTECTED]> wrote:

> The idea from my point of view is to have a 1-1 comparison with
> Spring/Hibernate, and this is what I intend to present at the upcoming
> Öredev conference in November.

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.

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();
}


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?"

Until we (I and Edward) get better understanding here, we will leave
this aspect out.



Cheers
Niclas

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

Reply via email to