On Wed, Feb 3, 2010 at 8:38 AM, Hendy Irawan <[email protected]> wrote:
>
> Thank you Niclas and Rickard.
>
> If I use Factory, doesn't this mean the factory class is still visible in
> the client class?
>
> Or we create app-specific factory classes which in turn calls Qi4J ?

As Rickard said, the latter. All over the place the "pojo folks" keep
re-iterating that framework dependencies shouldn't show up in
application code. Spring proponents are quick with this argument, and
show some dirt simple examples where they manage to obtain that. Yet,
take any reasonably complex Spring application, and it is riddled by
org.springframework imports. When pressed for an answer, one is told
that is a feature since Spring has now further removed a dependency of
technology X in your "pojos". By the same token, I can create
"pojo"-looking examples with Qi4j without any Qi4j imports, AND for
anything more complex we say; Well we have hidden you from the
complexities of Spring, Hibernate, JMS and whatever via extensions we
slowly will produce...


"POJOs" are a myth, and it only shows that "marketing" works. Exactly
how we are going to "spin" our story remains to be seen. Any marketing
or communications director on the list, who is willing to handle our
propaga^h^h^h^h^h^h^h marketing department?


That said, it still makes sense to create custom factories and
repositories for creation and query, since these can hide the client
direct access to composites and enhance encapsulation further.


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