I worked on a system where something similar was done. No stored procedures were used but all queries were in two CFC's.
There are only two problems I'm aware of regarding this. One actually happened, many times, thanks to an incompetent programmer. (1.) A syntax error in the code causes a site-wide error because no query will work in a file that doesn't function correctly. Also a corrupt or mal-formed file upload will cause the same problem. This problem caused me a lot of problems. I (2.) Its been a few years, but I've seen cf throw an error on two simultaneous requests to read a cfinclude. I don't think CFC's would behave the same way and that was in the days of Allaire or early MM but it did happen. But that's trivial, its as rare or more so than a dead-lock. I think I agree with Russ. Centralized is great, it makes certain repetitive tasks much easier and reduces the size of code. But there is weakness in too-centralized.. Having many files to serve this task makes things easier.. You could break them apart by purpose or at least by alphabetical blocks based on the first letter of the query name: ag.cfc, hp.cfc qz.cfc. or query type: insert.cfc, update.cfc, select.cfc, delete.cfc. On 10/25/06, Gaulin, Mark <[EMAIL PROTECTED]> wrote: > > One of the benefits you mention for .net, namely knowing what code is > affected when stored procedures change, won't buy you much in CF since > you won't get a compile-time error... You'll have to wait until someone > calls the CFC method (with the wrong arguments, say) to find out that > you needed to update you code. Late binding and weak typing sucks for > generating that kind of very-handy diagnostic. > > If anyone has a work-around for this I'd love to hear about it. > > Mark > > -----Original Message----- > From: Brian Peddle [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 24, 2006 7:29 PM > To: CF-Talk > Subject: All Stored Procs in 1 CFC? > > I have worked a few companies where they use .NET and know of several > other companies who follow this process. They have a generator that > reads all the stored procs and creates the needed code in .NET to make > the calls to the stored procedures in classes. All this is done > automatically and the file is never edited by human hands. One of the > cool things is that if a stored proc is altered and the file is > recreated on build any page calling that class will fail and they can > quickly and easily see what needs to be fixed. The other cool thing is > all the SQL is in one place. > > Anyway, has anyone ever done this in CF? Not so much the auto generate > stuff (although be good to know) but have one monster .cfc with all the > calls. Since it isn't compiled like .NET performance may be a huge > issue but not sure. Or maybe if this is tossed in application scope it > would fly. > > Thoughts? > > Hope this made sense. > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258470 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

