On Tue, 1 Mar 2005 10:34:19 -0800, Ian Skinner
<[EMAIL PROTECTED]> wrote:
> Where does one put the logic of figuring out what address(es) a person has 
> and creating all the objects, Person.init(), Address.init() some other method 
> or 
> object in between?

Your "business objects" (Person and Address) should be responsible for
storing information and maintaing their own integrity (e.g. ensuring
that a person has at least one address).

The responsibility of storing objects in another database should be
delegated to another object (or set of objects).

Matt Woodward did an excellent job explaining various techniques for
persisting objects (using Person and Address as an example!) in his
blog a little while ago.
http://www.mattwoodward.com/blog/index.cfm?mode=entry&entry=AF4AF196-5070-3118-2DBD6C4C381790A1

Patrick

-- 
Patrick McElhaney
704.560.9117
http://pmcelhaney.blogspot.com

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]

Reply via email to