Thanks Josh,

I'll be sure to check out that code generator, I think I agree that passing
in the object and initing with a struct makes good sense, I'll work around
that principle and get myself a copy of that code generator.

Thanks,

Rob

-----Original Message-----
From: Josh Nathanson [mailto:[EMAIL PROTECTED] 
Sent: 19 June 2007 17:40
To: CF-Talk
Subject: Re: DAO Implementation

> When dealing with data access objects how should I be moving the data
> retrieved by them into the actually bean style object?

What was tremendously helpful for me in figuring some of this stuff out, was

using the Illudium code generator developed by Brian Rinaldi.  His OO code 
is very solid and easy to understand.

The way it's handled in his DAO is to pass an object, with the ID already 
set in the object, into the DAO read function.  The ID is used in retrieving

the correct row from the DB.  Then he has a function "queryRowToStruct" to, 
well, turn the query row into a struct.  Finally, this struct is used to 
populate the object with a object.init(argumentCollection=struct) call.

Looking at Brian's OOP examples has greatly helped my understanding of OOP, 
and using his code generator has helped shorten my development time as well.

-- Josh




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281589
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to