db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Kucera" <mkuc...@bbm.ca>
Subject RE: DAOs and Peers
Date Wed, 17 Dec 2003 20:02:37 GMT
Sonu,

Yes I am dealing with only one database but as I understand it Torque
should have no problem dealing with multiple databases.

I don't have any rules for the scope of a DAO. Some of my DAOs deal with
multiple tables and some with only one table. I just go with what makes
the most sense conceptually and I try not to make my DAOs too big.



-----Original Message-----
From: Sonu Vijay [mailto:sonupv@yahoo.com] 
Sent: Wednesday, December 17, 2003 2:47 PM
To: Apache Torque Users List
Subject: RE: DAOs and Peers


Michael,

Is your DAO/DAOs primarily dealing with one database
as a whole. I was making one DAO for each table in my
database. My busniess rules would call the DealersDAO
for Dealers table data and CustomersDAO for customer
table data.

But now Torque generates code for the whole database.
So now should I just have one DAO for each database
which deals with all the tables in that database. Is
that how u are working. 




--- Michael Kucera <mkucera@bbm.ca> wrote:
> I'm using torque and I'm using DAOs. My value
> objects are torque
> objects. Basically I can ask one of my DAOs to give
> me a torque object
> or a list of torque objects. The DAO contains the
> code that builds the
> criteria etc..
> 
> Basically what I'm saying is that torque objects are
> the value objects.
> All the code that retreives torque objects from the
> DB is still inside
> the DAOs.
> 
> 
> -----Original Message-----
> From: Sonu Vijay [mailto:sonupv@yahoo.com]
> Sent: Wednesday, December 17, 2003 2:25 PM
> To: Apache Torque Users List
> Subject: DAOs and Peers
> 
> 
> Hi Everybody,
> 
> I have a DAO framework in place and we make DAO's
> primarily for each table in our DB2400 Database
> libraries (DB2400 doesn't has the conventional
> concept
> of a database, tables are just arranged in
> libraries).
> 
> And then the interface to that DAO is exposed to the
> 
> business rule programmers who can use the DAO using
> the Model and Value objects for a particular DAO.
> 
> But Torque generated classes are based more on the
> concept of a database and it generates code for all
> the tables in the database.
> 
> Now how do u guys expose an Interface to the Torque
> generated classes. I mean how do u guide the
> business
> logic programmers to use the Torque generated
> classes
> without getting too much into the Torque code. Can
> we
> just given them an interface to look at and use.
> 
> Also what if I need to use tables from multiple
> databases ( libraries in my case ). Is Torque based
> on
> the concept that wherever possible the applications
> should be developed to deal only with one database ?
> 
> It may not be the best way but if I have one DAO for
> each table then exposing its interface becomes
> simples. How do u expose the interface for a
> database
> that has many tables.
> 
> Thanks in advance for ur ideas ?
> 
> Sonu
> 
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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


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


Mime
View raw message