|
It does take some getting used to, David. As
Brad points out, having an array of address objects belonging to a single person
would make sense. What to do with multiple people? If your needs dictate it, you
can have a collection type object -- just a fancy way of saying you can have an
array of Person objects. On the other hand, if all you need is some information
about people, you probably don't want to have your app instantiate a bunch of
persons, if all you need is there phone number. There's nothing wrong
with simply having a CFC return a query.
I find that it's very helpful for people
learning OO to build some apps that have NO databases involved. This is because,
as CF developers, we're so used to thinking of writing code that manipulates
data in a database. You really want to forget about the persistence issue until
you find that you really are "thinking in objects". Then, you'll find it very
easy to incorporate databases into your code. Just my advice.
Hal Helms
|
Title: Message
- [CFCDev] Todd
- RE: [CFCDev] Brian LeRoux
- RE: [CFCDev] Samuel Neff
- Re: [CFCDev] Christian Cantrell
- RE: [CFCDev] Raymond Camden
- RE: [CFCDev] sean
- RE: [CFCDev] Adrian Lynch
- [CFCDev] Scott Keene
- [CFCDev] Brad Howerter
- Re: [CFCDev] OOP cfc and Database David Mineer
- [CFCDev] Hal Helms
- [CFCDev] tony
- RE: [CFCDev] Nathan Dintenfass
- RE: [CFCDev] tony
- RE: [CFCDev] Nathan Dintenfass
- [CFCDev] marburg
- [CFCDev] Brandon Harper
- [CFCDev] marburg
- RE: [CFCDev] Sarge Sargent
- [CFCDev] sean
- [CFCDev] Lomvardias Christopher
