Recent Web Log Entries By Ben Nadel

Showing 1 - 14 of 14   < Prev | Next >

Using Plupload For Drag & Drop File Uploads In ColdFusion

Posted: August 30, 2012 at 10:43 AM by Ben Nadel

Tags: ColdFusion, Javascript / DHTML

Over at InVision , we use Plupload to enable users to drag files right from their desktop onto the website in order to upload the files to our service. While Plupload has proven to be fairly awesome, getting it up and running smoothly can be a bit of a headache. As such, I thought it would be good to put together a demo project that encapsulate... read more »

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



ColdFusion / JavaScript Genius? Join Me, And My Growing Team At InVisionApp.com!

Posted: August 28, 2012 at 6:58 PM by Ben Nadel

Tags: ColdFusion, Javascript / DHTML, Work

InVision , the venture-backed startup I co-founded, is on the lookout for a new addition to our development team . Experience with FW/1 and modular JavaScript application architecture (ex. Angular.js, RequireJS) is a huge plus. If you're interested, please fill out our application . P.S. Even if you've applied in the past, we still want t... read more »

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


Converting Between String And Binary Values In ColdFusion

Posted: August 23, 2012 at 9:17 AM by Ben Nadel

Tags: ColdFusion

For years, I have been using the toString(), toBase64(), and toBinary() functions to convert values back and forth between String and Binary formats in ColdFusion. According to the documentation, however, these methods are mostly deprecated. A few people have told me to use the charsetEncode() and charsetDecode() functions instead. And, for years,... read more »

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



Converting Data Between String, Binary, Hex, And Base64 Format In ColdFusion

Posted: August 22, 2012 at 10:16 AM by Ben Nadel

Tags: ColdFusion

The other day, when I was looking up test cases for my Crypto.cfc project , I came across some hex-encoded values that I needed to convert to plain "String" values before I could easily use them in my Unit Tests. After doing this, it occurred to me that it might be fun to wrap the ColdFusion functions, binaryEncode() and binaryDecode() , into sm... read more »

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


Pusher.cfc - A ColdFusion Wrapper For Pusher.com v1.12 REST API

Posted: August 21, 2012 at 10:44 AM by Ben Nadel

Tags: ColdFusion

Yesterday, I launched a project - Crypto.cfc - for generating Hashed Message Authentication Codes (Hmac) in ColdFusion . As a follow-up, I wanted to quickly launch an updated Pusher.cfc ColdFusion component , which makes use of Crypto.cfc's hmacSha256() method when communicating with the Pusher.com REST API. Additionally, this Pusher.cfc updat... read more »

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


Crypto.cfc For Hmac-SHA1, Hmac-Sha256, and Hmac-MD5 Code Generation In ColdFusion

Posted: August 20, 2012 at 9:17 AM by Ben Nadel

Tags: ColdFusion

Last week, I talked about using binaryEncode() as an easy way to hex-encode binary values in ColdFusion . This is a processing step commonly used when generating a Hashed Message Authentication Code (Hmac) needed to sign a 3rd-party API request. As a follow-up to last week's post, I wanted to present a project that I created for generating Hmac v... read more »

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


Using Underscore.js Templates To Render HTML Partials

Posted: August 17, 2012 at 10:38 AM by Ben Nadel

Tags: Javascript / DHTML

I've never used Underscore.js before. But, we're going to start using some Backbone.js at InVision ; and, since Underscore.js is a hard dependency of Backbone.js, we decided to use Underscore's template() method as our client-side HTML partial rendering engine. All client-side template engines attempt to answer the same question: How do I me... read more »

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


Hex-Encoding A Binary Value / Byte Array In ColdFusion

Posted: August 16, 2012 at 10:18 AM by Ben Nadel

Tags: ColdFusion

When you start dealing with 3rd-party APIs, hex-encoding a byte array becomes a surprisingly common task. This is because 3rd-party APIs often require you to "sign" the request using your secret Key to produce a Hashed Message Authentication Code (Hmac). EmailYak uses the MD5 hashing algorithm ; Pusher uses the Sha-256 hashing algorithm ; and T... read more »

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


Syncing %{REQUEST_URI} Behaviors In Apache mod_rewrite And Helicon Ape mod_rewrite

Posted: August 13, 2012 at 10:15 AM by Ben Nadel

Tags: ColdFusion

In my local development environment, I have Mac's OSX and I use Apache mod_rewrite to handle URL rewriting. In my production environment, I have Window's 2008 Server and I use Helicon Ape mod_rewrite to handle URL rewriting. While Helicon Ape does a pretty good job of matching Apache's URL rewriting behavior, it differs from Apache in one extrem... read more »

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


