Recent Web Log Entries By Ben Nadel

Escaping Form Values - Understanding The ColdFusion htmlEditFormat() Life Cycle

Posted: September 3, 2010 at 3:53 PM by Ben Nadel

Tags: ColdFusion

When users can interact with your website by submitting content, it opens your site up to potential harm. In the worst case scenario, this might provide malicious hackers with a way to execute Cross-Site Scripting (XSS) attacks; in the best "bad" case scenario, it might simply mess up your site's layout and lead to a poor user experience. All of t... read more »

Comments (1)  |  Post Comment  |  Ask Ben  |  Permalink



Scope Behavior When Using CFThread Inside Of ColdFusion Components

Posted: September 2, 2010 at 11:10 AM by Ben Nadel

Tags: ColdFusion

The other day, I was using CFThread to call a ColdFusion component method asynchronously. Typically, when I use CFThread, I define my CFThread tags in the controller. In this case, however, I was making the asynchronous call from within the context of the component itself. This works very well. But, but there are some minor variances in scope-beha... read more »

Comments (2)  |  Post Comment  |  Ask Ben  |  Permalink


Creating Base64-Encoded Data URLs For Images In ColdFusion

Posted: September 1, 2010 at 10:31 AM by Ben Nadel

Tags: ColdFusion

Typically, when we want to include an image in a web page, we use an IMG tag with a SRC value that points to a file located on the server (ex. my_image.jpg). Modern browsers, however, allow us to embed images directly in the page markup as Base64-encoded "data urls." For caching and performance reasons, you generally wouldn't want to use data urls... read more »

Comments (15)  |  Post Comment  |  Ask Ben  |  Permalink



Using jQuery's Proxy() Method In Event Binding And Unbinding

Posted: August 31, 2010 at 10:56 AM by Ben Nadel

Tags: Javascript / DHTML

Yesterday, I explored the use of jQuery's native event management in the creation of object-oriented publication and subscription (pub/sub) functionality . In order to do this, I had to make use of jQuery's new proxy() method that allows function callbacks to be executed in the context of an object instance rather than a DOM node (which is typica... read more »

Comments (4)  |  Post Comment  |  Ask Ben  |  Permalink


Powering Publish And Subscribe Functionality With Native jQuery Event Management

Posted: August 30, 2010 at 9:50 AM by Ben Nadel

Tags: Javascript / DHTML

Let's face it - jQuery's native event management is straight-up awesome! Between multi-type binding, name-spaced events, proxied callbacks, and function-specific unbinding, there's not much that it can't do (and do well, for that matter). Without a doubt, it's better than any event management that I could write. As such, I wondered if I could use ... read more »

Comments (2)  |  Post Comment  |  Ask Ben  |  Permalink


Reflections On My Client-Side MVC View-Rendering Hackathon

Posted: August 29, 2010 at 1:15 PM by Ben Nadel

Tags: Javascript / DHTML

Yesterday, I spent about 10 straight hours exploring client-side MVC View-rendering in my first (of many) solo hackathons . I came up with a UI design, broke it out into HTML and CSS, and then coded a thick-client application on top of it; and, I did all of this under the pretense that the project would end up being a complete failure. As I expla... read more »

Comments (6)  |  Post Comment  |  Ask Ben  |  Permalink


Using jQuery To Bind And Trigger Event Handlers On Detached DOM Nodes

Posted: August 27, 2010 at 5:00 PM by Ben Nadel

Tags: Javascript / DHTML

Often times, we use jQuery to bind event handlers to DOM nodes that are children of the current document tree. When we do this, jQuery stores the event handlers in the given node's "events" collection . These bindings remain in place until they are explicitly unbound or until the DOM nodes are removed from the document ( NOTE : Using .detac... read more »

Comments (4)  |  Post Comment  |  Ask Ben  |  Permalink


Saturday Hackathon: Client-Side MVC - The Wrong Way

Posted: August 27, 2010 at 10:23 AM by Ben Nadel

Tags: Javascript / DHTML

Over the past week, I've heard a number of people talk about various hackathons, hack days, pitch days, and general all-night coding adventures. I've never attended one of these events and I have to say, hearing about them makes me more than a little bit jealous. I understand that a majority of the fun that people get out of these things is due to... read more »

Comments (4)  |  Post Comment  |  Ask Ben  |  Permalink


jQuery Selectors - The Firebug Plugin Inserts A Hidden DIV Element

Posted: August 27, 2010 at 9:04 AM by Ben Nadel

Tags: Javascript / DHTML

Last night, I was testing out someone's jQuery queue() and dequeue() code and I had a bug that was just driving me crazy; no matter how simple I made my test, my queued callbacks kept firing twice. To give you some insight into how simple my code was, take a look at this demo: <!DOCTYPE html> <html> <head> <title>Hi... read more »

Comments (14)  |  Post Comment  |  Ask Ben  |  Permalink


AJAX Requests Get And Set Cookies Like Any Other HTTP Request

Posted: August 25, 2010 at 11:03 AM by Ben Nadel

Tags: Javascript / DHTML

Sometimes, people ask me how to handle session management within an application that makes AJAX requests. A question like this can mean many different things; but often times, after a little discussion, I discover that this question is based on a fundamental misunderstanding of what an AJAX request actually is. Because we are so used to the reques... read more »

Comments (5)  |  Post Comment  |  Ask Ben  |  Permalink


Overriding Internal ColdFusion Component Variables With Method Arguments

Posted: August 24, 2010 at 10:30 AM by Ben Nadel

Tags: ColdFusion

One of the many cool things that Elliott Sprehn talked about in his CFUNITED 2010 presentation was the fact that ColdFusion component variables could be overridden using method arguments. After I saw this, I tried to experiment with this concept on my own. At first, I could not get it work. Elliott's presentations were all done in ColdFusion 9... read more »

Comments (15)  |  Post Comment  |  Ask Ben  |  Permalink


Using Dynamic Keys In ColdFusion 9's Implicit Struct Creation

Posted: August 23, 2010 at 9:54 AM by Ben Nadel

Tags: ColdFusion

At CFUNITED 2010, I attended Elliott Sprehn 's presentation, " I Bet You Didn't Know You Could Do That With ColdFusion ." In his code samples, I saw something that I had never seen before - he was using quoted-keys in his ColdFusion implicit struct creation. In ColdFusion 8, this definitely causes a parsing error at compile time. But, it looks li... read more »

Comments (10)  |  Post Comment  |  Ask Ben  |  Permalink


THIS Is Just A Locally-Scoped Variable Inside Of ColdFusion User Defined Functions

Posted: August 20, 2010 at 10:14 AM by Ben Nadel

Tags: ColdFusion

Yesterday, when I was coding my this.jarPaths application-specific URLClassLoader proof-of-concept , I stumbled upon a very interesting feature of ColdFusion. To make the proof-of-concept work, I had to take a user defined function (UDF) located within the Application.cfc component and store a reference to it in the global URL scope. However, eve... read more »

Comments (9)  |  Post Comment  |  Ask Ben  |  Permalink


Using THIS.jarPaths To Create An Application-Specific URL Class Loader In ColdFusion

Posted: August 19, 2010 at 11:11 AM by Ben Nadel

Tags: ColdFusion

At this last CFUNITED, Rupesh Kumar gave a talk titled, "Extending Java Applications with ColdFusion." In the Q&A portion of the talk, I asked Rupesh if Adobe had any plans to make application-specific Java class loaders in the same way that Application.cfc can currently define its own mappings and custom tag paths. He said that this was som... read more »

Comments (7)  |  Post Comment  |  Ask Ben  |  Permalink


Building A Twitter-Inspired RESTful API Architecture In ColdFusion

Posted: August 18, 2010 at 11:21 AM by Ben Nadel

Tags: ColdFusion

A while back, I gave a ColdFusion API presentation at Scotch On The Rocks 2010 . While I think the content of the presentation was decent, I don't think that it had any right being a presentation. As someone accurately described it in a review (sorry, I can't remember who it was), the presentation was like attending one of my blog posts. This is ... read more »

Comments (18)  |  Post Comment  |  Ask Ben  |  Permalink

September 2010 Entries »

Previously Posted

Using Named Callback Functions In Javascript Methods - Posted Aug 16, 2010
Using Named Functions Within Self-Executing Function Blocks In Javascript - Posted Aug 16, 2010
The Girl Who Broke My Heart, And Made Me A Better Person - Posted Aug 15, 2010
Project HUGE: Deadlifting With WSF's Griptech Rubberized Lifting Straps - Posted Aug 14, 2010
Whom Not To Marry: Time-Tested Advice From A Higher Authority By Pat Connor - Posted Aug 13, 2010
What If ColdFusion's CFThread Tag Had An Interval Attribute? - Posted Aug 12, 2010
Bidirectional Data Exchange With ColdFusion's CFThread Tag - Posted Aug 11, 2010
Strange ColdFusion JRUN Stack Overflow Error - Posted Aug 11, 2010
Named Arguments In ColdFusion Depend On The Argument Collection, Not The CFArgument Tags - Posted Aug 11, 2010
ToJava() - A ColdFusion User Defined Function For Complex Java Casting - Posted Aug 10, 2010
Connecting Ruby To Apache On My MacBook Pro Using A VirtualHost - Posted Aug 9, 2010
Connecting Python To Apache On My MacBook Pro Using A VirtualHost - Posted Aug 9, 2010
From Windows To Mac - A Roller-Coaster Of Emotions - Posted Aug 5, 2010
Long Polling Experiment With jQuery And ColdFusion - Posted Aug 3, 2010
Creating A Simple ColdFusion Cache With Java Soft-References - Posted Aug 2, 2010
Experimenting With CSS-Based Animations And Transitions - Posted Jul 26, 2010
Authenticating Twilio Requests Using Basic Authentication, SSL, And ColdFusion - Posted Jul 23, 2010
Bodybuilder Americanus By Samuel Fussell - Posted Jul 22, 2010
Authenticating Twilio Request Signatures Using ColdFusion And HMAC-SHA1 Hashing - Posted Jul 22, 2010
Pusher.cfc - ColdFusion Component For Realtime Notification With HTML5 WebSockets - Posted Jul 21, 2010
Post-Instantiation CFC Method References Don't Show Up In CFDump In ColdFusion 9 - Posted Jul 20, 2010
The Five Love Languages: How To Express Heartfelt Commitment To Your Mate By Gary Chapman - Posted Jul 19, 2010
Cell Phones, SMS, Twilio, Pusher, ColdFusion, And Google Maps == Fun - Posted Jul 18, 2010
Sending SMS Text Messages From Twilio Using ColdFusion - Posted Jul 16, 2010
Creating A Custom Image Upload Service For Tweetie (Twitter For iPhone) Using ColdFusion - Posted Jul 15, 2010
Sending And Receiving SMS Text Messages With Twilio And ColdFusion - Posted Jul 14, 2010
Extending Java Objects With ColdFusion Components - Posted Jul 13, 2010
For Better: The Science Of A Good Marriage By Tara Parker-Pope - Posted Jul 12, 2010
OnApplicationEnd() And OnSessionEnd() Errors Don't Get Logged In ColdFusion - Posted Jul 8, 2010
Holding Hands, The Moment, And The Relationship - Posted Jul 6, 2010
ColdFusion 9's NEW Operator Can Use Dynamic Class Paths - Posted Jul 6, 2010
For Better: The Love Scale Quiz Designed By Dr. Hatkoff - Posted Jul 5, 2010
CreateObject() In ColdFusion 9 No Longer Requires The Type Parameter - Posted Jul 1, 2010
Very Simple Pusher And ColdFusion Powered Chat - Posted Jun 30, 2010
Pushing Base64-Encoded Images Over HTML5 WebSockets With Pusher And ColdFusion - Posted Jun 29, 2010
Using ColdFusion With Pusher - A Notification Service Powered By HTML5 WebSockets - Posted Jun 28, 2010
The ColdFusion Application Server Tagline Contest ($50 Amazon Gift Card) - Posted Jun 26, 2010
JRUN Servlet Error: coldfusion.runtime.CfJspPage.bindImportPath - Posted Jun 25, 2010
Project HUGE: Half Way Through 2010 - Posted Jun 25, 2010
Detecting iPhone's App Mode (Full Screen Mode) For Web Applications - Posted Jun 24, 2010

View All Blog Entries »

  • Help Wanted - Find Your Next ColdFusion Job
Recent Blog Comments
Sep 3, 2010 at 6:27 PM
Escaping Form Values - Understanding The ColdFusion htmlEditFormat() Life Cycle
I've started moving my students from htmlEditFormat over to xmlFormat. As you said, it catches more characters, but it's also useful for pure XML and is faster to type. I haven't been able to come ... read »
Sep 3, 2010 at 4:37 PM
Scope Behavior When Using CFThread Inside Of ColdFusion Components
@Philip, If I understand you correctly - that you want to process something without having to wait for the processing to finish - then yes, putting that processing inside a CFThread tag will free y ... read »
Sep 3, 2010 at 3:19 PM
Muscle: Confessions Of An Unlikely Bodybuilder By Samuel Wilson Fussell
My dad gave me this book in 1991 after Samuel Fussell was interviewed on a radio show that his friend hosted. As others have commented, I have read this book numerous times over the years. I never ... read »
Sep 3, 2010 at 2:28 PM
Using ColdFusion Query's Underlying Java Methods For Query Manipulation And Logic
I've got a unique issue. I've got a multiple select box that displays output using nested cfoutput groups. By the time I get to the innermost level, the groups work but I can't sort the data that is ... read »
Sep 3, 2010 at 2:20 PM
Experimenting With HTML5's Cache Manifest For Offline Web Applications
@Ben: According to Mark Pilgrim's O'Reilly book HTML5: Up and Running , pp. 141-142, the window.applicationCache fires a sequence of events: "checking", "downloading", multiple "progress" events, po ... read »
Sep 3, 2010 at 7:09 AM
Reflections On My Client-Side MVC View-Rendering Hackathon
A minor enhancement proposal - there's a native hashchange event in the latest versions of several browsers (FF, IE, Safari/Webkit), this way such a page feels even faster. I've blogged about this f ... read »
Sep 3, 2010 at 5:48 AM
Scope Behavior When Using CFThread Inside Of ColdFusion Components
Thanks Ben, Excellent article and very precise explanation. Cheers Philip A question on invoking asynchronous save or some task and returning response back to the calling page. Using cfThread is ... read »
Sep 3, 2010 at 3:04 AM
Long Polling Experiment With jQuery And ColdFusion
@Ben, Thank you for your answer. If you are interested in - I solved the problem. It was, as you said, a buffer issue. Now when I'm getting a new request, the first thing I do is I'm sending some fa ... read »