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 CFUNITED 2009 (Lansdowne, VA) with:

Recent Blog Posts by Ben Nadel

MySQL EXISTS() Operator Returns True Or False

By Ben Nadel on March 3, 2015
Tags: ColdFusion, SQL

For years, I've been using the SQL EXISTS() operator to help limit the number of results in a data set . But, it wasn't until just yesterday that I actually started to think about what EXISTS() returned - I sort of just took it for granted that it worked in a WHERE clause. As it turns out, EXISTS(... read more »

Shedding The Monolithic Application With AWS Simple Queue Service (SQS) And Node.js

By Ben Nadel on March 2, 2015

For too long, I have lived in the world of the monolithic web application - the single application that does everything for everyone. This year, I really want to evolve my understanding of web application architecture and try to think about applications as a collection of loosely coupled services. ... read more »

Using The Amazon Web Services (AWS) SDK To Create Pre-Signed S3 URLs With Path-Style Access

By Ben Nadel on February 27, 2015
Tags: ColdFusion

Amazon's Simple Storage Service (S3) provides two different ways to structure your S3 URLs. In the "virtual-hosted-style", your bucket name becomes part of the domain; and, in the "path-style", your bucket name becomes part of the resource (as a prefix to your object key). When you're making reques... read more »

Using Plupload To Upload Files Directly To Amazon S3 Using PUT And Pre-Signed (Query String Authenticated) URLs

By Ben Nadel on February 26, 2015

Out of the box, Plupload hard-codes the "POST" method when it uploads a file to the remote server. This is fine if you want to upload files to Amazon S3 using a form upload policy ; but, it falls short if you want to upload files to Amazon S3 using a pre-signed URL . Pre-signed (aka, query string... read more »

Be Careful With Compound Conditions In AngularJS (And JavaScript In General)

By Ben Nadel on February 25, 2015

This post really has nothing to do with AngularJS specifically; but, I happen to trip over this feature of the JavaScript language while constructing an AngularJS view. As such, I thought I should present it in an AngularJS context in case other Angularistas find it interesting. What I'm referring ... read more »

Creating A Factory Provider For The Configuration Phase In AngularJS

By Ben Nadel on February 24, 2015

Yesterday, in my post on consuming Data URIs in an AngularJS application , I created a caching service that would automatically evict cache entires after a static period of time. As I was building that, it occurred to me that the eviction-timeout is probably something that should be exposed during... read more »

Consuming Plupload Data URIs In An AngularJS Application

By Ben Nadel on February 23, 2015

I've been using Plupload as my HTML5 uploader in AngularJS for a long time. I've even looked at the mechanics of extracting a Base64-encoded image preview from a Plupload file ; but, I've never really noodled on how to best consume those data URIs in the context of a real AngularJS application. ... read more »

  Is Not A Four-Letter Word

By Ben Nadel on February 19, 2015
Tags: HTML / CSS

Before we had CSS (Cascading Stylesheets), we had Font tags. And Table layouts. And, of course, the beautiful and ever-versatile "spacer.gif". When CSS came along, however, we were able to get rid of these hacky and verbose solutions. And, the more that modern browsers support advanced CSS, the mor... read more »

Volatile Keys Can Expire Mid-MULTI-Transaction In Redis / Jedis

By Ben Nadel on February 19, 2015
Tags: ColdFusion, Redis

Yesterday, I was surprised to find that I had 4 keys in my Redis name-space that had no expiration date (Time-To-Live). I'm creating hundreds-of-thousands (if not millions) of keys a day, all with expiration dates. And yet, 4 of them were persisted without an expiration date. Such a tiny number of ... read more »

Animating A Single Item Using ngRepeat And ngAnimate In AngularJS

By Ben Nadel on February 18, 2015

It's easy to think about animations when you have objects that have conditional existence. Meaning, sometimes they're on the page, sometimes they're not. But, what about when you have data that is always present, but is sometimes changing? How can you animate that? One idea would be to create a cus... read more »

Deferring Route Configuration Using Decorators And Route Resolution In AngularJS

By Ben Nadel on February 16, 2015

After recently learning about service decorators and route resolution in AngularJS , I wanted to see if I could have a little fun with the two features combined. While I don't really have a use-case for this experiment, I wanted to see if I could create a $route service decorator that would allo... read more »

Route Resolution Using Factory Functions vs. Services In AngularJS

By Ben Nadel on February 14, 2015

The other day, I started digging into route resolution in AngularJS . In that post, I demonstrated that you could delay the $routeChangeSuccess event by creating one or more promises during the route transition. In that post, I was using a resolution factory function; but, I could have also used a... read more »

Exploring $route Resolution In AngularJS

By Ben Nadel on February 12, 2015

After my recent posts on AngularJS routing and the back-button and how route params are passed-around in redirectTo actions , I wanted to take a look at route resolution. This is a feature that I've never actually used before; but, in AngularJS, you can defer the triggering of the $routeChangeSu... read more »

$route redirectTo Will Pass-Through Current Route Params In AngularJS

By Ben Nadel on February 10, 2015

After my demonstration yesterday, that the redirectTo operation in AngularJS routing wouldn't break the back button , I wanted to dig into redirectTo a bit more. It's easy to redirect to a static string; but, what about redirecting to a dynamic path? As it turns out, AngularJS supports this implic... read more »

$route redirectTo Does Not Break The Back Button In AngularJS

By Ben Nadel on February 9, 2015

When defining routes in an AngularJS application, you can provide routes that do nothing but redirect to other routes. This works for both explicitly defined routes as well as for the catch-all "otherwise" route. One awesome feature of the "redirectTo" property, which I just discovered, is that it ... read more »

Exploring $q And Scope $digest Integration In AngularJS

By Ben Nadel on February 5, 2015

Lately, I've been doing a lot of Promise exploration in AngularJS . Promises are an amazing mechanism for handling asynchronous processing, which is basically what JavaScript is all about. In AngularJS, the $q service - Angular's promise library - is tightly integrated with the "model observation ... read more »

Monitoring $http Activity With $http Interceptors In AngularJS

By Ben Nadel on February 4, 2015

After experimenting with the $provide.decorator() method in AngularJS , I wanted to try looking at another form of decorator (of sorts) - an interceptor. For a long time, AngularJS has allowed us to intercept $http responses. Then, in AngularJS 1.1.4, they extended interceptor functionality to inc... read more »

Odd Error Involving CFThread, WriteDump(), Format Text, CFSaveContent And ColdFusion 10

By Ben Nadel on February 2, 2015
Tags: ColdFusion

Yesterday, I happened upon a really odd bug in ColdFusion 10. I point out ColdFusion 10 as this seems to work just fine in ColdFusion 11; so, if you're on 11, feel free to ignore. The error only occurs in a extremely specific context: Using the writeDump() method with format="text" inside a CFSaveC... read more »

Monkey-Patching The $q Service Using $provide.decorator() In AngularJS

By Ben Nadel on January 30, 2015

This morning, I posted a blog post on monkey-patching the $q service to include an .fcall()-inspired method for function execution in a Promise chain . After posting it, Tomasz Stryjewski and Phil DeJarnett both pointed out that my use of the .run() block was a poor choice when it came to serv... read more »

Monkey-Patching The $q Service With .fcall() In AngularJS

By Ben Nadel on January 30, 2015

Yesterday, I looked at the pitfalls of starting an AngularJS promise-chain if the promise-generating method might throw an error . In that post, I solved the problem by wrapping the initial method inside a .then() callback; but, what I'd really like is a method akin to .fcall() in the Q-promise li... read more »

Handling Top-Level Errors In A Promise Workflow In AngularJS

By Ben Nadel on January 29, 2015

In yesterday's post, on asynchronous promise workflows in AngularJS , all of my state transformation was done with explicit return values. As such, you didn't see the fact that the .then() method implicitly handles exceptions by transforming them into a rejected state. But, this feature got me thi... read more »

Exploring Asynchronous Promise-Based Workflows In AngularJS

By Ben Nadel on January 28, 2015

At InVision , we're going to start using a lot more Node.js to build out micro-services. And, while I love JavaScript, the vast majority of my server-side code has dealt with the synchronous, blocking nature of ColdFusion . As such, I feel like I need to start exploring more asynchronous workflow... read more »

Defining Post-Route-Change Scroll Behavior Using $location in AngularJS

By Ben Nadel on January 26, 2015

Over the weekend, I described my evolving thoughts on the use of $location in a route-driven AngularJS application . And, while I think that the post was accurate from a technical standpoint, I believe it failed to capture the actual workflow of $route / $location consumption in a complex user int... read more »

$route Must Be Injected In Order To Enable The $routeChangeSuccess Event In AngularJS

By Ben Nadel on January 24, 2015

Earlier, when I was exploring the use of the $location service to provide state-transformation triggers in AngularJS , I noticed something interesting about the $route service; the $routeChangeSuccess event won't fire until at least one component in the application has required the $route service.... read more »

Providing State-Transformation Triggers Using $location In AngularJS

By Ben Nadel on January 24, 2015

When I first started using routes, nested views, and deep linking in AngularJS , I thought that everything in the URL had to be related to the route. As such, I rarely ever used the $location service, except to change the path in order to trigger a new route-change event. Over time, however, I cam... read more »

Staggering ngRepeat Animations In AngularJS

By Ben Nadel on January 22, 2015

Lately, I've been trying to learn more about the new animation features of the ngAnimate module available as of AngularJS 1.2. In my reading, I saw mention of the ability to "stagger" animations. As someone who has a love-hate relationship with user interface (UI) transitions , this struck me as... read more »

Watching A Collection Of Expressions Using Scope.$watchGroup() In AngularJS

By Ben Nadel on January 21, 2015

Since the early days, AngularJS has provided us with the Scope.$watch() method as a means to observe changes in the View-Model. Then, they added the Scope.$watchCollection() to perform a shallow-watch or arrays . Now, in AngularJS 1.3, they've added Scope.$watchGroup(). This new method watches a c... read more »

Stateless Filters Don't Apply To Objects, Arrays, or ngRepeat In AngularJS 1.3

By Ben Nadel on January 20, 2015

In the past, I have talked about my dislike for Filters in AngularJS. Not only do they have a performance concern, they also make it harder to manage the state of the View as filtering is applied to collections (ex, ngRepeat). The other day, after some filter-based frustration (with someone else's ... read more »

Preventing Animation During The Initial Render Of ngRepeat In AngularJS

By Ben Nadel on January 18, 2015

As of AngularJS 1.2, directives that conditionally include content have also supported "enter" and "leave" style animations (with the help of the ngAnimate module). For most of these directives - like ngIf, ngInclude, and ngSwitch - animating the "enter" state makes a lot of sense. But, with ngRepe... read more »

ColdFusion 11 Accepts All Top-Level Domains (TLD) For IsValid() Email Validation

By Ben Nadel on January 17, 2015
Tags: ColdFusion

The other day, one of my users was having trouble changing his email address because he was using the ".marketing" top-level domain (TLD). In production, we still run ColdFusion 9, which has historically had problems with isValid( "email" ) . I know I'm a bit behind in the ColdFusion times, so I w... read more »