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]

Reply via email to