I might also add something here ... Dave, if you have a bias toward using
cfscript because it's supposed to be faster, you might want to take a fresh
look at that. It's no longer the case in MX, especially with CFC's. Remember
that everything you write as a CFC is going to be compilied into java byte
code before it's run.

There was a discussion somewhere about the time MM would need to devote to
allow developers to write everything in CFML also in cfscript - and the
consensus was that it would be a waste of many thousands of hours of
developer time at Macromedia to maintain 2 syntaxes that will be compiled to
byte code anyway. It's better that they focus on new features and ironing
out any bugs.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Peter J. Farrell
Sent: Wednesday, March 16, 2005 6:07 PM
To: [email protected]
Subject: Re: [CFCDev] controlling access to cfc functions written in
cfscript


Dave Merrill wrote:

>CFC newb here again.
>
>Am I right that there's no way to control access to cfc functions written
>like this:
>--------------------------
><cfcomponent displayname="my_cfc">
><cfscript>
>
>function my_function() {
>       // do stuff here
>|
>
><cfscript>
></cfcomponent>
>--------------------------
>
>
Correct - and I wouldn't write any CFCs in full cfscript like your example.

>Tou have to do it like this:
>--------------------------
><cfcomponent displayname="my_cfc">
>
><cffunction name="my_function" access="private">
>       <cfscript>
>       //do stuff here
>       <cfscript>
></cffunction>
>
></cfcomponent>
>--------------------------
>
>
This is more acceptable.  Also, be sure to include output="false" and a
returntype if you want data checking on the return.  I'd also recommend
writing at least a short comment in the hint="" attribute.  This is
useful is the future for documentation and well as the CFC browser
that's builtin to CF.

>Thanks, just want to make sure there's no relevant language feature for
this
>that I don't know about.
>
>Dave Merrill
>
>
Don't forget to var function related variables including qry names and
index counters.

.pjf

--
Peter J. Farrell :: Maestro Publishing

blog    :: http://blog.maestropublishing.com
email   :: [EMAIL PROTECTED]
phone   :: 651-204-0513


 Not a computer nerd; merely a techno-weenie.

--

----------------------------------------------------------
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).

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' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]

Reply via email to