Just wanted to let the list know about an article I recently did for
O'Reilly's web site oreilly.com. The article highlights best practices for
writing UDFs and is called "Top Ten ColdFusion UDF Tips". You can view the
article at
http://www.oreillynet.com/pub/a/javascript/2002/02/22/udftips.html
> It's interesting how ColdFusion 5.0 seems to allow these
> functions to be saved in a variable scope by referencing
> the functions as if they were variables [scope.func=func]...
> rather than by referencing them as if they were functions
> [scope.func=func() or scope.func()=func()]...
Actu
w?
something like:
function server.myFunction(){}
Robert
-Original Message-
From: Correa, Orlando (ITSC) [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 13, 2001 3:02 PM
To: CF-Talk
Subject: RE: UDF best practices
Ok... that did it...
It was saving using the
and
something
Ok... that did it...
It was saving using the
and
something that is not recommended?
Thanks again!
Orlando
-Original Message-
From: Bryan LaPlante [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 09, 2001 1:44 AM
To: CF-Talk
Subject: Re: UDF best practices
I am getting pretty
>
Sent: Wednesday, August 08, 2001 9:02 PM
Subject: RE: UDF best practices
| If I have a "page" request that calls several templates during the
| request...
|
| For Example:
|
| + application.cfm
| + myUDF.cfm
| + index.cfm
| + cfinclude template1.cfm
| + cfmodule template2.c
appreciated...
Orlando
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 08, 2001 11:40 AM
To: CF-Talk
Subject: RE: UDF best practices
You could but what about re-usability outside the application. This is the
reason for the CFINCLU
EMAIL PROTECTED]]
>Sent: 08 August 2001 15:11
>To: CF-Talk
>Subject: Re: UDF best practices
>
>
>1. In the admin set the server variables to auto-lock
>2. run the template containing the UDFs before the application runs or on
>machine startup.
>3. Set a CFLOCK with a scope
Couldn't you just put them in the application.cfm for your application??
-Original Message-
From: Michael Dinowitz [mailto:[EMAIL PROTECTED]]
Sent: 08 August 2001 15:11
To: CF-Talk
Subject: Re: UDF best practices
1. In the admin set the server variables to auto-lock
2. run the tem
1. In the admin set the server variables to auto-lock
2. run the template containing the UDFs before the application runs or on
machine startup.
3. Set a CFLOCK with a scope of server
4. Set each UDF to a variable in the scope server
5. Call the UDF on any page without using a CFINCLUDE
Anyone know what's the best way to set a UDF as a global function for use by
all tags (custom, includes, etc.)... or does one in fact have to include the
function code locally in each file that's being called during a page
request?
Thanks,
Orlando
~~~
10 matches
Mail list logo