Personally I've done both.

I'd lean more toward the approach that Sean is suggesting - but it can
depend on the application.

Mark

On Thu, 15 Jul 2004 16:25:20 -0700, Sean Corfield
<[EMAIL PROTECTED]> wrote:
> On Thu, 15 Jul 2004 13:32:49 -0600, Stephen <[EMAIL PROTECTED]> wrote:
> > I'm curious what approach people use for persisting objects in the db.
> > Let's say I have a Person object.  Is it better to have that Person
> > object contain all of the Business methods to work on the object as well
> > as the methods to persist itself or is it better to set up a separate
> > PersonDAO object that deals with all of the database interactions and
> > keep all database interaction out of the Person object?
> 
> In general I have a Person object and a PersonDAO object and would
> pass the person to the dao create() / read() / update() / delete()
> methods.
> 
> 
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
> in the message of the email.
> 
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
> 
> An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
> 


-- 
E: [EMAIL PROTECTED]
W: www.compoundtheory.com
ICQ: 3094740
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

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

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

Reply via email to