I don't think that the current solution is a bad one, I actually like it,
but if qi4j had a "pojo like" interface, with annotations, it should be
simpler to learn and to integrate.

When I see how project lombok generates accessors with annotations, It may
be a good idea to generate qi4j compliant lazy loading, metadata-full,
 ones.

I am talking about some kind of pojo layer surrounding *current*
implementation.

It may also be a good way to write a petclinic sample to ease the comparison
to spring or other technologies.


Again, it is all about the learning curve... but imagine your reddev sample
code with ... less code and no strange get() and set() accessors  (only used
by qi4j!?).... and going from a pojo DCI implementation to a pojo with
qi4j's annotations DCI implementation.

Qi4j position seems to be "the only way to do DCI in java", what about "the
easy way to do DCI in java" ;-)

p

On Tue, Mar 16, 2010 at 3:36 PM, Rickard Öberg <[email protected]>wrote:

> On 2010-03-16 15.11, Philippe Van Dyck wrote:
>
>> today I discovered project Lombok (http://projectlombok.org/) and I
>> wonder if it could be adapted/integrated/cannibalized to define
>> properties in qi4j.
>>
>> Using something like @Property or exposing a PoJo interface to
>> entities/values should really improve qi4j's learning curve (everybody
>> *understands* a pojo) and simplify integration with other tools (like
>> Wicket's Model).
>>
>
> Well.. right now you declare a property like so:
> Property<String> foo();
>
> To me this is valuable since I know that it's a property (as opposed to an
> Association), and it's trivial for me as a framework writer to do
> lazy-loading of it (on get()), and also detect when it has changed (on
> set()).
>
> How do I do lazyloading of fields?
> How do I detect when a property-fields changes?
> How do I know a field is a property and not an association?
> How do I get meta-info about a field? (compare to Property which has
> meta-info built in)
>
> And so on...
>
> /Rickard
>
> _______________________________________________
> qi4j-dev mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/qi4j-dev
>
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to