Recent Web Log Entries By Ben Nadel

ColdFusion Supports HTTP Verbs PUT And DELETE (As Well As GET And POST)

Posted: February 3, 2012 at 10:23 AM by Ben Nadel

Tags: ColdFusion, Javascript / DHTML

Over the weekend, I read an excellent book on building RESTful web services - the REST API Design Rulebook by Mark Masse . In the book, Masse describes how the various HTTP methods (also known as Verbs) are intended to be used to create, access, update, delete, and augment data within a RESTful web service API. As far as HTTP verbs go, I'm extrem... read more »

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



REST API Design Rulebook By Mark Masse

Posted: February 2, 2012 at 9:57 AM by Ben Nadel

Tags: Books

Over the weekend, I read The REST API Design Rulebook by Mark Masse . I absolutely loved this book! In a world where so many computer science questions are answered with, " It depends ," or, " there's no 'right' answer ," Masse comes through with a book that says, No, these are the rules - this is how you design a RESTful API. This book explores ... read more »

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


Use A Return Statement When Invoking Callbacks, Especially In A Guard Statement

Posted: February 1, 2012 at 10:09 AM by Ben Nadel

Tags: Javascript / DHTML

In a synchronous processing workflow, the Return statement tends to indicates the end of a given function's execution. In an asynchronous processing workflow, callbacks are more generally used to indicate the desired end of a given function's execution. That said, it is critical that a Return statement is also used in an asynchronous workflow in o... read more »

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



Using jQuery Deferred To Chain Validation Rules In An Asynchronous, Non-Blocking Environment

Posted: January 31, 2012 at 10:34 AM by Ben Nadel

Tags: Javascript / DHTML

A while back, I blogged about how client-side validation is changing the structure of server-side validation ; with the client creating user-friendly error messages, the server can finally streamline its validation and data processing using a light-weight, exceptions-based workflow. While I really like this evolutionary step in data handling, I r... read more »

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


How I Got Node.js Running On A Linux Micro Instance Using Amazon EC2

Posted: January 27, 2012 at 6:42 PM by Ben Nadel

Tags: Javascript / DHTML

In the past, I've dabbled with Node.js (a server-side JavaScript runtime environment) on my local MacBook Pro. If you know JavaScript, it's not too hard to get something up and running on your local machine. Putting Node.js out into the wild, however, is whole other beast. Not only am I mediocre at managing web servers in general, I happen to kn... read more »

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


Extending Classes In A Modular JavaScript Application Architecture Using RequireJS

Posted: January 26, 2012 at 10:25 AM by Ben Nadel

Tags: Javascript / DHTML

Yesterday, I tried to apply some deep thinking to how dependencies should be managed in a modular JavaScript application architecture that is using RequireJS . The conclusion that I came to was that RequireJS should manage and load "definitions" while your application should manage and load "instances." This makes sense since instantiation is the... read more »

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


Managed Dependencies vs. Dependency Injection In RequireJS

Posted: January 25, 2012 at 10:37 AM by Ben Nadel

Tags: Javascript / DHTML

In my journey towards understanding modular JavaScript application architecture, I've been using a lot of RequireJS . The RequireJS framework facilitates the organization and then the subsequent loading of individual JavaScript classes . When it comes to defining classes, RequireJS provides us with two opportunities for dependency loading: manag... read more »

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


Creating A Keyboard-Shortcuts Module In A Modular JavaScript Application

Posted: January 23, 2012 at 11:03 AM by Ben Nadel

Tags: Javascript / DHTML

Last week, I looked at handling keyboard shortcuts in a modular JavaScript application architecture . In that initial exploration, I distributed the handling of keyboard shortcuts across two different modules: a Controller module and the View module that would ultimately be affected by the command. After I was done with the code, however, I was l... read more »

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


Handling Keyboard Shortcuts Within Modular JavaScript Application Architecture

Posted: January 20, 2012 at 4:40 PM by Ben Nadel

Tags: Javascript / DHTML

Yesterday, when using Gmail, I started to think about keyboard shortcuts. Specifically, I started to think about how keyboard shortcuts get routed within a modular JavaScript application architecture. If I have a module that can respond to the keyboard - but, that module is not supposed to "know" about the document at large - how does it listen fo... read more »

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


Using An IFrame To Override document.write() Inside A DOM (Document Object Model) Sandbox

Posted: January 19, 2012 at 10:49 AM by Ben Nadel

Tags: Javascript / DHTML

Last week, I talked about loading GitHub Gist content after the DOM (Document Object Model) had loaded . This was a somewhat complex operation since the remote Gist Script tag uses document.write() in order to inject the Gist content into the calling document. If document.write() is called after the parent document has been "closed," the write() ... read more »

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


A Book Apart: Responsive Web Design By Ethan Marcotte

Posted: January 18, 2012 at 10:31 AM by Ben Nadel

Tags: Books

Last weekend, I read Mobile First by Luke Wroblewski . It was a compelling read that talked about the broader benefits of designing to the constraints of a mobile experience. At the end of his book, he suggested that Ethan Marcotte's book on Responsive Web Design would be a perfect compliment to the "mobile first" approach to web development. A... read more »

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


Trying To Mimic LET Functionality In JavaScript Using Self-Executing Functions

Posted: January 17, 2012 at 10:31 AM by Ben Nadel

Tags: Javascript / DHTML

Last night, I was listening to the Lately In JavaScript podcast . Among the many items discussed, one topic that was brought up was the emergence of the LET keyword in the next version of ECMAScript (the language on which JavaScript is based). LET allows for block-level variable binding; so, while the VAR keyword allows for function-level variabl... read more »

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


Experimenting With GitHub Gist-Based Code Samples For My Blog

Posted: January 16, 2012 at 10:25 AM by Ben Nadel

Tags: ColdFusion, Javascript / DHTML

Last week, I started looking around for a new color-coding solution for my blog's syntax highlighting. For the past couple of years, I've been using my own home-grown algorithm; which worked well for ColdFusion but, quite poorly for everything else. After looking at some of the options out there, I settling on trying to integrate GitHub's Gist hos... read more »

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


Loading GitHub Gists After The Page Content Has Loaded

Posted: January 13, 2012 at 10:54 AM by Ben Nadel

Tags: Javascript / DHTML

A long time ago, I created a syntax highlighter / color-coder for my blog post code snippets. It was a pain to create; but in the end, it worked pretty well. For ColdFusion code. That was tag based. In recent years, however, I've tried to branch out a bit, playing with other languages, JavaScript in particular. For these languages, my color coding... read more »

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


Using jQuery Deferred To Create Compound Objects From Multiple Asynchronous Data Sources

Posted: January 11, 2012 at 11:02 AM by Ben Nadel

Tags: Javascript / DHTML

As of now, all of my experimentation with modular JavaScript application architecture has been exclusive to client-side code. That is, it involves Views and Controllers, but no real sense of any Model that is tied to a persistent data store. As I've started to think about experimenting with the Model facet of client-side MVC (Model-View-Controll... read more »

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

February 2012 Entries »

Previously Posted

Using The RequireJS Build / Optimizer To Concatenate Modularized CSS Files - Posted Jan 10, 2012
Building Executable Scripts For The Mac OSX Command Line - Posted Jan 9, 2012
Creating A Fixed-Length Queue In JavaScript Using Arrays - Posted Jan 6, 2012
Disabling Auto-Correct And Auto-Capitalize Features On iPhone Inputs - Posted Jan 5, 2012
What CSS Properties Are Supported When You Drop IE6 Support - Posted Jan 4, 2012
A Book Apart: Mobile First By Luke Wroblewski - Posted Jan 3, 2012
Experimenting With A JavaScript Gateway To A Remote ColdFusion Persistence API - Posted Dec 30, 2011
How Client-Side Validation Is Changing The Shape Of Server-Side Validation - Posted Dec 29, 2011
Preventing Links In Standalone iPhone Applications From Opening In Mobile Safari - Posted Dec 27, 2011
InVision - Front-End JavaScript Developer Positions - Posted Dec 23, 2011
Creating A JavaScript Shim For Array Unshift() Method - Posted Dec 22, 2011
For Pay: I Need A Few Hours Consulting On Modular JavaScript Application Architecture - Posted Dec 20, 2011
Be Careful When Using The jQuery Proxy() Method Outside Of A jQuery Context - Posted Dec 19, 2011
EmailYak.cfc - A ColdFusion Wrapper For The Email Yak API - Posted Dec 14, 2011
Scalable And Modular Architecture For CSS (SMACSS) By Jon Snook - Posted Dec 12, 2011
Creating An Image Thumbnail Service Using Email Yak Attachments And ColdFusion - Posted Dec 9, 2011
Using Email Yak To Provide Bidirectional Email Communication In Your Web Applications - Posted Dec 7, 2011
A Book Apart: Designing For Emotion By Aarron Walter - Posted Dec 5, 2011
Extending JavaScript Arrays While Keeping Native Bracket-Notation Functionality - Posted Dec 1, 2011
Invoking A Native JavaScript Constructor Using Call() Or Apply() - Posted Nov 30, 2011
XML Posts Without A UTF-8 Encoding May Lead To 400 Bad Request Errors - Posted Nov 28, 2011
Using jQuery's Pipe() Method To Chain Asynchronous Validation Requests - Posted Nov 21, 2011
My First Look At The RequireJS Build Optimizer For Node.js - Posted Nov 17, 2011
Using jQuery As A Named Module In RequireJS - Posted Nov 16, 2011
Accepting PCI-Compliant Payments Without A Merchant Account Using Stripe And ColdFusion - Posted Nov 15, 2011
Writing A RequireJS Plugin To Load Remote jQuery Templates - Posted Nov 11, 2011
Using java.util.Collections To Shuffle A ColdFusion Query Column Corrupts Column Values - Posted Nov 8, 2011
Keeping Modules Decoupled Using Signals And Mediators - Posted Nov 4, 2011
Global Events vs. Entity-Bound Events In JavaScript Application Architecture - Posted Nov 2, 2011
jQuery Appends Multiple Elements Using Efficient Document Fragments - Posted Nov 1, 2011
Using jQuery's $.map() Method To Convert Data Into Detached DOM Node Buffers - Posted Nov 1, 2011
The Five Secrets You Must Discover Before You Die By John Izzo - Posted Oct 31, 2011
ColdFusion ORM: A Guide To Developing Applications Using ColdFusion ORM By John Whish - Posted Oct 31, 2011
Using the Text Plugin With RequireJS To Load Remote HTML Templates - Posted Oct 28, 2011
Using One Object Per Event Type With Publish And Subscribe (Pub/Sub) - Posted Oct 27, 2011
Using RequireJS For Asynchronous Script Loading And JavaScript Dependency Management - Posted Oct 26, 2011
jQuery Can Provide Queue-Based Promise Objects - Posted Oct 24, 2011
The School Of Practical Philosophy: Love - Week Five - Posted Oct 19, 2011
Getting Contact, Photos, And Social Media Information Using FullContact.com And An Email Address - Posted Oct 12, 2011
The School Of Practical Philosophy: Love - Week Four - Posted Oct 12, 2011

