I think it depends ... on the application. I noticed that when i first began
to move toward OO, my thinking was centered around what the code does. I've
found i needed to shift my thinking a little to first ask myself what does
the application do? In my mind, an object oriented design is centered around
what the application does first and formost. Once you have that worked out,
the helper objects tend to fall into place where they belong.

If you start from what the code does, your model, I think, won't be "right".
You'll probably wind up with a mess.

So to me, it might make sense, it might not. Just like having a single DAO
that encapsulates access to the database may or may not make sense. It
depends on the application.

I've also found that when i get the design right, i know it. It just works.
If i'm not there yet, i run into all these kinks and knots. Something's
wrong. So by now, rather than trying to find my way through a kink, i back
up and try to understand where i could improve my design, and try not to
move forward until it falls into place.

The reason i'm saying this is because i ran into a lot of kinks starting
from what the code does.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Patrick McElhaney
Sent: Tuesday, November 09, 2004 8:47 PM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] DAO Use cfdirectory cffile ?


I think it makes sense to have a single CFC that encapsulates access
to the file system so that rather than having <CFFILE>s and
<CFDIRECTORY>s throughout the code all file system related operations
go through the CFC. To date, I've only seen that concept in practice
once so I wouldn't call it a "pattern." (But I haven't seen many CFCs.
It wouldn't surprise me is someone else has seen it dozens of times
and has a specific pattern name for it.)

The purpose of a DAO is to persist data in such a way that the
peristence mechanism is hidden from the client that uses the data.
That persistence mechanism may be an RDBMS, an LDAP directory, an XML
file, a flat file, a set of directories and files, etc.

I hope that makes sense.

Patrick

--
Patrick McElhaney
704.560.9117
http://pmcelhaney.blogspot.com
I still have 5 gmail invites.
----------------------------------------------------------
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
[EMAIL PROTECTED]



----------------------------------------------------------
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 
[EMAIL PROTECTED]

Reply via email to