Wild Friday Night with Javascript Controllers

Javascript code All because of Ben Nadel, I'm writing Javascript examples instead of playing Fallout 3 tonight... Ok, so in my post evolution of a js controller scheme, Ben commented that he wasn't comfortable with the idea that the this value inside my controller was the window object, rather than the controller itself. So, I've set out to see if I can rework the controller to use "new" and grow up to be a real object. Read more to see how I do.

 

UX Rules: Four Rules for Form Controls

A reset buttonTime again for another user experience rule, and this time I couldn't stop at just one. I've got four rules for you about forms; one of the most daunting aspects of UX design. You can save yourself some trouble with the following rules:

Rule 2: Ditch the Reset button.

Rule 3: Make your Cancel button look like a link, or make it visually washed out compared to your Submit button.

Rule 4: Make sure that there is at least a 2em distance between your Submit and your Cancel buttons.

Rule 5: Submit on the left, Cancel on the right.

Read more to see my reasonings and an example.

 

ColdFusion and IIS Failing to Find Files

A stink bug I ran into an interesting issue with a site that my company hosts this week, and I thought I'd share the problem description and solution. A number of files and images started to fail to return, saying that either they could not be found or that the user was not allowed to view the file. Those ColdFusion pages that did return would say that they couldn't find the specified files either.

 

Evolution of a JS Controller Scheme

It took me quite a while to discover the power and flexibility of a controller scheme for Javascript, but thanks to some awesome videos and tutorials, I've come up with a setup that works quite well, and I thought I'd share it with you. I'm going to start with a basic object, and evolve it into what I use, so you can understand why each thing is done, and what happens at each stage.

 

Example of using Template in Prototype

In response to a blog post by Ray Camden about jQuery and duplicating form fields, I put together an example of using the Template class in Prototype. As an added bonus, I designed this example to also handle form resets and to feature a controller based design. You can click here to view a demo of the example in action. Read more to get the break down of the code.

 

UX Rule: Notification of Completion

Notification bars

So, as I move into exploring the realm of user experience(UX), I'm going to work on building a collection of rules for creating good user experiences. These rules are fast, but they aren't hard: every situation is different, and although these rules will be starting points, some negotiation may be required.

Rule One: All processing must display a notification to the user.

Read more to see my thoughts on when and how to do this.

 

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.