View All Blog Entries »

  • Help Wanted - Find Your Next ColdFusion Job
InVision App - Prototyping Made Beautiful With Prototyping Tools Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
Feb 3, 2012 at 10:49 PM
How I Got Node.js Running On A Linux Micro Instance Using Amazon EC2
Wow this was really helpful! Only thing I would add is you need to update your .bash_profile after you edit the secure_path. This is what I did: $ . ~/.bash_profile Otherwise, NPM won't be found. ... read »
Feb 3, 2012 at 10:14 PM
Pushing Base64-Encoded Images Over HTML5 WebSockets With Pusher And ColdFusion
@Ben, Just wanted to let you know that pusher are soon to start limiting sizes on messages. This was the detail that came through in the Feb dispatch: "However, we will soon be limiting the s ... read »
Feb 3, 2012 at 5:05 PM
Regular Expressions Make CSV Parsing In ColdFusion So Much Easier (And Faster)
I tried using your RegEx in my C# program, but it was matching an extra empty-string at the end and so I would end up with an extra field that doesn't exist, so I changed it to this: (^|,)("(?: ... read »
Feb 3, 2012 at 3:47 PM
ColdFusion Supports HTTP Verbs PUT And DELETE (As Well As GET And POST)
Josh Cyr posted this on Twitter just a little bit ago. Thought it was appropriate. http://stackoverflow.com/questions/1619152/how-to-create-rest-urls-without-verbs/1619677#1619677 ... read »
Feb 3, 2012 at 2:28 PM
Changing The Execution Context Of Your Self-Executing Function Blocks In JavaScript
@Michael, You definitely make a good point (and extra points for quoting movies - I love movies). When you use a return() statement to define the object's public API, it does provide a consistent a ... read »
Feb 3, 2012 at 2:04 PM
Changing The Execution Context Of Your Self-Executing Function Blocks In JavaScript
To quote Jurassic Park: "Just because you can doesn't mean you should". I completely, utterly disagree with the thought that this is more readable. Consider the current module pattern: if ... read »
Feb 3, 2012 at 1:10 PM
REST API Design Rulebook By Mark Masse
@Jordan, Yeah, WRML was created by Mark Masse (author of the book). I also found it to be a bit convoluted. I suppose it is intended to allow the Client to be able to programmaticaly respond to cha ... read »
Feb 3, 2012 at 1:08 PM
ColdFusion Supports HTTP Verbs PUT And DELETE (As Well As GET And POST)
@Jason, To be honest, I don't have good answers for that kinds of stuff. And, to the point, that is specifically why I *really* liked the REST API Design Rulebook by Mark Masse - he just cuts throu ... read »