Re: SV: Interface-Driven Design

2011-04-04 Thread Christoph Engelbert

Hey Ludwig,

sorry but that's not what I meant.

I thought about interfaces for the generated classes that have getter / 
setter for all of the properties. I need to use them in a 
multi-classloader environment. The idea was to create an OSGi like 
interface / implementation system. That means you have a JAR with the 
interfaces and a JAR with the implementations (in this case the 
generated classes from Torque).


Torque is able to generate interface classes (if they not exist) but 
this are plain interfaces with no methods defined at all. It would be 
great if there is a way to generate full interfaces, as well for OSGi 
environments.


Does anyone know a good way or did an extension for the generation 
process to handle generation of interfaces?


Cheers Chris

Am 04.04.2011 09:29, schrieb Ludwig Magnusson:

Not quite sure what you mean. But we do use torque on a daily basis and we
are focused on producing a good interface.
I assume you mean user interface.

Perhaps if you specify your question more, I could help.
/Ludwig

-Ursprungligt meddelande-
Från: Christoph Engelbert [mailto:c.engelb...@u-form.de]
Skickat: den 4 april 2011 08:21
Till: Apache Torque Users List
Ämne: Interface-Driven Design

Hey guys,

does anyone of you have a good solution to use Torque in an interface driven
design environment?

Cheers Chris

-
To unsubscribe, e-mail: torque-user-unsubscr...@db.apache.org
For additional commands, e-mail: torque-user-h...@db.apache.org


-
To unsubscribe, e-mail: torque-user-unsubscr...@db.apache.org
For additional commands, e-mail: torque-user-h...@db.apache.org




-
To unsubscribe, e-mail: torque-user-unsubscr...@db.apache.org
For additional commands, e-mail: torque-user-h...@db.apache.org



Re: SV: Interface-Driven Design

2011-04-04 Thread Thomas Fox
 I thought about interfaces for the generated classes that have getter /
 setter for all of the properties. I need to use them in a
 multi-classloader environment. The idea was to create an OSGi like
 interface / implementation system. That means you have a JAR with the
 interfaces and a JAR with the implementations (in this case the
 generated classes from Torque).

 Torque is able to generate interface classes (if they not exist) but
 this are plain interfaces with no methods defined at all. It would be
 great if there is a way to generate full interfaces, as well for OSGi
 environments.

 Does anyone know a good way or did an extension for the generation
 process to handle generation of interfaces?

In the past, we have done a similar thing for Torque 3.3 (use non-static
DAOs as Frontend to the static Peer classes). We did rewrite the templates
to achieve this. I do not know any other way nor do I know that such
modified templates are available anywhere on the web.

As the Torque 3.3 templates are rewritten quite heavily for torque 4,
changing the templates for torque 3 would be a throwaway work I'm afraid.

However, for Torque 4 it is planned to allow a non-static version of the
peer classes, but this is not implemented yet. In the meantime, it may be
feasible to generate non-static wrappers for peer classes for torque 4 and
also generate interfaces. This would still involve template-rewriting.

I know this answer is not very satisfying but the pest I can come up with.

 Thomas


-
To unsubscribe, e-mail: torque-user-unsubscr...@db.apache.org
For additional commands, e-mail: torque-user-h...@db.apache.org



Re: SV: Interface-Driven Design

2011-04-04 Thread Christoph Engelbert

Am 04.04.2011 11:34, schrieb Thomas Fox:

I thought about interfaces for the generated classes that have getter /
setter for all of the properties. I need to use them in a
multi-classloader environment. The idea was to create an OSGi like
interface / implementation system. That means you have a JAR with the
interfaces and a JAR with the implementations (in this case the
generated classes from Torque).

Torque is able to generate interface classes (if they not exist) but
this are plain interfaces with no methods defined at all. It would be
great if there is a way to generate full interfaces, as well for OSGi
environments.

Does anyone know a good way or did an extension for the generation
process to handle generation of interfaces?

In the past, we have done a similar thing for Torque 3.3 (use non-static
DAOs as Frontend to the static Peer classes). We did rewrite the templates
to achieve this. I do not know any other way nor do I know that such
modified templates are available anywhere on the web.

As the Torque 3.3 templates are rewritten quite heavily for torque 4,
changing the templates for torque 3 would be a throwaway work I'm afraid.

However, for Torque 4 it is planned to allow a non-static version of the
peer classes, but this is not implemented yet. In the meantime, it may be
feasible to generate non-static wrappers for peer classes for torque 4 and
also generate interfaces. This would still involve template-rewriting.

I know this answer is not very satisfying but the pest I can come up with.



Thanks for your answer. That's what I expected so I changed the 
implementation to a different approach.


Since I still working on a draft implementation of using Torque 4 in 
OSGi environments I don't want to redo all that stuff for Torque 3 but I 
was hoping I just missed something in Torque codebase.


Cheers Chris

-
To unsubscribe, e-mail: torque-user-unsubscr...@db.apache.org
For additional commands, e-mail: torque-user-h...@db.apache.org