It does seem a little dramatic, yes. But hey, if you have a flair for it why
hold back :)
One of the benefits of using the DAO, Gatways et al patterns is that they
provide a tried and tested way of dealing with common problems. Once you
know the patterns and if they have been used, it can make understanding new
applications whole lot simpler because you know exactly where to look.
As for the solution suggested so far, I'm for Barneys. Why? 3 reasons
1) It's as complex as it needs to be while still conforming to a well
defined pattern.
2) A Dao isn't the right pattern to use. Dao's generally (it's not always
the case) handle data from a single table in the database. If you had 5
seperate Dao's (1 for each table) you'd have to find a way to join your data
outside of your database. That would be very strange. A Gateway is a much
better fit.
3) Barney is smarter than I am :)
Cheers, Pete (aka lad4bear)
----Original Message Follows----
From: "Munson, Jacob" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: RE: [CFCDev] Better way than dao, gateway, bean: <cfquery>
Date: Thu, 18 Aug 2005 13:25:25 -0600
Ok, I totally get your point, and agree.
So 5 years later you are gone, and your client hires someone new to fix
something in your code. He finds the directory where it all lives and
starts exploring. He decides to do a text search for a string on the
problem page, because he doesn't know how else to find it. He opens
the CFM, hoping to find the offending query, only to discover it must be
in one of the 40 invoked CFCs on the page. The story could go on from
there, but the point is that there is going to be a large learning curve
for OO that is taken out to its fullest 'beauty'. 3 weeks later he
knows and understands the logic behind your application, and why it
takes 5 different files to do a select.
Ok, so I may be exaggerating with some of the numbers here...I tend to
be a bit over dramatic. ;)
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Barney Boisvert
> Sent: Thursday, August 18, 2005 12:35 PM
> To: [email protected]
> Subject: Re: [CFCDev] Better way than dao, gateway, bean: <cfquery>
>
> That depends. And in some (many?) situations, the answer is yes. If
> you can save $10,000 of maintainance over the course of an
> application's lifetime by initial development costing $3,000 more,
> then it's certainly worth it, yes? The vast majority of development
> costs are spend in maintenance, not initial development, and anything
> that makes maintenance easier is almost always worth doing.
>
> cheers,
> barneyb
>
> On 8/18/05, Munson, Jacob <[EMAIL PROTECTED]> wrote:
> > My point was that even for a complex problem OO can be
> taken too far.
> > Would you feel honest charging a client $4000 when you can
> do the job
> > with perfectly good OO, but only spend $1000?
This transmission may contain information that is privileged, confidential
and/or exempt from disclosure under applicable law. If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution, or use of the information contained herein (including any
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission
in error, please immediately contact the sender and destroy the material in
its entirety, whether in electronic or hard copy format. Thank you. A1.
----------------------------------------------------------
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).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger 7.0 today!
http://messenger.msn.co.uk
----------------------------------------------------------
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).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]