Recent Web Log Entries By Ben Nadel
Are HTML FORM Tags Required To Display Form Input Controls?
Posted: October 26, 2012 at 3:45 PM by Ben Nadel
When I got into web development - before AJAX was a thing - I used HTML FORM tags where ever and when ever I needed to display a form input control. This was because all forms actually needed to be submitted back to the server for processing. In the last 10 years or so, I've never really questioned this approach. Even in AJAX (Asynchronous JavaScr... read more »
Comments (15) | Post Comment | Ask Ben | Permalink
HTTP Status Codes For Invalid Data: 400 vs. 422
Posted: October 17, 2012 at 9:05 AM by Ben Nadel
Let's say that someone makes a request to your server with data that is in the correct format, but is simply not "good" data. So for example, imagine that someone posted a String value to an API endpoint that expected a String value; but, the value of the string contained data that was blacklisted (ex. preventing people from using "password" as th... read more »
Comments (43) | Post Comment | Ask Ben | Permalink
Using RESTful Controllers In An AngularJS Resource
Posted: October 17, 2012 at 8:23 AM by Ben Nadel
As I blogged last week, AngularJS provides the $resource class as an abstraction layer between your client-side code and the server-side API . This makes performing CRUD-style operations across the network fairly easy. But what happens when you need to execute a command on a RESTful resource that falls outside the standard CRUD (ie. Create, Read,... read more »
Comments (12) | Post Comment | Ask Ben | Permalink
Applying A Cached Response To An AngularJS Resource
Posted: October 12, 2012 at 4:15 PM by Ben Nadel
Earlier this week, I demonstrated my AngularJS class, DeferredWithUpdate.js, as a way to apply cached responses to an AngularJS deferred value . As a follow up to that, I wanted to quickly demonstrate how to apply a cached response to an AngularJS $resource reference. The AngularJS $reso... read more »
Comments (4) | Post Comment | Ask Ben | Permalink
Resolving An AngularJS Deferred Object Twice With DeferredWithUpdate.js
Posted: October 8, 2012 at 10:36 AM by Ben Nadel
A couple of weeks ago, I blogged about using jQuery's Deferred.notify() to provide a locally-cached response before the server had time to resolve the request. Lately, as I've been playing around with AngularJS, I've wanted to implement the same kind of "update" behavior with the $q class - AngularJS' deferred implementation. Since the $q class ... read more »
Comments (4) | Post Comment | Ask Ben | Permalink
Inlining AngularJS Templates Using ColdFusion
Posted: October 5, 2012 at 4:39 PM by Ben Nadel
In an AngularJS application, you're probably going to make heavy use of templates; or "views" or "partials" or whatever you want to call the snippets of HTML that you bring together in order to construct your user interface. In AngularJS, templates can be loaded using the ngView or ngInclude directives. In either case, the template is defined as a... read more »
Comments (0) | Post Comment | Ask Ben | Permalink
Using JavaScript to Submit UTC Dates To The ColdFusion Server
Posted: October 2, 2012 at 10:25 AM by Ben Nadel
Yesterday, I blogged about changes to the [undocumented] Date::getTime() method in ColdFusion 10 . It seems that in the lasest release of ColdFusion (10), the date/time objects are starting to become more timezone-aware. But, being that my production server is still running ColdFusion 9, this was not so comforting. As a follow-up experiment, I wa... read more »
Comments (2) | Post Comment | Ask Ben | Permalink
Change In ColdFusion Date::getTime() Method In ColdFusion 10
Posted: October 1, 2012 at 10:20 AM by Ben Nadel
In ColdFusion, when you create a true date/time object, it is represented, behind the scenes, as a Java Date object. Now, this is an undocumented feature of ColdFusion, so everything else in this entry should be viewed through this lens. Over the weekend, while working with UTC date/times, I noticed a change in behavior of the date/time objects be... read more »



