Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
I am the chief technical officer at InVision App, Inc - a prototyping and collaboration platform for designers, built by designers. I also rock out in JavaScript and ColdFusion 24x7.
Meanwhile on Twitter
Loading latest tweet...
Ben Nadel at Scotch On The Rock (SOTR) 2010 (London) with: Mark Drew

William Broadhead

Member since Dec 18, 2008

Recent Blog Comments By William Broadhead

  • Changes In CFLocation / OnRequestEnd Behavior In ColdFusion 9's Application.cfc

    Posted on Oct 10, 2012 at 3:24 PM

    Yes, I was aware of this change from 8 to 9. Personally, it seems more 'logical' that onRequestEnd fires after the primary event is 'aborted'. Similar to the cfexit/exit context options, it would be nice to have an option to make it abort 'all' events of the request. Additionally, I found the onRe... read more »

  • Application.cfc Scoped Functions Are Stored In Page VARIABLES Scope

    Posted on Jul 27, 2009 at 12:00 AM

    @Phil, which event is creating/instantiating your object? are you recreating the cfc in onRequest so it runs on every call? this would probably work... but you are reinstantiating the cfc every request. if you put it in some of the other events it isn't as obvious; i've found referencing a functio... read more »

  • Quick Thought On OOP Data Validation And Why Redundancy Is OK

    Posted on May 27, 2009 at 2:21 PM

    hum... this is sort of back to the original post idea of redundant validation, but also shows how we have tackled error/sucess/warning feedback. i definitely think each object should be a blackbox (imho) and not rely on anything outside to function. we have grappled with how to do that consistently ... read more »

  • Application.cfc Scoped Functions Are Stored In Page VARIABLES Scope

    Posted on May 27, 2009 at 12:04 PM

    yes, i was using argumentCollection to overload onRequestStart() with no defined arguments and handling them myself, but as soon as I used a named <cfargument>'s CF would always force the target page into my first argument. I did not expect this. But it elucidates why onRequest() is a problem ... read more »

  • Application.cfc Scoped Functions Are Stored In Page VARIABLES Scope

    Posted on Apr 6, 2009 at 7:03 PM

    Here is an oddity (to me) i couldn't see much/anything written about. Not really explained in cf docs, the arg is referenced, but not the behaviour. Maybe others have discovered this too. So after eschewing onRequest(), but continuing to use onRequestStart() for all things AOP (security mainly), i... read more »

  • Application.cfc Scoped Functions Are Stored In Page VARIABLES Scope

    Posted on Apr 3, 2009 at 7:10 PM

    hum... i may be back to where i started in a way on my original reason i read through this thread (not onRequest related). i am trying to call application.cfc methods directly from another cfc that is invoked by the application cfc methods. in short, on app initialization (onApplicationStart), i... read more »

  • You Cannot Delete Application.cfc Methods In The Pseudo Constructor

    Posted on Apr 3, 2009 at 6:43 PM

    very interesting. one thing i noticed is that we are calling the variables 'private' but i think it would be called 'protected' as pseudo-contructed variables.values are shared across the entire component/cfc, not a specific method. at least this is true when they are created inside the cfc but outs... read more »

  • Application.cfc Scoped Functions Are Stored In Page VARIABLES Scope

    Posted on Mar 17, 2009 at 1:30 PM

    Ah, that makes more sense. And makes me feel better. I must have sadly missed this distinction on this and Ray's blog. This thread was tackling both (for different reasons). I just read the Adobe docs on the onRequest() and it does explicitly state it is an interrupter for the page content and the ... read more »

  • Application.cfc Scoped Functions Are Stored In Page VARIABLES Scope

    Posted on Mar 16, 2009 at 4:10 PM

    And thanks, Ben, for discovering the way to call app cfc functions outside of itself! I was having a hard time guessing where they ended up and I couldn't get the app cfc to instantiate like other cfc's which was very strange indeed! That is what I was actually looking for!... read more »

  • Application.cfc Scoped Functions Are Stored In Page VARIABLES Scope

    Posted on Mar 16, 2009 at 4:06 PM

    I have been converting my CMS arch to use app cfc from cfm the last little while and all this talk about onRequestStart/ajax interference freaked me out. I have discovered, and if you think about it, it is logical, onRequestStart has NO inherent interference with AJAX calls. The problem is with this... read more »

  • Ask Ben: Removing Duplicate List Items While Maintaining Original List Order

    Posted on Jan 15, 2009 at 7:52 PM

    this is very similar to chris' example, but here it is anyway, and keeps order as well. sz_List = '1,2,3,2,2,3,2,2,345,4324,23'; sz_ListNew = ''; for (i=1; i<= listLen(sz_List ); i++){ if(listFindNoCase(sz_listNew, listGetAt(sz_List , i)) == 0 ) sz_listNew = listAppend(sz_listNew, listG... read more »

  • ColdFusion ARGUMENTS Keys Always Exist, Even When Not Required

    Posted on Jan 14, 2009 at 8:18 PM

    @Jason, I just experienced the 'null' of which you speak today. Effectively, a previously set key (x.x = ''; which is our coldfusion pseudo non-value init, wouldn't it be neat if we could just do this var x.x; ) then is set to x.x = application.myObjects.someFunction(argumentCollection: args); and ... read more »

  • MySQL Cannot Convert Value '0000-00-00 00:00:00' From Column XX To TIMESTAMP

    Posted on Dec 22, 2008 at 12:05 PM

    I was making sure our settings were on for dates getting errors. I finally noticed at the bottom of that mode page I see that setting the db to 'Traditional', which we have been doing here in the ini/cfn (live is on ubunto, dev/units are windows) files since 5.0x-ish automatically sets the other val... read more »

  • MySQL Cannot Convert Value '0000-00-00 00:00:00' From Column XX To TIMESTAMP

    Posted on Dec 22, 2008 at 11:40 AM

    @Azadi : Thanks! The two commands relevant NO_ZERO_DATE NO_ZERO_IN_DATE since 5.02 Plus needs to be in strict mode. Gonna go change that right now. @Ben : We find this 'corruption' is most likely to occur during database transfers/updates/restores that fail partially. Occasionally, a particular tabl... read more »

  • MySQL Cannot Convert Value '0000-00-00 00:00:00' From Column XX To TIMESTAMP

    Posted on Dec 19, 2008 at 7:31 PM

    That is a handy bit. We used to frequently get this when I started here 3.5 years ago and coding/db standards were a bit lax. I was used to MSSQL where zero and partial dates are not allowed along with strict coding standards. MySQL has the *feature* of storing partial/zero dates, which may seem l... read more »

  • ColdFusion ARGUMENTS Keys Always Exist, Even When Not Required

    Posted on Dec 18, 2008 at 7:18 PM

    I was thinking about this a bit more. I just picked up the tone that the fact the keys come in when there is no value may be incorrect. I would tend to the side that this *is* correct functionality. They are defined (the keys) by the fact you have pseudo-param'ed them by stating the argument; the... read more »

  • ColdFusion ARGUMENTS Keys Always Exist, Even When Not Required

    Posted on Dec 18, 2008 at 4:35 PM

    Here is how I would get around the predefined/null issue. You can still do a dyanmic key based loop but I had to resort evaluation() which I don't like (maybe there is a another way with it?) but I would simply design around the issue. <cffunction name="SumArguments" access="public" returnty... read more »

  • ColdFusion ARGUMENTS Keys Always Exist, Even When Not Required

    Posted on Dec 18, 2008 at 4:14 PM

    @Ben, Yes, that is correct. structKeyExists() and isDefined() essentially do the SAME thing as long as you scope your variable in isDefined. They both check the value. Your issue is more how to dynamically loop across argument keys/values when some of them are effectively null (how to determine an... read more »

  • ColdFusion ARGUMENTS Keys Always Exist, Even When Not Required

    Posted on Dec 18, 2008 at 2:57 PM

    That is very interesting. Yes, an undefined VALUE, but key, if set in args, always exists. Our code house has slowly drifted to overloaded args for optionals (when not needed merely for self-documentation purposes/default values) as well as traditionally using isDefined('scope.value') instead of st... read more »