Posts in the ‘debugging’ Category

Hacking Safari’s Inspector

Thursday, August 13th, 2009

Recently the long-anticipated Safari 4.0 was released. The earlier WebKit was already fast, but this version performs just insanely well. Reloading a page on your local host takes milliseconds as I showed in my last post. Even more importantly, Safari 4.0 comes with a new inspector which includes all the functionality of Firebug, although it’s still not quite as good as Firebug. It doesn’t have the error handling ability, especially for the in-memory Dojo JavaScript files that are initiated with XHR eval. I still use Firefox primarily for development, but I find myself using Safari more and more often, as I just can’t resist the almost instantaneous refreshing of the page.

(more…)

Styling Dijit Form Elements

Wednesday, February 25th, 2009

Header

Dijit has a tremendous wealth of high quality and feature-rich form elements providing key functionality including validation, time calculation, spinner controls, calendars, and much more. Furthermore, Dijit gives you a set of themes to choose from: Tundra, Soria, Noir, and Nihilo.

(more…)

Debugging Adobe AIR Applications Using The Dojo Toolkit

Tuesday, January 27th, 2009

In a previous post I provided the steps to get you up and running with Adobe AIR. I’ll continue with the debugging features available in AIR and the Dojo Extensions for Adobe AIR (dAIR). The Adobe AIR Introspector is a Firebug-like console that logs messages and has code inspectors. Its logging capability is good, but it’s made even better with code in the dair namespace.

(more…)

Dojo and Firebug Tricks for Development

Monday, November 10th, 2008

As an Ajax developer, I’m always looking for easy ways of helping my development process—things to make development faster, easier ways of checking things, etc. Today I’ll share two quick and easy tricks I use all the time when developing web applications using the Dojo Toolkit.

(more…)

Quick Fixes and Dojo Support

Tuesday, October 21st, 2008

A lot of the stock Dijit components are single-serve, meaning they only solve one style of problem. But Dojo is very flexible, and can work most any way you imagine or intend — you just have to put on your coder hat, and bend away. That’s where I come in. One of the things I do most often in my role as lead support for SitePen’s Dojo Support offering is to find simple solutions and workarounds for problems encountered when the widget code doesn’t behave exactly as you want, or otherwise needs some level of professional bending.

(more…)

HTTP Proxying to Solve Web Development Problems

Wednesday, October 8th, 2008

An HTTP Proxy server relays requests between the HTTP client (e.g. your browser) and the server—whether it be out on the web, intranet or localhost. When it’s under your control, the proxy is a great place to inspect and debug client-server interactions over HTTP, log and report, tune and tamper with the requests the client makes, and the responses the server(s) produce. In this article I’ll show how to use Charles (one such proxy tool) to help solve a range of common web, and especially RIA, development problems.

(more…)

A Quick JavaScript Load Profiler

Tuesday, July 1st, 2008

I was doing some research on script loading speed tests. Each script load required the page to be refreshed, making it difficult to log the time to Firebug and get an average. It was certainly too much trouble to write some PHP scripts and connect to a database; and possibly even worse would be having to pull out a pencil and paper and write the times down. I’m not even sure I have a pencil.

The obvious solution was to write the data to a cookie. I also thought the solution was universal enough to blog about so others could use it too.

(more…)

Firebug Lite and Dojo: Not Just for IE

Monday, June 2nd, 2008

Recently improvements have landed in Dojo Toolkit version of Firebug Lite. These improvements have taken it beyond the desperate need for logging in Internet Explorer to a very viable alternative. In fact, the reasoning behind some of the improvements I have implemented is to develop on Safari, which is so fast you sometimes forget you’re coding an application for a browser.

(more…)

String Performance: an Analysis

Friday, May 9th, 2008

Recently I was writing a “tips and tricks” blog post that was going to focus on the idea that it is better to use an object as a “string buffer”; the idea was that by passing this object around to various functions and pushing string fragments into it, you can get better performance from a JavaScript engine. My friend and colleague Alex Russell challenged me to show him hard data supporting this hypothesis—and the results were quite eye-opening!

String performance by browser

(more…)

Unit Testing Custom Code with the Dojo Objective Harness

Tuesday, April 15th, 2008

Many Dojo developers are aware of the Dojo Objective Harness (DOH) that the Dojo Toolkit uses for unit testing. Many people, however, want to use DOH for testing their own code or even non-Dojo code that they have written. While DOH has always supported this, there currently aren’t many examples of doing so. Let’s see if we can help that out.

Out of the box, DOH has supported custom code since the beginning. Tests can include any custom namespaces or code by easily using standard JS techniques. Coming to an understanding of how custom namespaces work with Dojo and how and when DOH loads tests will help us illustrate how you can take advantage of DOH in your own code.

(more…)