Gang,

After been hacking on some more 'real code', I notice that a
particular pattern seems useful.

The Property;
Subtype the Property class for concrete usage, for instance;

public interface Name extends Property<String>
{}

The Property cluster;
Either in the simplest form of

public interface HasName
{
    Name name();
}

or more complex ones, such as

public interface PersonName
{
    Name firstname();
    Name surname();

    @Computed Name fullname();
}

The Property cluster removes a lot of the need of deep object graphs,
and will give somewhat more flat structures.

public interface PersonEntity extends PersonName, EntityComposite
{}

will after all, only be 3 properties in an entity, although there is a
'logic graph' of PersonEntity -> PersonName -> Name -> Property


Would like to write more, but got a flight to catch....


Cheers
Niclas

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

Reply via email to