Hey Haikal
I feel your pain about sphagetti code hell. Just a thought tho, theres nothing specifically wrong with CFMODULE as a way of encapsulating code.
if its a bandaid solution you are after i would suggest using cfmodule over converting things to functions/cfcs. ie. convert some of the cfincludes to cfmodules to reduce the collision problems in variables scope.
here are some guidlines to untangle things.
avoid using caller scope from cfmodule as much as possible! (you might as well cfinclude if you do this )
with one exception. you can make a cfmodule act like a cffunction by using caller scope. eg.
<cfmodule template="function.cfm" param1="hello" param2="world" returnParam="myReturnVar" >
<cfoutput>#myReturnVar#</cfoutput> <!--- displays helloworld --->
inside your cfmodule:
<cfset caller[Attributes.returnParam] = Attributes.param1 & Attributes.param2 >
just make sure you a consistent about what you name you return param otherwise it gets confusing about what params are in-params and what ones are out-params.
now all your modules are nice little encapsulated blocks of code with their own variables scope.
Hope this helps
Pat
On 3/9/06, Haikal Saadh <[EMAIL PROTECTED]> wrote:
How about PlasterCast? Oh wait, but CF is "typeless"... so no casting
for you!
*rimshot*
Barry Beattie wrote:
> 1) the names' been taken. Geldof will have a piece of you
>
> 2) support? how? I suggest alcohol
>
> 3) you're going to limit this to CF code, aren't you....
>
>
>
>
> On 3/9/06, Steve Onnis <[EMAIL PROTECTED]> wrote:
>
>> How about next year instead of webDU we have a BandAid conference where we
>> can raise money to support those hard working developers that have to
>> continmually fix up peoples old crappy applications
>>
>>
>>
>>
>
>
>
>
--
Haikal Saadh, Applications Programmer
Teaching and Learning Support Services
K405, Queensland University of Technology, Kelvin Grove Campus
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---
