Valid points, to be sure, but in that scenario, I'd have exactly what
you described as the 'right' solution.  The only difference would be
that the CFC method would live in a gateway, along with other methods.
 The purpose of gateways is to simply provide an OO interface to a
SELECT statement, nothing more.  All the other stuff is for dealing
with entity persistance operations (i.e. a single customer, or a
single user).

There's a place for both in pretty much every application, and having
defined gateways makes sure all your SELECT statements reside
together, so they're easy to update if your schema changes.

cheers,
barneyb

On 8/18/05, Munson, Jacob <[EMAIL PROTECTED]> wrote:
>  
> Has anybody ever used <cfquery>?  Ok, I'm being very sarcastic, but bear
> with me.  I know I'm about to start a flame war, with the two teams being
> all 2000 of you against me.  :)
>  
> Here's a scenario: 
> -My client wants me to return data with some edge case business logic,
> nobody else I work for wants this logic in my app 
> -I need to join 5 tables using fairly complex conditions 
> -I then need to use the data from this query in a number of cfms 
>   
> Solution 1: 
>  
> I build all of the gateway/dao/bean/jar/dll/exe/ini/etc I
> need to access and join the 5 tables 
> I then build all the cfcs and cfms that will be required to init and expose
> the 35 objects I created in step 1 
> I invoke the files created in step 2 to put the data on the screen 
> Total time: 6 days and 1 day of rest 
> Solution 2: 
>  
> I build 1 <cfquery> that lives in a cfc. 
> I invoke the cfc on all of the necessary pages 
> Total time: 1 or 2 hours 
> Please excuse my lame attempts at dry humor up there.  :]  I admit I don't
> understand most of the stuff you guys bicker about on this list, beyond
> creating and invoking objects.  But does at least one person here agree with
> me that it is possible to take OO too far?  OO is a very important concept,
> but like everything else in this world, I think it can be over done. 
> 
> 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.
>  

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.


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


Reply via email to