Tom,
 
An analogy from the fusebox world is that you could put everything in one fuseaction in a single fuse.
 
"It's a lot more work to make all those separate files, why bother?"
 
And in a way, that seems to be true from the outset ... but in practice, i've always found it easier and faster to separate things out. I'M faster when my files are organized and separated out. It's not only reuse - i think better in smaller chucks, my thinking is more modular and flexible. I find code blocks easier in smaller files.
 
Yes, you CAN put your query and your act stuff and your display stuff in with everthing else, but then where is it? [somewhere buried in the the big single fuse file for that fuseaction that i threw everything in to save time]
 
I also thought in the beginning that it would be easier to lump everything together in a big know-it-all CFC's. But at this point i would suggest to try that in a SMALL application if you want to prove it out for yourself. (i tried it in a LARGE application and wound up doing it twice)
 
I've found that the benefits of cohesion, making your CFC's small and single purposed, like qry_ and act_ and _dsp files in the fusebox world, are much greater in the OO world. It might help if you allow yourself to think of an object not only as a representation of a physical thing, but a something that has a job to do, a responsibility, in an application.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Schreck, Tom
Sent: Wednesday, April 27, 2005 10:04 PM
To: [email protected]
Subject: RE: [CFCDev] While we're on the subject of DAOs

What�s the concept behind DAO and CFCs?  Is it a separate file for handling all of the inserts, updates, etc?  This seems like a lot more work than necessary.  What about the concept of a CFC knowing everything about itself?  If the DAO functionality is in a separate file, then it seems like this tenant is broken.

 

Thanks

 

Tom Schreck

972-361-9943


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Rawlinson
Sent: Wednesday, April 27, 2005 2:42 PM
To: [email protected]
Subject: Re: [CFCDev] While we're on the subject of DAOs

 

I'm going to have to remember the "KISS/YAGNI" phrase.  It is exactly what I was trying to say in the thread
about the fileaccess objects dealing with DAOs and XML files yesterday.

On 4/27/05, Sean Corfield <[EMAIL PROTECTED]> wrote:

On 4/27/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> The answer I received in the example previously provided was that it was
> probably best to have the main object's DAO loop over and call each of the
> sub object's DAO individually.

Yes, or even not have separate DAOs for the subobjects. If they only
exist inside the composite object and have no relevance to anything
else, there's no real need to create a separate DAO for them (since
you are persisting them as part of the composite DAO already).

KISS / YAGNI would favor having a single DAO for the composite object,
only introducing subobject DAOs through refactoring *if* they needed
to be exposed in the future.
--
Sean A Corfield -- http://corfield.org/
Team Fusebox -- http://fusebox.org/
Got Gmail? -- I have 50, yes 50, invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

----------------------------------------------------------
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]




--
[EMAIL PROTECTED]
http://blog.rawlinson.us

If you want Gmail - just ask. ----------------------------------------------------------
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]

----------------------------------------------------------
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