Re: OO Coding & Relational Databases

2004-07-23 Thread Nick de Voil
> 1: I think they call it "brute force," where data access is in the
> business objects themselves (queries right in the classes). This is
> generally frowned upon.

It's correct to say that many OO-pattern-bandwagon-jumpers frown on this.
IMO it's also correct to say that for the majority of  applications this is
in fact an appropriate mechanism, unless your app is specifically targeting
multiple physical storage platforms. The latter case is what the DAO pattern
is actually for. Don't be persuaded that because an OO pattern sounds
clever, it's actually appropriate for what you're trying to do.

Nick
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: OO Coding & Relational Databases

2004-07-22 Thread Jamie Jackson
On Thu, 22 Jul 2004 13:13:46 -0400, in cf-talk you wrote:

>One of the biggest issues I have getting fully into OO programming usings CFCs 
>is my understanding of how data comes from a relational database, into an 
>object and vice versa.  Most of the CF resources I have found talk plenty 
>about CFCs, but they completely ignore working with OO code and a database.  
>Can somebody point me to any resources that might help fill in the gaps here?
>
>Thanks
>-- Jeff

As you will see (from the agile link you were given), there are a few
ways to do it:

1: I think they call it "brute force," where data access is in the
business objects themselves (queries right in the classes). This is
generally frowned upon.

2: Data Access Objects (DAOs) (As described in sort of a Mach II
context here:
http://livedocs.macromedia.com/wtg/public/machiidevguide/models.html)
I think some of the Mach II sample apps will reflect this same
Object/DAO/Gateway idea of DB interaction.

3: Persistence frameworks: These are widely available as products for
Java development, but I don't know of any CF persistence frameworks,
per se. (Though I'm sure there's a way to tap into those Java
frameworks.)

I started to build a CF RDB persistence framework in my last project,
but the requirements weren't enough for me to complete it. Anyway, a
persistence framework is a big effort.

>From my research on the matter -- revealing a general antipathy toward
option 1 and the steep learning curve (assuming we have similar
backgrounds) of option 3 -- I would point you toward option 2, to
start with.

I'm an OO newbie, so take all the above with a grain of salt.

Thanks,
Jamie
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: OO Coding & Relational Databases

2004-07-22 Thread Bryan F. Hogan
Here is some information that may help. I suggest either buying the book 
are printing the essays of the topics covered in the book.

http://www.agiledata.org/

[EMAIL PROTECTED] wrote:

> One of the biggest issues I have getting fully into OO programming usings CFCs 
> is my understanding of how data comes from a relational database, into an 
> object and vice versa.  Most of the CF resources I have found talk plenty 
> about CFCs, but they completely ignore working with OO code and a database.  
> Can somebody point me to any resources that might help fill in the gaps here?
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]