I'd make addresses a property in the person cfc, as a list, array or
structure of address objects.  Each address would be an address object.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of David Mineer
Sent: Wednesday, August 06, 2003 2:24 PM
To: cfcdev
Subject: [CFCDev]
I have Hal's book and was reading his article on macromedia, and also
reading all the posts to this list. I am trying to cement in my mind oop and
cfc's. Can someone give me an idea on the following.
Almost every page I have has some kind of db interaction. Using Hal's
example of composition, a person has an address, I would like to understand
how to best implement this using a cfc. But, I want to understand it from
the point of a person having more than one address, a one-to-many
relationship.
If I have a list of persons in a database, with 1 or more addresses linked
via a separate table, how do I code this using a cfc (getting info on a
person from the db given their id). Right now I would simply link the two
using some type of sql join in a single cfc. But I am wondering if there is
a better way calling a separate cfc (address.cfc) that would give me better
encapsulation and such.
TIA,
---------------------
David Mineer


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

Reply via email to