Recent Web Log Entries By Ben Nadel

Showing 1 - 8 of 8   < Prev | Next >

Are HTML FORM Tags Required To Display Form Input Controls?

Posted: October 26, 2012 at 3:45 PM by Ben Nadel

Tags: HTML / CSS, Javascript / DHTML

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

Tags: ColdFusion

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

Tags: ColdFusion, Javascript / DHTML

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

Tags: Javascript / DHTML

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

Tags: Javascript / DHTML

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

Tags: ColdFusion, Javascript / DHTML

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

Tags: ColdFusion, Javascript / DHTML

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

Tags: ColdFusion

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 »

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

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

September 2012 Entries »

View All Blog Entries »

  • Help Wanted - Find Your Next ColdFusion Job
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
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 »
May 22, 2013 at 11:07 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
Could your problem be that "users.id" is actually an ARRAY, not a single value? Perhaps try it again with "users.id[1]" (I only have CF8 here at work). ... read »
May 22, 2013 at 7:52 AM
Nested Views, Routing, And Deep Linking With AngularJS
Hi, Just a quick thank you. As it happens, for my own purposes, the pending ui-router work being done in native angular is likely the one I'll adopt, but your exploration, code and documentation of ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools