Well, one of the clear benefits of encapsulation is that you create a variable boundary for an object and its functions. The point of that practice isn't only oriented around the present state of an application, but how it might evolve in the future. I wouldn't call that "blind", but rather experienced foresight. And the more experienced i get at this, the more i find myself encapsulating stuff as carefully as i can. It's really no extra trouble. And unexpected benefits keep popping up every time i follow that route.
The problem, to me, with "shortcutting" encapsulation within a framework, today's framework ... is that tomorrow's framework will want to change. And there's every chance that one of the shortcuts will lock the design down and either cast the possible solutions under shadows, or make the solution much more difficult to implement. :) nando -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John D Farrar Sent: Thursday, September 30, 2004 12:28 AM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] Function Libraries Encapsulation debate rages like a cult blindness. There is good reason for encapsulation... but if you follow that using request variables is always bad (or functions) then you could never use a CGI variable inside a CFC either... that would have to be passed it. (HEH!) Note... this isn't aimed at you Dave... it's just a bad bill of goods to believe that this virtue is universal. It is best "general" practice. 1. If your CFC is designed to work in a Framework/Methodology ... like mine are, then this is less of an issue. It's like the CGI issue mentioned above. 2. I declare an universal UDF library that has the udf to do standard UDF library included. In "my case" the CFCs are designed to run inside my Framework/Methodology... therefore calling the library and running the UDFs in request scope is a GOOD design pattern. If you negate the framework, then the other argument has more merit. Frameworks change the tenure of the discussion. :) IMHO... heard the debates and my understanding is that inside a framework the rules are similar... but the implications are not. John Farrar SOSensible -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Ross Sent: Wednesday, September 29, 2004 4:27 PM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] Function Libraries but how do call these UDFs from within CFC's? If you are referencing the request scope directly from your CFCs, that's a bad idea. If you are passing in the request-scoped udf lib when you instantiate your CFCs, then that's fine. -Dave ---------------------------------------------------------- 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 www.mail-archive.com/[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 www.mail-archive.com/[EMAIL PROTECTED]
