Boyan Kostadinov's cfSnippetExecutor For ColdFusion Testing

Posted July 20, 2007 at 6:14 PM

You might remember Boyan Kostadinov from such places as my blog where he makes a habit of dropping awesome suggestions on me. This guy's like an idea-machine. Well, he's just come up with a new, very interesting idea: cfSnippetExecutor. Like me, Boyan suffers from a massive code testing directory (he, in fact, has a whole virtual site for it). This is due to the fact that every time we come across something that looks cool, we want to try it out ourselves. This requires messing with the ColdFusion server and the creation of a ton of test files.

Well, what if we didn't need to create a test file every time? What if we has the equivalent of a run-time Javascript evaluator? That's pretty much what cfSnippetExecutor is, except for ColdFusion. The idea here is you put your test code into a TextArea, AJAX shoots it off to the server, the server executes it as a dynamic file, and then returns the output result in the AJAX response.

My only concern would be that this, of course, opens you up to all kind of potential malicious problems (since you pretty much can't lock down things like CFFile or CreateObject() cause, well, what would be the point?). But, Boyan's thinking on this was that it is NOT a public script. You put it on your machine where you and you alone have access to it. This makes it only as dangerous as you want to be to yourself.

Now, there is plenty of testing that requires more than one page, but as far as seeing something on someone else's blog and having that "oh that's cool, let me try" desire, this could be very cool. I will be interested to see what other people think.

Post Comment  |  Ask Ben  |  Permalink  |  Print Page



Learning ColdFusion 9 - ColdFusion 9 tutorials, samples, examples, demos

Reader Comments

Jul 20, 2007 at 6:35 PM // reply »
35 Comments

Do you use CFEclipse? I use the scribble pad a hundred times a day to test snippets of code.


Jul 20, 2007 at 6:53 PM // reply »
1 Comments

@dan: I'd be very interested in hearing more about how you use scribblepad - there I just gave you an idea for a blog post ;)


Jul 20, 2007 at 6:57 PM // reply »
35 Comments

Great Idea! I would really like to try out my new screen cast software as well, maybe I will throw 1 together if I can find a mic.


Jul 21, 2007 at 10:46 AM // reply »
6,371 Comments

@Dan,

I use HomeSite 5.5 still. I have tried to use Eclipse a number of times and I can never seem to get my scribble pad to work. Something about the configuration of it always seems to go horribly wrong.


Jul 22, 2007 at 4:19 PM // reply »
35 Comments

All ~ This is a great tutorial on setting up the scribble pad. If you guys have any problem after reading that tutorial feel free to email me.

http://daveshuck.instantspot.com/blog/index.cfm/2006/10/27/How-to-setup-the-CFEclipse-Scribble-Pad


Post Comment  |  Ask Ben

Recent Blog Comments
Nov 7, 2009 at 5:53 PM
Ask Ben: Javascript String Replace Method
You can find here an advanced function that prepared with javascript replace function. This can make the first letters of words, sentences, lines and whatever you define automatically: http://www.m ... read »
Andrew Neely
Nov 7, 2009 at 4:56 PM
A Moment That Touched Me - The Fountainhead
Ben, Glad you enjoyed the podcast. Yeah, the Tank Riot guys can get really chatty during the episodes, but that's part of the charm of it for me. They've covered everything from Nichola Tesla to Cha ... read »
Nov 7, 2009 at 4:43 PM
Building A Fixed-Position Bottom Menu Bar (ala FaceBook)
Is it possible to make some more MenĂ¼`s ? ... read »
Jill
Nov 7, 2009 at 11:40 AM
How To Unformat Your Code (Like A Pro)
Derek, I think you might be right - sweet! Thanks for the link :) ... read »
Nov 7, 2009 at 11:25 AM
How To Unformat Your Code (Like A Pro)
I think it would be way easier to just use this http://www.logichammer.com/html-formatter/ He just released v3 and it rocks. ... read »
Jill
Nov 7, 2009 at 7:58 AM
How To Unformat Your Code (Like A Pro)
LMAO - this was pretty funny! I have to admit - I also love to reformat code so I can read it. My boss used to tell me to leave my OCD at home. Now I don't feel so bad after reading everyone else' ... read »
Nov 6, 2009 at 10:10 PM
How To Unformat Your Code (Like A Pro)
The timing of this post is just uncanny. I spent the last 15-20 minutes manually un-formatting my "Ben Nadel" style code within a CFC of mine. I was really digging the readability a few weeks ago, bu ... read »
Roe
Nov 6, 2009 at 5:11 PM
Passing Arrays By Reference In ColdFusion - SWEEET!
ArraySort also reorders the results of these java obj's ... read »