Use a CFPARAM DEFAULT for params that you can assume a trivial default value for and
CFPARAM TYPE for attributes that are required.

For tags that pass back a value to the caller, allow the tag to be called with an 
attribute which contains the name of the result to be placed in the caller scope.

Comment code clearly (though we all do this all the time anyway, yes!  ;-] )

Steve

> -----Original Message-----
> From: Alex Skinner [mailto:[EMAIL PROTECTED]
> Sent: 31 March 2003 13:19
> To: [EMAIL PROTECTED]
> Subject: RE: [ cf-dev ] : [ cf-dev ] cfTag best practises template
> 
> 
> Never really seen a best practices doc for cf tags
> 
> I know the CF Advanced training material mentions that 
> required attributes
> should be checked for
> and the list of attributes should be compared to expected 
> attributes so that
> the user recieves an error if they pass
> in an attribute the tag doesn't understand.
> 
> Part from that just general best practices I suppose.
> 
> Dug out an example comment from some docs part from that not sure
> 
> Seans guide for the rest maybe
> 
> <!---
> AUTHOR:
> DATE:
> PURPOSE:
> ATTRIBUTES:
> Name="..." -required
> USAGE NOTES:
> <cf_foo name="value">
> MODIFICATION LOG:
> DATE AUTHOR MODIFICATION
> ==== ======= ================================
> --->
> 
> 
> Alex
> -----Original Message-----
> From: Justin MacCarthy [mailto:[EMAIL PROTECTED]
> Sent: 31 March 2003 12:33
> To: [EMAIL PROTECTED]
> Subject: [ cf-dev ] : [ cf-dev ] cfTag best practises template
> 
> 
> > What is it that you think you're doing badly? ;o)
> 
> LOL
> 
> > > Stephen
> > > Just out of interest, does anyone know of a "best 
> practise" custom cfml
> > > tag template???
> > >
> > I don't remember ever having seen a best practices for 
> custom tags, just
> > general CF ones.
> 
> Yeah, I don't think I have either. Lots of general cf coding 
> style, and
> Seans guidelines has some stuff, mostly var naming guidelines
> 
> Just want to make sure the tags I'm written are best practise.
> 
> Thanks
> Justin
> 
> 
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> -- 
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
> 
> 

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to