Recent Web Log Entries By Ben Nadel

Showing 1 - 15 of 429   < Prev | Next >

Cross-Origin Resource Sharing (CORS) AJAX Requests Between jQuery And Node.js

Posted: February 10, 2012 at 11:10 AM by Ben Nadel

Tags: Javascript / DHTML

After reading the REST API Design Rulebook by Mark Masse , I'm all jazzed up about API design! This recent enthusiasm has afforded me the motivation to attack a number of new topics all at the same time. If I'm going to be experimenting with API design, why not try it on an Amazon EC2 (Elastic Compute Cloud) Micro instance ? And if it's on EC2, ... read more »

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



jQuery.whenSync() Plugin For Chaining Asynchronous Callbacks Using Deferred Objects

Posted: February 6, 2012 at 10:26 AM by Ben Nadel

Tags: Javascript / DHTML

Last week, I started to talk about chaining asynchronous Validation rules using jQuery Deferred objects . After writing up that post, I thought I might be able to factor-out the core idea into its own jQuery plugin - jQuery.whenSync(). Like the native jQuery.when() method, the jQuery.whenSync() method takes a variable-number of arguments; however... read more »

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


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 (6)  |  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 (5)  |  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


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

Showing 1 - 15 of 429   Pages: 1 2 3 4 5 6 7 8 9 10 » < Prev | Next >

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 10, 2012 at 7:21 PM
jQuery AJAX Strips Script Tags And Inserts Them After Parent-Most Elements
Update! Instead of $(eval(options.insertAfter)).after(data['insertData']); I now use: var ajaxNode = document.createElement('span'); var parent = $(eval(options.insertAfter))[0].parentNode; ... read »
Feb 10, 2012 at 6:18 PM
jQuery AJAX Strips Script Tags And Inserts Them After Parent-Most Elements
encountered this same, what I consider, jQuery bug last week. I'm building a site in which I load some content via AJAX. This content contains Linkedin share button placeholders which Linkedin API ne ... read »
Feb 10, 2012 at 11:30 AM
Cross-Origin Resource Sharing (CORS) AJAX Requests Between jQuery And Node.js
After you understand the concepts here, this is an awesome cheatsheet for enabling CORS in just about anything http://enable-cors.org/ ... read »
JM
Feb 10, 2012 at 9:10 AM
My Safari Browser SQLite Database Hello World Example
@Amy, Here is a very good tutorial on how to use JOIN: http://www.sqltutorial.org/sqljoin-innerjoin.aspx ... read »
Feb 10, 2012 at 4:42 AM
Building A Twitter-Inspired RESTful API Architecture In ColdFusion
This is great, very useful Ben. I spotted a small typo in the api.cgm listing: <cfthrow type="Unauthroized" /> Cheers Stefan ... read »
Feb 9, 2012 at 10:35 PM
CFDirectory Filtering Uses Pipe Character For Multiple Filters (Thanks Steve Withington)
I was wondering if there would be a filter you could apply so that you got everything but what you included in the filter. As in show me all docs that are not a .pdf. ... read »
Feb 9, 2012 at 10:29 PM
Learning ColdFusion 9: Application-Specific Data Sources
@Ben, No offence, but if people were really wanting advanced features they would be using a platform like ASP.NET MVC. CFML is so structurally compromised as a tag-based scripting language that ... read »
Feb 9, 2012 at 10:03 PM
Subversion - Cleanup Failed To Process The Following Paths
@Leviaguirre, do you still have problems with this? ... read »