Recent Web Log Entries By Ben Nadel

Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion

Posted: May 22, 2013 at 9:58 AM by Ben Nadel

Tags: ColdFusion

Yesterday, I was trying to use the arrayContains() method introduced in ColdFusion 9 . Unfortunately, it wasn't working. Even when I double-checked all the values in play, arrayContains() kept telling me that a known value was not in the given array. I tried switching over to arrayFind(), but unfortunately, this exhibited the same broken behavior... read more »

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



Using A Dynamic Column Name With ValueList() In ColdFusion

Posted: May 20, 2013 at 9:49 AM by Ben Nadel

Tags: ColdFusion

For the most part, ColdFusion is awesome when it comes to creating and consuming dynamic variables. Using quotes, we can easily create dynamic variable handles ; we can define dynamic class paths ; we can define dynamic struct keys ; and, we can access dynamic struct keys. ColdFusion even provides ways to invoke dynamic methods on components ... read more »

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


The UX Of Prototyping: Low-Fidelity Is The New High-Fidelity

Posted: May 10, 2013 at 10:08 AM by Ben Nadel

Tags: Work

As a User Experience (UX) designer, I spend a lot of time with pen and paper, sketching interfaces, testing ideas, and fleshing out use-case workflows. I work exclusively in grayscale. This holds true for both sketching and digital prototyping. On paper, I use a black pen (Pilot Precise Grip, Bold) on white, unruled paper; on the computer, I use a... read more »

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



HashKeyCopier - An AngularJS Utility Class For Merging Cached And Live Data

Posted: May 7, 2013 at 9:46 AM by Ben Nadel

Tags: Javascript / DHTML

A while back, I blogged about how AngularJS uses an expando property, $$hashKey, in order to associate a $scope-based object with a current node in the Document Object Model (DOM). The existence of this expando property is critical because it prevents AngularJS from accidentally and needlessly re-creating DOM elements (and re-linking Directives)... read more »

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


Delegating Nested Directive Behavior To Parent Directive In AngularJS

Posted: May 1, 2013 at 6:54 PM by Ben Nadel

Tags: Javascript / DHTML

In an AngularJS JavaScript web application, the part of your code that pipes user behaviors into controller methods is known as the, "directive." Out of the box, AngularJS ships with many powerful directives like ngClick, ngRepeat, ngSubmit, etc.; but, AngularJS also allows you to define as many custom directives as you want. This is awesome; but,... read more »

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


What If All User Interface (UI) Data Came In Reports?

Posted: April 30, 2013 at 9:53 AM by Ben Nadel

Tags: ColdFusion

As I've been trying to think more deeply about software application architecture , and experimenting with new ideas, one thing has become painfully obvious to me: shoehorning your domain model into your user interface (UI) leads to pain. Maybe not at first - maybe not when your user interface is a simplistic representation of your domain; but ove... read more »

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


Tiny Test - An Exploration Of Unit Testing In ColdFusion

Posted: April 29, 2013 at 9:45 AM by Ben Nadel

Tags: ColdFusion

I am not good at unit testing my code. I've played around a little bit with MXUnit (for ColdFusion) and Jasmine (for JavaScript) ; but, I've not really committed to using unit testing within my professional workflow. I know this is bad; and, I know it needs to be fixed. So, I decided to sit down and really try to get comfortable with unit testi... read more »

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


Forced Repaints In Directive Can Cause Accidental Scrolling In AngularJS

Posted: April 24, 2013 at 9:51 AM by Ben Nadel

Tags: Javascript / DHTML

The other day, I started getting an odd behavior in an AngularJS application that had a tabbed interface. Normally, with a tabbed interface, when the user switches from tab to tab, the scroll offset of the browser should remain the same. And, this is how our application was working. But then suddenly, we started seeing a "scroll-to-top" behavior w... read more »

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


Looking At Prototypal Inheritance To Determine Data Types In JavaScript

