Recent Web Log Entries By Ben Nadel

Showing 1 - 12 of 12   < Prev | Next >

Creating A Lazy Loading Utility Module For RequireJS

Posted: July 25, 2012 at 1:31 PM by Ben Nadel

Tags: Javascript / DHTML

Yesterday, I started to look at delaying the loading of RequireJS modules until they were first requested . While I liked this approach for modules that may rarely (or never) be used within an application, I wasn't happy with what the code looked like; the lazy-loading functionality, initialization functionality, and the invocation functionality ... read more »

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



Lazy Loading RequireJS Modules When They Are First Requested

Posted: July 24, 2012 at 10:48 AM by Ben Nadel

Tags: Javascript / DHTML

I've been loving RequireJS as a framework that helps me think about my JavaScript applications in a more modular fashion. However, in my research and development, I've always been loading all of my RequireJS modules upfront, at the start of the application. As I've begun to move some RequireJS functionality into production, I've found myself not w... read more »

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


Setting ETag Headers Regardless Of File Content In ColdFusion

Posted: July 23, 2012 at 10:31 AM by Ben Nadel

Tags: ColdFusion

Last week, at InVision , while trying to improve the overall experience of one of our application pages, I started looking into ETag header values to decrease page load times. The first post that I came across (or rather, that I came across "again") was this one by David Boyer . In it, David outlines what ETag headers do and how to apply them in... read more »

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



Handling Forbidden RESTful Requests: 401 vs. 403 vs. 404

Posted: July 19, 2012 at 9:34 AM by Ben Nadel

Tags: ColdFusion

I don't have a tremendous amount of experience building RESTful APIs; so, it's not always clear which HTTP status code in the 4xx block I should use when refusing to fulfill an incoming resource request. One tricky scenario that I've had to code against recently is the request for a properly formed, valid resource of which the authenticating user ... read more »

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


Getting The MetaData For A File Upload In ColdFusion

Posted: July 18, 2012 at 9:58 AM by Ben Nadel

Tags: ColdFusion

Yesterday, I discovered that you could call CFFile-Upload twice on the same file in a single ColdFusion request . This turns out to be an awesome feature for implementing secure upload validation. This morning, I wanted to take that idea and simply factor it out into its own user defined function (UDF) - getFileUploadMetaData(). This UDF would ta... read more »

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


Calling CFFile-Upload Twice On The Same File For Security Purposes

Posted: July 17, 2012 at 10:29 AM by Ben Nadel

Tags: ColdFusion

One of the things that I have always loved about ColdFusion's CFFile upload processing is the seamless way in which ColdFusion handles name conflicts. Simply set the "nameconflict" attribute to "makeunique" and you don't have to worry about anything else. Except maybe security. Luckily, I just discovered that ColdFusion allows us to call the CFFil... read more »

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


Relative File Paths Work In A ColdFusion File System

Posted: July 16, 2012 at 9:37 AM by Ben Nadel

Tags: ColdFusion

For years, I've been using regular expressions as a means to traverse file paths in my ColdFusion applications . By chopping-off the last directory "pattern" in a file path, I was able to move up into the parent directory: <!--- Get the current directory. ---> <cfset currentDirectory = getDirectoryFromPath( getCurrentTemplatePath() )... read more »

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


Quiet: The Power Of Introverts In A World That Can't Stop Talking By Susan Cain

Posted: July 13, 2012 at 10:21 AM by Ben Nadel

Tags: Books, Life, Relationships

A few weeks ago, I watched a TED Talk by Susan Cain, titled "The Power of Introverts." Having found the TED talk very interesting, I decided to checkout the book upon which the talk was based. Cain's book, " Quiet: The Power Of Introverts In A World That Can't Stop Talking ," was super fascinating! And, in some ways, it really opened my eyes up to... read more »

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


How Do You Populate Shared Views In A Complex Layout Using MVC?

Posted: July 12, 2012 at 10:24 AM by Ben Nadel

Tags: ColdFusion

I've been thinking about this problem for the past few days and have gotten no-where! Even after extensive Googling, I've not found anything that begins to really answer my question satisfactorily. When it comes to an application Layout, where in the Controller do you populate the data for shared Views within a Model-View-Controller (MVC) paradigm... read more »

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


Writing My First Unit Tests With MXUnit And ColdFusion

Posted: July 10, 2012 at 9:31 AM by Ben Nadel

Tags: ColdFusion

Last week, I wrote my first ever unit tests [of any kind] with Jasmine and RequireJS . It was pretty exciting! And, now that I've played around a bit on the client-side, I thought it was time to do some experimentation on the server-side. This morning, I ran my first server-side unit tests with MXUnit and ColdFusion. The setup for MXUnit was a... read more »

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


Writing My First Unit Tests With Jasmine And RequireJS

Posted: July 6, 2012 at 3:47 PM by Ben Nadel

Tags: Javascript / DHTML

Before this morning, I had never written a Unit Test in my life. Ok, that's not 100% true - I once wrote a unit test as part of a pair-programming experiment, a few years ago, with Peter Bell . But, on my own, not once. Then, yesterday, in my blog comments, Sean Corfield finally pushed me past the tipping point. And, this morning, I downloaded ... read more »

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


Domain Models Expose Behavior, Not State

Posted: July 3, 2012 at 10:14 AM by Ben Nadel

Tags: Javascript / DHTML

A couple of weeks ago, I read an "anti-patterns" ORM (Object-Relational Mapping) blog post by Mehdi Khalili . In the post, Khalili said something that I found very interesting (paraphrased): The Domain Model should never be in an Invalid state because it doesn't expose state - it only exposes behaviors. As part of my journey towards an understa... read more »

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

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

June 2012 Entries »

View All Blog Entries »

  • Help Wanted - Find Your Next ColdFusion Job
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
Jun 18, 2013 at 9:20 PM
Mapping AngularJS Routes Onto URL Parameters And Client-Side Events
I couldn't find examples of passing multiple arguments using the when() routing statement so figured out through trial and error that you can pass multiple arguments using the following format: .whe ... read »
Jun 18, 2013 at 3:39 PM
Experimenting With The Amazon Simple Storage Service (S3) API Using ColdFusion
Hi Ben, THANKS! While not bleeding edge, it is new to me & I like learning new things every day! ... read »
Jun 18, 2013 at 12:30 PM
Disabling Auto-Correct And Auto-Capitalize Features On iPhone Inputs
Also spellcheck="false" should be mentioned as part of html5 specs ... read »
Jun 18, 2013 at 8:40 AM
Using Named Functions Within Self-Executing Function Blocks In Javascript
Hi Ben, you forgot to mention the most important thing for named self-executing functions - they can be referenced by name ONLY inside their execution context (which is parens in this case), it mean ... read »
dee
Jun 18, 2013 at 7:01 AM
My Safari Browser SQLite Database Hello World Example
hai ben, this program is really good i could understand the concept but i dint know how to save it and how to open it as you have done in the video can u give that details pls ... read »
Jun 18, 2013 at 6:04 AM
Clearing Inline CSS Properties With jQuery
Thanks a lot for for post! It helped me a lot... after being stuck since 24 hrs.. found solution from your post. Thanks again! ... read »
Jun 18, 2013 at 2:31 AM
SOTR 2013 - The Best Conference I Never Went To
I keep watching it, should keep me happily distracted until SotR14 ;) ... read »
Jun 17, 2013 at 9:45 PM
What If All User Interface (UI) Data Came In Reports?
@Jonah, As I was reading what you wrote, it occurred to me that maybe I do something similar to that in some of my client-side code. In an application I'm working on, there are a bunch of unrelated ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools