Vote for Me!

CFUnited held an open call for speakers this year, and I submitted some topics. If you'd like to hear me talk about application design or Javascript, please cast a vote for my topics.

The Septernary Rules of Super Awesome Applications

Loosely based on the Seven Habits of Highly Effective People, this presentation explores the process of design, and offers tips as to how to create effective programs. The talk will focus most on how these rules create better use experience, and how keeping focused on that end can save time and increase the profitability of sites and applications.

Javascript for ColdFusion Developers

A crash course on Javascript, what it offers basics, best practices, and focus on CF's integrations of JS and the Javascript libraries and resources that come with ColdFusion: Spry, YUI, ExtJS, and FCKEditor.

 

BlogCFC Tweaks: View Entries By Category

With BlogCFC, there isn't an easy way to browse your entries by category. The closest you can get is to go to Entries put the category into the search. This actually wasn't too hard, once I figured out some of the more cryptic bits of some of the custom tags in BlogCFC.

 

Why You Must Learn to Love <label>

Once you start thinking about usability of internet forms, it starts to really stick in your head. You catch yourself filling out a form and going, "Man, they could probably get more people to fill this out if they just put a line break here, or used a different font color." Even I, a web developer, tend to shy away from forms that aren't easy to use, or ask for things I don't feel like telling them. Maybe thats why I have come to point that I actually get kind of angry when I see people skip out on using the simplest possible usability increaser: the <label> tag.

 

Utility Function: StructExtract()

Working with ArgumentCollections reminded me that I sometimes wish that I had an easy way to pull out just a few values from a structure into a new structure. So I wrote one:


<cffunction name="StructExtract" output="false" returntype="struct">
    <cfargument name="struct" type="struct" required="true"/>
    <cfargument name="keyList" type="string" required="true"/>

    <cfset var returnStruct = StructNew() />

    <cfloop list="#UCase(arguments.keyList)#" index="key">
        <cfset returnStruct[key] = arguments.struct[key] />
    </cfloop>

    <cfreturn returnStruct />
</cffunction>

Example


<cfset struct1 = {
Naomi = "Sweet",
Kit = "Tough",
Christina = "Cocky"
} /
>


<cfdump var="#struct1#" labe="struct1"/>

<cfset struct2 = StructExtract(struct1, "naomi,kit") />

<cfdump var="#struct2#" labe="struct2"/>

 

Re: Overriding ColdFusion's ArgumentCollection

Ben Nadel found an interesting problem with ArgumentCollection, and I've done some additional tests that I find interesting. I was able to achieve the value fluctuation that Ben saw with only a single method based override on ColdFusion 8.0.1:


<!--- Trimmed down version of Ben's test function --->
<cffunction name="OutputArguments" output="true">
    <!--- Output arguments. --->
    <cfdump var="#ARGUMENTS#" label="From OutputArguments()"/>
</cffunction>


<!--- Define the argument collection. --->
<cfset objArgs = {
    Naomi = "Sweet",
    Kit = "Tough",
    Christina = "Cocky"
} /
>


<!---
    Invoke the test method using both the argument
    collection and an overriding value.
--->

<cfset OutputArguments(
    ArgumentCollection = objArgs,
    Naomi = "Wicked hot"
) /
>

Multiple refreshes saw the Naomi listed as "Sweet" more often then not. Ben had stated in his post that he saw fluctuations in value when using only a single CFINVOKE, but stable results with the method version. I'm sing the opposite; values seem constant when using CFINVOKE.


<!--- Trimmed down version of Ben's test function --->
<cffunction name="OutputArguments" output="true">
    <!--- Output arguments. --->
    <cfdump var="#ARGUMENTS#" label="From OutputArguments()"/>
</cffunction>


<!--- Define the argument collection. --->
<cfset objArgs = {
    Naomi = "Sweet",
    Kit = "Tough",
    Christina = "Cocky"
} /
>


<!---
    Invoke the test method using both the argument
    collection and an overriding value.
--->

<cfinvoke
    method="OutputArguments"
    argumentcollection="#objArgs#">


    <!--- Override argument. --->
    <cfinvokeargument name="Naomi" value="Very Cute" />
</cfinvoke>

Added examples on my site:

 

The Quiet Death of the Major Re-Launch

I just saw this cool article on the User Interface Engineering website, called The Quiet Death of the Major Re-Launch. This article calls out the "big relaunch" as being a potential pain point with users, and I have to agree whole heartedly. It doesn't really mention it in the article, but I think incremental role out of new features can also help to make realistic expectations for the results of updates. Its hard to get over hyped about updates to a single navigation menu. It also doesn't say that this is the perfect way to find out what changes are increasing your conversion rate; implementing one change at a time over a period of weeks lets you know which change is having an impact, and how.

 

More Entries

Jon Hartmann, July 2011

I'm Jon Hartmann and I'm a Javascript fanatic, UX/UI evangelist and former ColdFusion master. I blog about mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web.

Learn more about me on LinkedIn.