In the online article first point:

<cfcomponent displayname="shoppingCart">

  <cffunction name="init" access="public" output="no" returntype="struct">
    <cfargument name="cartID" type="UUID" required="yes">
   ...
</cfcomponent>


Should the returntype not rather be "shoppingCart" ie.
returntype="shoppingCart" - rather than struct.... From the 6.1 docs is
seems that this would be better?

Why would you store the cartID in the variables scope and not the this
scope? If I understand correctly the variables scope only lives for the
duration of the request/response event - but I seem to be wrong as the
article states that the variables scope lives as long as the object does....
Why then have  a this scope and variables scope? - Is the variables scope a
place to rather put all private attributes that you do not want accessible
from other components?

Sincerely
Hardy




----- Original Message ----- 
From: "Rob Brooks-Bilson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 25, 2003 7:49 PM
Subject: [CFCDev] Top Ten Tips for Developing ColdFusion Components


> For all you non blog readers, O'Reilly's Web DevCenter has posted an
> article I wrote called "Top Ten Tips for Developing ColdFusion
Components".
> It's a distillation of material from my book, and some of the great
> discussions that have taken place on this list.  Let me know any feedback
> you all might have.
>
> http://www.oreillynet.com/pub/a/javascript/2003/09/24/coldfusion_tips.html
>
> -Rob
>
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word '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 word '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]

Reply via email to