You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Rami Hansenne <ra...@pandora.be> on 2002/11/02 21:54:48 UTC

Torque beans & OJB

Hi,

I'm considering using Torque in a next project. I'd like to get some
feedback on some questions first tho:

I'll need to transfer the data beans through soap serialization from the
back-end to some front-end sites. The Torque generated classes however are
not pure data beans. They have a save method and other functionality in the
super classes. They also import certain torque classes. This would mean all
the front-end clients would need to have the torque jar installed. It would
also make serialization/mapping a lot harder. Is there a way to easily map
these classes to pure data beans (with nothing but getters/setter for their
properties), without manually creating and mapping these (which would sorta
nullify the benefit of having your classes generated)?

Secondly, what exactly is the difference between Jakarta Torque and Jakarta
OJB? What are the pro's and con's of each and when is one recommended over
the other?

Thanks for any info,

Rami.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.437 / Virus Database: 245 - Release Date: 6/01/2003


Re: Torque beans & OJB

Posted by Rami Hansenne <ra...@pandora.be>.
I'm using Jakarta Soap (and we'll probably migrate to Jakarta Axis later
on). Though I haven't got any experience with Velocity templates, I'll
definitely check it out. If I could force the generated classes to implement
such an interface it might indeed work. The templates would have to be
redone whenever a new version of Torque comes out I guess, but it'd still be
easier than manual mapping.

Thanks,

Rami.


----- Original Message -----
From: "Bill Schneider" <bs...@vecna.com>
To: "Turbine Torque Users List" <tu...@jakarta.apache.org>
Sent: Wednesday, January 15, 2003 10:29 PM
Subject: Re: Torque beans & OJB


> This is an excellent question and probably depends to a large extent on
what
> kind of SOAP toolkit you're using.  Perhaps you could rig the Velocity
> templates that spit out Java objects, such that they create an interface
for
> each data object with just the get/set methods, and the actual Torque
> objects implement these get/set methods.  Any copy-from-object methods in
> the Torque objects would have to accept the interface rather than the
Torque
> type.
>
> Then you would define your SOAP service as accepting or returning objects
> that implement that interface with only get/set methods.
>
> -- Bill
>
> > I'll need to transfer the data beans through soap serialization from the
> > back-end to some front-end sites. The Torque generated classes however
are
> > not pure data beans. They have a save method and other functionality in
> the
> > super classes. They also import certain torque classes. This would mean
> all
> > the front-end clients would need to have the torque jar installed. It
> would
> > also make serialization/mapping a lot harder. Is there a way to easily
map
> > these classes to pure data beans (with nothing but getters/setter for
> their
> > properties), without manually creating and mapping these (which would
> sorta
> > nullify the benefit of having your classes generated)?
> >
> > Secondly, what exactly is the difference between Jakarta Torque and
> Jakarta
> > OJB? What are the pro's and con's of each and when is one recommended
over
> > the other?
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.437 / Virus Database: 245 - Release Date: 6/01/2003


Re: Torque beans & OJB

Posted by "Jeffrey D. Brekke" <jb...@wi.rr.com>.
+1 
This would be useful for other things than SOAP toolkits also.

On Wed, 15 Jan 2003, Bill Schneider wrote:

> This is an excellent question and probably depends to a large extent on what
> kind of SOAP toolkit you're using.  Perhaps you could rig the Velocity
> templates that spit out Java objects, such that they create an interface for
> each data object with just the get/set methods, and the actual Torque
> objects implement these get/set methods.  Any copy-from-object methods in
> the Torque objects would have to accept the interface rather than the Torque
> type.
> 
> Then you would define your SOAP service as accepting or returning objects
> that implement that interface with only get/set methods.
> 
> -- Bill
> 
> > I'll need to transfer the data beans through soap serialization from the
> > back-end to some front-end sites. The Torque generated classes however are
> > not pure data beans. They have a save method and other functionality in
> the
> > super classes. They also import certain torque classes. This would mean
> all
> > the front-end clients would need to have the torque jar installed. It
> would
> > also make serialization/mapping a lot harder. Is there a way to easily map
> > these classes to pure data beans (with nothing but getters/setter for
> their
> > properties), without manually creating and mapping these (which would
> sorta
> > nullify the benefit of having your classes generated)?
> >
> > Secondly, what exactly is the difference between Jakarta Torque and
> Jakarta
> > OJB? What are the pro's and con's of each and when is one recommended over
> > the other?
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

-- 
=====================================================================
Jeffrey D. Brekke                                   jbrekke@wi.rr.com
Wisconsin,  USA                                     brekke@apache.org
                                                    ekkerbj@yahoo.com



Re: Torque beans & OJB

Posted by Bill Schneider <bs...@vecna.com>.
This is an excellent question and probably depends to a large extent on what
kind of SOAP toolkit you're using.  Perhaps you could rig the Velocity
templates that spit out Java objects, such that they create an interface for
each data object with just the get/set methods, and the actual Torque
objects implement these get/set methods.  Any copy-from-object methods in
the Torque objects would have to accept the interface rather than the Torque
type.

Then you would define your SOAP service as accepting or returning objects
that implement that interface with only get/set methods.

-- Bill

> I'll need to transfer the data beans through soap serialization from the
> back-end to some front-end sites. The Torque generated classes however are
> not pure data beans. They have a save method and other functionality in
the
> super classes. They also import certain torque classes. This would mean
all
> the front-end clients would need to have the torque jar installed. It
would
> also make serialization/mapping a lot harder. Is there a way to easily map
> these classes to pure data beans (with nothing but getters/setter for
their
> properties), without manually creating and mapping these (which would
sorta
> nullify the benefit of having your classes generated)?
>
> Secondly, what exactly is the difference between Jakarta Torque and
Jakarta
> OJB? What are the pro's and con's of each and when is one recommended over
> the other?