Skip to content

Category Archives: Javascript

JavaScript Null Checks and Type Coercion

There are many discussions of JavaScripts type coercion at work, and many examples of the distinction between undefined and null. This becomes very important when performing checks for null and undefined. Here’s an easy summary: JavaScript distinguishes between null, which is an object of type ‘object’ that indicates a deliberate non-value, and undefined, which is an object [...]

Integrating JavaScript Tests with Continuous Integration

At my current client I’ve been building a rather complex rich client app using ExtJs. The team has written a lot of JavaScript code, and has been writing a lot of JavaScript unit tests as well. We’ve gone through several unit testing tools along the way trying to solve some logistical problems. We started with [...]

Unit Testing JavaScript with HtmlUnit and Screw.Unit

Writing apps with today's rich client libraries such as Extjs , YUI , and JQuery really shows how much potential is still left in web development. But it takes a lot of code, and the amount of technical debt can get heavy, quickly. Good tests can help reduce this technical debt, and there are a lot of testing [...]

JavaScript Unit Testing

TechTalk: Testing Rich Client Web Applications by Jeff Hemminger from Object Partners on Vimeo.

Headless Javascript Unit Testing

I gave a presentation at work a couple of months ago covering JavaScript scoping considerations for a team of Java developers new to JavaScript. During the presentation, I used Rhino to run the examples. I have seen other projects that use Rhino for unit testing, but they seemed a little heavy weight for what I [...]

Running JSLint From Within Eclipse Using Rhino

Mikko Ohtamaa provides a nice explanation of how to execute JSLint on a javascript file from within eclipse, using Rhino.

Dirt Simple EXTJS Grid on Grails

At my current contract, I’ve been using the popular EXTJS javascript library. In order to get up to speed faster, I’ve started a small project to assist my learning. I thought about using a number of back ends to support my project, but decided on Grails after reading about the built-in JSON converters. Getting started [...]

Generic search for auto complete using Hibernate, Ajax, Scriptaculous – Part 1

Ever wondered how to write a custom search function with pattern matching, generic enough to for an auto completer using Hibernate? In this part I will explain the back end portion of writing an auto completer, for the next part you will see an Ajax front end using DWR and scriptaculous. Use Case Scenario – [...]