Posted: April 12, 2013 at 9:42 AM by Ben Nadel

Tags: Javascript / DHTML

Yesterday, I was working on some JavaScript that needed to execute slightly different actions when a given value was either an Object or an Array. Typically for this, I would use something like Underscore.js or Lodash.js, which converts the value to a String and looks at the result; but, as I was writing the code, I wondered if we could use the gi... read more »

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


Stateless Service Singletons vs. Stateful Service Entities

Posted: April 2, 2013 at 4:34 PM by Ben Nadel

Tags: ColdFusion, Javascript / DHTML

The other day, I was watching one of the Test Driven Development (TDD) episodes in the Clean Coder video series by Robert C. Martin . In the episode, Robert Martin (aka Uncle Bob) was using the Red-Green-Refactor approach to refactoring some HTML formatter class. As he was walking through the demonstration, something completely tangential struck ... read more »

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


ColdFusion Implicit Getter Has Incorrect Type For Being Called As A Function

Posted: April 1, 2013 at 10:11 AM by Ben Nadel

Tags: ColdFusion

ColdFusion 9 overloaded the CFProperty tag (or just "property" in CFScript) to allow for the definition of implicit, or synthesized, getter and setter methods . Lately, I've been using these implicit setters as a way to provide dependency injection hooks for Sean Corfield's DI/1 Framework . The setters seems to work without fail. And, 99% of the... read more »

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


The Clean Code Video Series By Robert C. Martin, aka Uncle Bob

Posted: March 28, 2013 at 9:18 AM by Ben Nadel

Tags: Books

Last June, I read Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin . In the comments to that post, Frederik Vig suggested that I should take a look at the "Clean Coders" video series , also presented by Robert Martin. Having loved the Clean Code book, I promptly opened the Clean Coders website in a new Firefox tab - w... read more »

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


CFFile Upload - The Filename, Directory Name, Or Volume Label Syntax Is Incorrect

Posted: March 22, 2013 at 9:13 AM by Ben Nadel

Tags: ColdFusion

In all the years that I've been using ColdFusion, I've never really had a problem with CFFile Upload (ie. CFFile action=upload). It just works; and it's awesome. The other day, however, I started getting this really odd error from my ColdFusion CFFile tag: The filename, directory name, or volume label syntax is incorrect. Since nothing around th... read more »

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


Understanding CSS Transitions And Class Timing (Revisited)

Posted: March 20, 2013 at 9:37 AM by Ben Nadel

Tags: HTML / CSS, Javascript / DHTML

Yesterday, I looked at CSS transitions and examined the timing in which the transitions would take effect . And, again, I don't mean the duration of the transition; or knowing when the transition ended. I mean, when does the browser actually initiate a transition in relationship to your mutation of an element's CSS properties. In the comments to ... read more »

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


Understanding CSS Transitions And Class Timing

Posted: March 19, 2013 at 9:55 AM by Ben Nadel

Tags: HTML / CSS, Javascript / DHTML

UPDATE : @Ron, in the comments, pointed out that this demo does not work as expected in Chrome. Apparently Firefox (my dev environment of choice) and Chrome handle this case somewhat differently. I've only just started to use CSS transitions; but, I already love them. They seem like a great way to augment the behavior of your application user ... read more »

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

May 2013 Entries »

Previously Posted

Matthew McCullough And Tim Berglund On Mastering Git - O'Reilly Video Series - Posted Mar 18, 2013
Removing Inline Opacity Filters After Fade-In / Fade-Out Transitions In IE8 - Posted Mar 15, 2013
Reading Images With Fallback Approaches In ColdFusion - Posted Mar 8, 2013
Accessing $scope On The DOM Using AngularJS - Posted Mar 1, 2013
Grouping Nested ngRepeat Lists In AngularJS - Posted Feb 28, 2013
POIUtility.cfc Now Hosted On GitHub - Posted Feb 26, 2013
Exploring Sample Software Application Layers And Responsibilities - Posted Feb 22, 2013
Using AtomicInteger To Create Uniquely Named CFThreads In ColdFusion - Posted Feb 20, 2013
Mixing Static And Dynamic Data In An AngularJS Select Menu - Posted Feb 19, 2013
Adding An ngRepeat List Delimiter In AngularJS - Posted Feb 17, 2013
Using ngController With ngRepeat In AngularJS - Posted Feb 15, 2013
Directive Link, $observe, And $watch Functions Execute Inside An AngularJS Context - Posted Feb 13, 2013
Using jQuery Event Delegation In AngularJS - Posted Feb 12, 2013
Exploring Directive Controllers, Compiling, Linking, And Priority In AngularJS - Posted Feb 9, 2013
Using Controllers In Directives In AngularJS - Posted Feb 1, 2013
Using CSS Pseudo Elements :before And :after - Posted Jan 21, 2013
Exploring Directives, $scope, DOM Rendering, And Timing In AngularJS - Posted Jan 18, 2013
Rendering DOM Elements With ngRepeat In AngularJS - Posted Jan 16, 2013
Clearing Inline CSS Properties With jQuery - Posted Jan 15, 2013
Nested Views, Routing, And Deep Linking With AngularJS - Posted Jan 14, 2013
Creating A Custom Show / Hide Directive In AngularJS - Posted Jan 4, 2013
My Experience With AngularJS - The Super-heroic JavaScript MVW Framework - Posted Jan 3, 2013
Command-Query-Responsibility-Segregation (CQRS) Makes Domain Models Practical - Posted Dec 28, 2012
Software Application Layers And Responsibilities - Posted Dec 21, 2012
What The Heck Is Business Logic Anyway? - Posted Dec 14, 2012
Are HTML FORM Tags Required To Display Form Input Controls? - Posted Oct 26, 2012
HTTP Status Codes For Invalid Data: 400 vs. 422 - Posted Oct 17, 2012
Using RESTful Controllers In An AngularJS Resource - Posted Oct 17, 2012
Applying A Cached Response To An AngularJS Resource - Posted Oct 12, 2012
Resolving An AngularJS Deferred Object Twice With DeferredWithUpdate.js - Posted Oct 8, 2012
Inlining AngularJS Templates Using ColdFusion - Posted Oct 5, 2012
Using JavaScript to Submit UTC Dates To The ColdFusion Server - Posted Oct 2, 2012
Change In ColdFusion Date::getTime() Method In ColdFusion 10 - Posted Oct 1, 2012
Using jQuery Deferred.notify() To Provide Locally Cached Data - Posted Sep 27, 2012
Detecting Spam In User-Submitted Content With SpamAnalyzer.cfc - Posted Sep 25, 2012
Decorating Scope Methods In The AngularJS Prototype Chain - Posted Sep 24, 2012
Setting Prototype Properties Using Inherited Scope Methods In AngularJS - Posted Sep 20, 2012
Exposing A Mouse Service For Click Events In AngularJS - Posted Sep 18, 2012
Capturing Document-Click Events With AngularJS - Posted Sep 17, 2012
Creating AngularJS Controllers With Instance Methods - Posted Sep 13, 2012

View All Blog Entries »

  • Help Wanted - Find Your Next ColdFusion Job
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
May 23, 2013 at 5:19 AM
Ask Ben: Print Part Of A Web Page With jQuery
How to print also the background color of table cells and table lines ... read »
May 23, 2013 at 3:55 AM
Javascript Array Methods: Unshift(), Shift(), Push(), And Pop()
very interesting and helpful too. ... read »
May 22, 2013 at 5:35 PM
Script Tags, jQuery, And Html(), Text() And Contents()
This is still an issue 2 years later. jQuery is supposed to remediate these cross browser issues, no? I have been unable to find any statement from the jQuery team calling this behavior "by de ... read »
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 »
InVision App - Prototyping Made Beautiful With Prototyping Tools