Recent Web Log Entries By Ben Nadel

Showing 1 - 10 of 10   < Prev | Next >

Using jQuery Deferred.notify() To Provide Locally Cached Data

Posted: September 27, 2012 at 9:57 AM by Ben Nadel

Tags: Javascript / DHTML

Most of the data in your application hasn't changed. Sure, things are being updated all the time; but, the large majority of the data remains the same from moment to moment. As such, it might make sense to show the user outdated, locally cached data before taking the time to go to the server for the true data. But how can we do this in a way that ... read more »

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



Detecting Spam In User-Submitted Content With SpamAnalyzer.cfc

Posted: September 25, 2012 at 9:34 AM by Ben Nadel

Tags: ColdFusion

Fighting SPAM is a never-ending battle. My blog uses a "blacklist" approach that checks user-submitted content against a set of regular expression patterns. For the last 6 years, this has been implemented as a compound CFIF statement containing REFindNoCase() function calls. To-date, this single CFIF statements has close to 2,000 OR operators. Lat... read more »

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


Decorating Scope Methods In The AngularJS Prototype Chain

Posted: September 24, 2012 at 9:57 AM by Ben Nadel

Tags: Javascript / DHTML

Last week, I looked at how to pass values up the $scope chain in an AngularJS application . We used a setter method in order to get around the asymmetric nature of prototype property access and mutation. This allowed us to set values into an inherited $scope instance. Now, since we needed to use a setter method; and since that setter method is in... read more »

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



Setting Prototype Properties Using Inherited Scope Methods In AngularJS

Posted: September 20, 2012 at 10:15 AM by Ben Nadel

Tags: Javascript / DHTML

In AngularJS, every Controller gets its own $scope instance. This $scope instance binds the model - defined by the Controller - to the View - which renders the model using HTML annotations. Every instance of $scope has, as its prototype, the $scope of its parent context in the DOM (Document Object Model) tree. This is true all the way up the HTML ... read more »

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


Exposing A Mouse Service For Click Events In AngularJS

Posted: September 18, 2012 at 10:01 AM by Ben Nadel

Tags: Javascript / DHTML

Yesterday, I looked at creating an AngularJS directive in order to capture the click-event on the Document node . This required the underlying jQuery event object to be passed into the $scope of the given directive. While this worked, exposing the event object could be seen as letting the DOM (Document Object Model) leak into the Controller, wher... read more »

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


Capturing Document-Click Events With AngularJS

Posted: September 17, 2012 at 11:17 AM by Ben Nadel

Tags: Javascript / DHTML

As I have been trying to learn AngularJS, one of the biggest stumbling blocks [for me] is the extreme separation of the Controller layer from DOM (Document Object Model) manipulation. In an AngularJS application, none of the Controllers are supposed to touch the document in anyway; all mutation should be done through the two-way data binding. If y... read more »

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


Creating AngularJS Controllers With Instance Methods

Posted: September 13, 2012 at 10:45 AM by Ben Nadel

Tags: Javascript / DHTML

In AngularJS, just as in any MVC (Model-View-Controller) framework, Controllers respond to events, gather data, and make that data available to the View. In most of the AngularJS demos that I have seen, Controllers are defined as free-standing, globally-scoped functions. In my opinion, this approach is problematic for two reasons. First, it pollut... read more »

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


Mapping AngularJS Routes Onto URL Parameters And Client-Side Events

Posted: September 12, 2012 at 9:11 AM by Ben Nadel

Tags: Javascript / DHTML

Earlier this week, I talked about mapping RESTful resource URIs onto URL parameters and server-side events . When developing a thick-client application, much of the same URL routing functionality is required on the client. Only, with the ever-growing complexity of rich user interfaces, routing and partial page rendering on the client becomes much... read more »

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


Mapping RESTful Resource URIs Onto URL Parameters And Server-Side Events

Posted: September 10, 2012 at 10:18 AM by Ben Nadel

Tags: ColdFusion

When I think about implementing a RESTful API , my philosophical understanding is very simple: RESTful URLs need to be mapped onto a collection of URL parameters and an event type that is processed by my ColdFusion application. This means that, at its most superficial level, a RESTful API is nothing more than a set of URLs that lay on top of an e... read more »

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


Win A Free Copy Of The Regular Expression Cookbook 2nd Edition

Posted: September 5, 2012 at 9:09 AM by Ben Nadel

Tags: Books, ColdFusion, Javascript / DHTML

A few years ago, I was thrilled to find out that Steven Levithan had co-authored a book on Regular Expressions . After witnessing his Flagrant Badassery on the topic, I had no doubt that the cookbook would be a must-have reference. In the years since its release, I've given away copies on International Regular Expression Day, handed them out at... read more »

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

Showing 1 - 10 of 10   Pages: 1 < Prev | Next >

August 2012 Entries »

View All Blog Entries »

  • Help Wanted - Find Your Next ColdFusion Job
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
May 20, 2013 at 11:45 AM
Using jQuery's Animate() Step Callback Function To Create Custom Animations
This is really useful. I found out that you don't actually have to use a dummy css property (surprisingly). To animate a property in a linear-gradient for instance I did this this.css('someLinearGra ... read »
May 20, 2013 at 10:51 AM
Using A Dynamic Column Name With ValueList() In ColdFusion
@Josh, Oh snap! You're totally right! I'm not sure I've ever tried that. I did know that you can call a number of other array-methods on ColdFusion query columns: http://www.bennadel.com/blog/167 ... read »
May 20, 2013 at 10:45 AM
Using A Dynamic Column Name With ValueList() In ColdFusion
@Ben - I believe you can achieve the same functionality with ColdFusion's built in ArrayToList() function. ArrayToList( users[ "id" ] ); ... read »
May 20, 2013 at 10:21 AM
My Experience With AngularJS - The Super-heroic JavaScript MVW Framework
Is there any error logging and handling framework in angularjs, if not then in what way I can do this. ... read »
May 19, 2013 at 2:31 PM
My Experience With AngularJS - The Super-heroic JavaScript MVW Framework
It's funny really just how well that image describes the way I would imagine most people that go with angular for some project is. I have had a similar roller-coaster ride with it as well, but not qu ... read »
May 17, 2013 at 7:42 PM
HashKeyCopier - An AngularJS Utility Class For Merging Cached And Live Data
Ben - thanks so much for posting these Angular articles and findings, they've been a huge help towards learning one of the more 'complex' JavaScript frameworks out there (IMO). I have been using Angu ... read »
May 16, 2013 at 5:01 PM
UPDATE: Parsing CSV Data Files In ColdFusion With csvToArray()
Your code was the closest thing I've found to obtaining some direction for converting ISO fields to values that CF can translate properly. Thank you for posting! ... read »
May 15, 2013 at 6:07 PM
Making SOAP Web Service Requests With ColdFusion And CFHTTP
Ben, you once again saved my bacon at work. Thank you, thank you, thank you! ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools