That's
ScriptaGulous with a big-G (not C). The name is kind of cheesy but there's been a lot of talk lately about being able to have all the tags available for scripting in CF. This is something I've wanted personally for a while as well, and it has been on my to-do list for quite some time (ever since 11/22/2006 after a conversation with Ron Jeffries about how "agile" a tag-based language could be on the XP Yahoo! Group). It's been there for so long with no action on my part, I thought starting a project page at RIAForge would get me moving. It's certainly not going to be a particularly hard project to do, as most of it is repetitive busy-work, but I think it will be very useful.
There are no files yet, but here's how I'd like to see it go:
- The code for the CF8 version will be easy since all tags can accept attributeCollection, we just send named parameters to the function and send arguments through attributeCollection
- I'm tentatively thinking all methods should be prefixed with "cf." Thus,
<cfabort>
becomes cfabort()
, and so on. This has two potential benefits: It makes memorization easy, since we already think in those terms for tags, and any potential naming conflicts with actual CF functions are gone (as far as I can think from the top of my head).
- It's going to take a while to do every tag. I don't want this to be "Sam's project" (though will eventually complete it even if no one contributes), but more of a community project. So if you've got time to do a tag with all the possible combination of attributes (so this will work in previous versions), I'm sure everyone would appreciate the effort. I'll try to commit to doing a tag every other day or so.
- I'm thinking it might be nice to put these into packages of related functions (based on the CF documentation), but I don't know how useful that would be.
- If you already know of something like this, please let me know and I'll gladly drop this one (or if you want to call it ScriptaGulous and host it on RIAForge perhaps we can get them to transfer project ownership).
So, what do you think? Your input and/or participation is/are most welcome!
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!
Leave a comment
Not a bad idea...
How would you account for tags like cfabort and cfdump?
Posted by
Andy matthews
on May 29, 2007 at 02:42 PM UTC - 6 hrs
Thanks Andy!
I'm not precisely sure what you are getting at? The first I tried was cfabort (for no other reason than it was the first I thought of). I'm not immediately seeing any issue, could you clarify what you meant?
(for cfdump, obviously it would need to work only in functions where output was enabled, but that's the only requirement I can think of off the top of my head).
Posted by
Sam
on May 29, 2007 at 05:36 PM UTC - 6 hrs
Just another note - yes, I plan to generate what I can on this, but I imagine there will be some cases that won't be caught. So the plan is to generate everything I can think of, along with unit tests, and see what remains.
Posted by
Sam
on May 29, 2007 at 06:05 PM UTC - 6 hrs
How would someone code a cfabort tag using a function? Just called cfabort(), which contains a <cfabort> tag?
Posted by
andy matthews
on May 29, 2007 at 10:13 PM UTC - 6 hrs
Yes, that's it exactly.
I guess cfsavecontent would become pretty useless as a function though.
Posted by
Sam
on May 30, 2007 at 06:22 AM UTC - 6 hrs
Leave a comment