My Secret Life as a Spaghetti Coder
home | about | contact | privacy statement
I thought I had read this somewhere, about not being able to use "cf" as a prefix to a function, but when I defined all those functions in scriptaGulous with that prefix, and it let me, I thought maybe I made the whole thing up.

But then today I was having a look through the docs for cfscript, and I found this:

Caution: ... You cannot put a user-defined function whose name begins with any of these strings within this tag:

  • cf
  • cf_
  • _cf
  • coldfusion
  • coldfusion_
  • _coldfusion
However, so far it has let me with no problems. What shall be done?

Hey! Why don't you make your life easier and subscribe to the full post or short blurb RSS feed? I'm so confident you'll love my smelly pasta plate wisdom that I'm offering a no-strings-attached, lifetime money back guarantee!



Timothy Farrar brought up an issue about scriptaGulous that I thought was a good one (and one I've worried a bit about).

Should people start using the scriptaGulous library and Adobe decides to start naming functions after tags (i.e., cfQuery()), then a lot of code will break unless they start honoring your functions over theirs instead of throwing errors, as is currently the case.

He suggested using an underscore convention (_cfQuery(), and Andrew Powell proposed a tagFunctionName() style convention.

But what are the odds Adobe would start naming functions cfTagName()? Any idea from the guys over there would be appreciated, as well as anyone else with any input. Would tagFunctionName() as opposed to cfFunctionName() (or tagQuery() over cfQuery()) work better? I'm partial to the underscore method if it is needed, but obviously I prefer just simple tagName() the most.

What are your thoughts?


First I wanted to thank Andrew Powell for his gracious offer to help on this project. Then, the update:

The ScriptaGulous RIAForge page (as does the SVN repository) has a zip with a file that actually compiles now, so you can start using it in your projects.

There are a couple of tags that were removed, such as cfloop and cfoutput, where it doesn't make sense to have them (unless we decide to use closures). Some tags, such as cfmail and cfhttp include extra parameters for their respective "params." The general guideline followed is that it is an array of structs - each struct is full of name/value pairs that represent the param tag's attributes and values you want to give those attributes. Please have a look at the hints, and if they aren't clear, feel free to ask us (or tell us what doesn't work) at the issue tracker at RIAForge or the scriptaGulous Google group. More...


Today I put some code into the scriptaGulous repository at RIAForge. (scriptaGulous is a function library that intends to duplicate all the ColdFusion tags (where it makes sense) to make them usable in cfscript blocks).

Basically, I wrote a generator to read the taglib.cftld and generate some code for us to start with. I was going to generate some unit tests too, but I've got to move on to doing some other work.

Anyway, I'm sure plenty of the tags/functions actually do work, but when you cfinclude scriptagulous.cfm, you'll get attribute validation errors in some of the tags.

So now on to the next stage of development: making all the tags work. For that, we need your help! (if you want to use this sooner rather than later) If you'd like to commit to contributing a tag or two (or more!), please join the scriptaGulous Google Group and record which tags you're working on so we don't duplicate our efforts.



Google
Web CodeOdor.com

Me
Picture of me

Topics
.NET (19)
AI/Machine Learning (14)
Answers To 100 Interview Questions (10)
Bioinformatics (2)
Business (1)
C and Cplusplus (6)
cfrails (22)
ColdFusion (78)
Customer Relations (15)
Databases (3)
DRY (18)
DSLs (11)
Future Tech (5)
Games (5)
Groovy/Grails (8)
Hardware (1)
IDEs (9)
Java (38)
JavaScript (4)
Linux (2)
Lisp (1)
Mac OS (4)
Management (15)
MediaServerX (1)
Miscellany (76)
OOAD (37)
Productivity (11)
Programming (168)
Programming Quotables (9)
Rails (31)
Ruby (67)
Save Your Job (58)
scriptaGulous (4)
Software Development Process (23)
TDD (41)
TDDing xorblog (6)
Tools (5)
Web Development (8)
Windows (1)
With (1)
YAGNI (10)

Resources
Agile Manifesto & Principles
Principles Of OOD
ColdFusion
CFUnit
Ruby
Ruby on Rails
JUnit



RSS 2.0: Full Post | Short Blurb
Subscribe by email:

Delivered by FeedBurner