Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
I am the chief technical officer at InVision App, Inc - a prototyping and collaboration platform for designers, built by designers. I also rock out in JavaScript and ColdFusion 24x7.
Meanwhile on Twitter
Loading latest tweet...
Ben Nadel at RIA Unleashed (Nov. 2010) with:

Recent Blog Posts by Ben Nadel

Using ORDER BY And LIMIT Clauses In A UNION SQL Statement

Posted: April 18, 2014 at 5:26 PM by Ben Nadel
Tags: ColdFusion, SQL

When it comes to SQL (Structured Query Language), I don't use the UNION construct all that often. But, when I do, one of the features that makes it so powerful is the fact that you can apply both an ORDER BY clause and a LIMIT clause to the derived result set of the union (at least in MySQL). Furth... read more »

Using JSONP With $resource In AngularJS

Posted: April 17, 2014 at 7:56 AM by Ben Nadel

The other day, I was tracking down an "Access Denied" error when I came across an AngularJS $resource that was making a Cross-Domain request. It seemed that this was only happening in IE9 (if memory serves me correctly), so I assumed that it was a limitation with CORS (Cross-Origin Resource Sharing... read more »

Internet Explorer Aborts Images With The Wrong Mime-Type

Posted: April 15, 2014 at 7:50 AM by Ben Nadel
Tags: ColdFusion

This is a really quick post; but, it took me over an hour to debug the other day, so I thought I would share. I was in a situation where I had to serve up images. This seemed to work well in every browser except IE (Internet Explorer). Furthermore, IE seemed to serve up some images and not others. ... read more »

Finding Shallow HTML Comment Nodes In The DOM Using TreeWalker

Posted: April 14, 2014 at 7:49 AM by Ben Nadel

The other day, I starting playing around with the TreeWalker API as a way to iterate over HTML comment nodes contained within a given DOM (Document Object Model) node. When I first started tinkering, it didn't look like there was any way to perform a "shallow" search (ie, only look at child nodes... read more »

Finding HTML Comment Nodes In The DOM Using TreeWalker

Posted: April 12, 2014 at 12:46 PM by Ben Nadel

The other day, I blogged about my jQuery plugin that facilitates searching the DOM (Document Object Model) for Comment nodes based on pseudo attributes . While I was writing that plugin, I came across a relatively new JavaScript API, the TreeWalker. The TreeWalker provides an iteration interface f... read more »

Searching The DOM For Comment Nodes Based On Value And Pseudo-Attributes

Posted: April 11, 2014 at 5:43 PM by Ben Nadel

A couple of years ago, I wrote a really simple jQuery plugin that searched a given DOM (Document Object Model) node for nested Comment nodes. But, it was an all or nothing approach; meaning, you either got comments or you didn't. It wasn't terribly useful. So, I wanted to see if I could rewrite t... read more »

$scope.$evalAsync() vs. $timeout() In AngularJS

Posted: April 9, 2014 at 7:27 AM by Ben Nadel

Sometimes, in an AngularJS application, you have to explicitly tell AngularJS when to initiate it's $digest() lifecycle (for dirty-data checking). This requirement is typically contained within a Directive; but, it may also be in an asynchronous Service . Most of the time, this can be easily accom... read more »

The User Experience (UX) Of Sketching In Prototyping

Posted: April 8, 2014 at 6:53 AM by Ben Nadel

The first step in my design process is always rough sketching. This is where I try to translate my mental model into some sort of visual experience. While it's far from perfect, sketching can really help me think through the design of a user experience (UX). For me, sketching happens in two places:... read more »

Directive Controller And Link Timing In AngularJS

Posted: April 5, 2014 at 10:34 AM by Ben Nadel

I've talked about the timing of directives in AngularJS a few times before. But, it's a rather complicated topic, so I don't mind digging a bit deeper. This time, I'm looking at the timing of directive controllers vs. directive link functions. As the DOM (Document Object Model) is compiled by Ang... read more »

The User Experience (UX) And Cognitive Dissonance Of Forms

Posted: April 3, 2014 at 7:14 AM by Ben Nadel

Forms are perhaps the most infamous aspect of web development. No one enjoys developing them and, apparently, no one enjoys using them. But here's my cognitive dissonance - almost no Form has ever stood between me and something that I wanted. Maybe I can vaguely remember a form or two that was so c... read more »

The User Experience (UX) Of Color Contrast In A Call-To-Action

Posted: April 1, 2014 at 9:35 PM by Ben Nadel

I don't use the Google Mail app on my iPad all that much. I'll glance at the inbox to see if there are any emergencies; but, beyond that, I don't do anything that requires significant interaction. As far as I'm concerned, my iPad is for consumption, not production. From time to time, I'll send myse... read more »

Implementing Java's Collections.Shuffle() In JavaScript

Posted: April 1, 2014 at 7:30 AM by Ben Nadel

When I'm working with ColdFusion, and I need to shuffle an array of items, my default move is to pass the array down into the Java layer where I can leverage the Collections class . There, the shuffle() method makes sorting an array a simple task. The other day, I needed to shuffle a JavaScript ar... read more »

The Principles Of Object-Oriented JavaScript By Nicholas Zakas

Posted: March 30, 2014 at 7:28 PM by Ben Nadel

Over the weekend, I finished reading The Principles of Object-Oriented JavaScript by the famed Nicholas Zakas . In a relatively short 116 pages (less the index) Zakas takes the reader through the ins-and-outs of using objects in JavaScript. But, don't be confused - this is not a philosophical book... read more »

Years Later, I Still Love jQuery

Posted: March 28, 2014 at 8:41 AM by Ben Nadel

As modern browsers have become more modern and JavaScript frameworks have become more robust, there seems to be a growing trend amongst front-end developers in which the desire to use jQuery has diminished. In the most extreme cases, I even hear people talk about jQuery as something they can "final... read more »

Preloading Images In AngularJS With Promises

Posted: March 27, 2014 at 7:51 AM by Ben Nadel

When I first started using AngularJS, I was so concerned with doing things the, " Angular Way ," that I ended up making some poor choices. Most noticeably was the way in which I tried to preload images in my application. Thinking only of images as "DOM" (Document Object Model) elements, I delegated... read more »

Case Study: Using $scope.$digest() As A Performance Optimization In AngularJS

Posted: March 25, 2014 at 8:15 AM by Ben Nadel

Yesterday, I blogged about using the $scope.$digest() method in AngularJS as an optimization over the more traditional $scope.$apply() method . Since this is a special kind of optimization that cannot be applied in a general manor, I wanted to present a case-study in which the $digest optimization... read more »

Using $scope.$digest() As A Performance Optimization In AngularJS

Posted: March 22, 2014 at 1:56 PM by Ben Nadel

The other day, I was listening to Brian Genisio , on the Front-End Developer Cast , when I heard him draw a distinction between the $apply() method and the $digest() method in AngularJS. The $apply() method will trigger watchers on the entire $scope chain whereas the $digest() method will only tr... read more »

Using Transparent Select Menus To Create Styled Menu Roots

Posted: March 21, 2014 at 7:40 AM by Ben Nadel

At work, we use Trello for our project management. It's a super light-weight tool that offers an unopinionated approach to task management. But, more than that, it presents some really cool technical choices. One such choice that I wanted to look at was their use of transparent Select menus. I a... read more »

IsValid() Accepts Emails With Leading And Trailing Whitespace In ColdFusion

Posted: March 18, 2014 at 8:14 AM by Ben Nadel
Tags: ColdFusion

This is just a quick note about validating email addresses with the isValid() function in ColdFusion. While debugging a issue in one of my applications, I discovered that isValid() accepts email addresses as being valid even if they contain leading and / or trailing whitespace. Take a look a this d... read more »

Hooking Into The Complete Event Of An ngRepeat Loop In AngularJS

Posted: March 14, 2014 at 4:26 PM by Ben Nadel

Earlier today, I was talking to Brian Feister on Twitter about invoking a callback when an ngRepeat loop had finished rendering for the first time. This isn't something that the ngRepeat directives exposes naturally; but, I had an idea of how you might be able to accomplish this with a sibling di... read more »

Embedding Foreign Characters In Your Content-Disposition Filename Header

Posted: March 13, 2014 at 7:19 AM by Ben Nadel
Tags: ColdFusion

Since English is my primary language, I sometimes don't realize that aspects of my web applications don't play nicely with non-US ASCII characters. Such is the case with the "Content-Disposition" header. I've been using it for years; but, only found out last week that the "filename" portion of the ... read more »

Sanity Check: $index vs. DOM In AngularJS Directives

Posted: March 4, 2014 at 8:23 AM by Ben Nadel

With AngularJS, there is such a strong separation between the DOM (Document Object Model) and your Controller / Model / Service components, that I sometimes find myself unsure as to when I can depend on the existence of dynamically-generated DOM nodes within AngularJS directives . The other day, I... read more »

Using The Timeout Attribute With CFHttp In ColdFusion To Limit Blocking

Posted: February 26, 2014 at 7:50 AM by Ben Nadel
Tags: ColdFusion

By default, when you make a CFHttp request in ColdFusion, the tag will block the current page request until the CFHttp tag returns a response. Most of the time, this is what you want. But, if you're dealing with a non-critical request (such as a 3rd-party "event" API), it can often make sense to pr... read more »

The Elvis Operator vs. IsNull() In ColdFusion 11 Beta

Posted: February 25, 2014 at 8:24 AM by Ben Nadel
Tags: ColdFusion

In the beginning, ColdFusion gave us isDefined(). Then, structKeyExists(). And, as the concept of "null" started to become a first-class concept, ColdFusion delivered unto us isNull(). Now, with ColdFusion 11 Beta, we have the "elvis" operator - ?: - so called because it looks like a well-coiffed e... read more »

Robust CFScript Suport For Tags In ColdFusion 11 Beta

Posted: February 24, 2014 at 7:33 AM by Ben Nadel
Tags: ColdFusion

Over the past several releases of ColdFusion, the support for CFScript have been getting much better. In fact, I write most of my ColdFusion code in CFScript; but, the CFScript feature set does leaves something to be desired. With ColdFusion 11 Beta, however, it looks like Adobe has finally given u... read more »

Chunking Amazon S3 File Uploads With Plupload And ColdFusion

Posted: February 21, 2014 at 8:40 AM by Ben Nadel

Earlier this week, I took a look at using Plupload to chunk file uploads to your ColdFusion server . When I saw that working, I got excited; I wondered if I could use the same approach to chunk uploads directly to Amazon S3? Several evenings of R&D later, I have it working (mostly)! The princi... read more »

Chunking File Uploads With Plupload And ColdFusion

Posted: February 18, 2014 at 7:50 AM by Ben Nadel

I've been a long-time super-fan and consumer of Plupload - the multi-runtime JavaScript file uploader . But lately, I've been having some issues with users uploading very large files. In my own testing, if I select a file larger than 250MB, it never leaves the browser (confirmed by all server-side... read more »

Using ObjectSave() And ObjectLoad() With Non-ColdFusion-Component Data Types

Posted: February 13, 2014 at 7:23 PM by Ben Nadel
Tags: ColdFusion

A few years ago, I took a quick look at the objectSave() and objectLoad() functions , introduced in ColdFusion 9. These functions serialize and deserialize ColdFusion data values using a binary format. When I first looked into these functions, I only tested them on ColdFusion components; and, fou... read more »

The User Experience (UX) Of The 2011 Jeep Grand Cherokee Manifesto Commercial

Posted: February 4, 2014 at 4:49 PM by Ben Nadel

For the last three years, one television commercial has truly stuck out in my mind as being great. The 2011 Jeep Grand Cherokee "Manifesto" commercial . When I watch it, I get chills. I feel inspired. I tell others about it because I want them to feel the same thing that I do. But what is it that ... read more »

Using Hosted Graphite With ColdFusion And GraphiteD

Posted: February 2, 2014 at 7:50 PM by Ben Nadel
Tags: ColdFusion

I want to measure all the things! Unfortunately, I'm not so great at it. So, I want to really start digging into things like StatsD and Graphite. For me, I learn best (sometimes) by building. So, instead of installing StatsD and Graphite (which I hear is a pain to do), I built GraphiteD.cfc - a Co... read more »