Chrome Dev Tools "Live Update" In The JavaScript Console Is Confusing

Posted: August 9, 2012 at 9:33 AM by Ben Nadel

Tags: Javascript / DHTML

Yesterday, I was on a screen share with Ryan Jeffords and Alan Quinlan trying to help debug some JavaScript code. And, like so many developers, we made healthy use of "console.log()" as a means to debug when and where code was going wrong. Only, we were using Chrome as our development browser - not Firefox with Firebug. As such, we got burned ... read more »

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


JavaScript isNaN() Coerces Values When Testing For Numbers

Posted: August 8, 2012 at 9:31 AM by Ben Nadel

Tags: Javascript / DHTML

Recently, I was tripped up in my JavaScript debugging due to the way that the isNaN() (ie. is "not a number") function treats its argument. I was trying to track down an elusive bug that would occasionally present a numeric ID as the empty string (""). To figure out why this was happening, I put an isNaN() check in place in order to perform loggin... read more »

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


Mapping CSS Sprite Image Coordinates With ColdFusion

Posted: August 7, 2012 at 10:19 AM by Ben Nadel

Tags: ColdFusion, HTML / CSS

Last week, I got the idea to upload a CSS Sprite image and have ColdFusion scan the image in order to calculate the coordinates and dimensions of individual sprites contained within the image. And, about five attempts later, I had nothing! What I had assumed would be a rather simple task turned into a complex task, fraught with stack overflows, ex... read more »

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


Using The Quality Attribute With The CFImage WriteToBrowser Action

Posted: August 3, 2012 at 9:33 AM by Ben Nadel

Tags: ColdFusion

The other day, I needed to do some on-the-fly conversion of PNG image files to JPG format in ColdFusion. This was part of stop-gap measure at InVision for mobile devices that can handle more JPG data than they can PNG data. ColdFusion makes this kind of process super simple with the WriteToBrowser action of the CFImage tag. All I had to do was t... read more »

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


Compiling / Optimizing A Subset Of A RequireJS Application

Posted: August 2, 2012 at 10:26 AM by Ben Nadel

Tags: Javascript / DHTML

In my last few blog posts, I explored the lazy-loading of a RequireJS module within a modular JavaScript application . I don't know if such an approach is really worthwhile - I'm not convinced that it wouldn't just be better to concatenate everything into a single, front-loaded file; but, I thought it was a fun mental exercise. To continue on in ... read more »

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

Showing 1 - 14 of 14   Pages: 1 < Prev | Next >

July 2012 Entries »

View All Blog Entries »

  • Help Wanted - Find Your Next ColdFusion Job
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
May 22, 2013 at 12:44 PM
Ask Ben: Query Loop Inside CFScript Tags
In cf10, if you call a function that has: local.result = {}; local.result.msg = ""; local.svc = new query(); local.svc.setSQL("SELECT * FROM..."); local.obj = local.svc.exe ... read »
May 22, 2013 at 12:29 PM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Ben: What version of Java are you using? Also, did you test users.id to see what Java reports as the data type? I wonder if it's not a Java primitive data type, but getting returned as something ... read »
May 22, 2013 at 11:47 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Dana, Awesome - so it looks like this bug was fixed in ColdFusion 10. Thanks so much for double-checking that. ... read »
May 22, 2013 at 11:37 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
When I c&p and run on cf10, I get: Selected User IDs: 1,4 User 1 selected: YES - YES User 2 selected: NO - NO User 3 selected: NO - NO User 4 selected: YES - YES User 5 selected: NO - ... read »
May 22, 2013 at 11:27 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Tom, Good thought, but no dice. Both of these still exhibit the same behavior: users.id[ users.currentRow ] users[ "id" ][ users.currentRow ] It's just something whacky happening with ... read »
May 22, 2013 at 11:07 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
Could your problem be that "users.id" is actually an ARRAY, not a single value? Perhaps try it again with "users.id[1]" (I only have CF8 here at work). ... read »
May 22, 2013 at 7:52 AM
Nested Views, Routing, And Deep Linking With AngularJS
Hi, Just a quick thank you. As it happens, for my own purposes, the pending ui-router work being done in native angular is likely the one I'll adopt, but your exploration, code and documentation of ... read »
May 22, 2013 at 4:43 AM
How Do You Use The ColdFusion CFParam Tag?
'<cfparam>' or 'isDefined()and <cfset>' performs the same task.Is there any difference? ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools