Creating and Enhancing Dojo Classes

Creating and Enhancing Dojo Classes

Like all top-notch JavaScript toolkits, Dojo tries to make its classes as flexible as possible, knowing that users of the toolkit may have different ideas about how a given class or class method should work. Luckily, Dojo provides you a number of methods by which you can subclass or modify existing classes. Let’s examine a few ways you can make Dojo classes exactly the way you like.

Continue reading

Hacking Safari’s Inspector

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.

Continue reading

Stocker: Advanced Dojo Made Easy

SitePen is excited to announce Stocker, which demonstrates some of the more advanced capabilities of Dojo, including the newly released DataChart, the DataGrid, Data Store, Comet, Persevere, and BorderContainer. SitePen is also offering a one-day workshop where you will learn how to create Stocker yourself, but I’m here to give you a sneak peak of what Stocker is and how it works.

Stocker uses these technologies to emulate a stock monitoring application. We’re using made up data, but that’s actually more interesting. The Persevere server generates new stock items at certain intervals, and then pushes them to the browser with Comet. Then the Data Store updates its items and triggers an onSet notification. The DataGrid and DataChart are both connected to the same store, and are listening to that event. They then update their displays and show the stock items and their latest data.

Stocker

Continue reading

Queued and AIR Issues, Part I

During the course of developing Queued, we ran across a number of challenges developing with AIR that we needed to solve. Some were very difficult to get around, while others were the result of our team needing to think outside the web-based paradigm. In this post, I’ll talk about four issues we ran across that ended up shaping part of the Queued codebase.

Continue reading

Queued: API Challenges

SitePen’s new Queued application works very well with the Netflix API, but the smoothness of this functionality was the result of a lot of research, and trial and error. In fact, this experience led me to propose that future project timelines should budget extra time when working with an unfamiliar API—and even more time when that API is brand new and untested. Netflix released one of the more exciting APIs in recent months and SitePen began to work with it right away. The Netflix team did great work on their API and they were also very helpful with us when we had questions or there was a bug on their end. I can imagine the challenges of setting up a (Netflix) REST API with an existing system and a large and complex library of items was not simple. Integration with the Netflix API presented its own set of challenges to us.

Continue reading

Dojo Search with Yahoo BOSS

Header

The new Dojo Search is now live. I worked on creating this with the goal of showing how much information there is out there about the Dojo Toolkit and supplying a way to aggregate that information in a central location. Now you can search all of Dojo’s Resources instead of dojotoolkit.org alone. Most of the time if you have a question, it’s already been asked and answered!

The Dojo community is large and there is a lot of great information spread out across the vastness of the web. The Dojo Toolkit has been around for a while and has undergone numerous additions and improvements since its inception. Unfortunately, some of the documentation and valuable data needed by users and enthusiasts is decentralized. Dojo Search is designed to help alleviate this problem.

Continue reading

Introducing OAuth in DojoX

As web applications, services and mashups evolve, a perennial problem begins to assert itself—the issue of authorization (or in layman’s terms, making sure both application and service know who you are). A number of different approaches have been developed; one such approach is the OAuth specification, which is designed as a fool-proof way of validating requests.

Because of the growing popularity of the OAuth protocol, we’ve added support for it to the Dojo Toolkit in the form of dojox.io.OAuth—which can be used to sign any request made with the Dojo Toolkit’s various Ajax methods, including XHR, IFrame and Script transports.

Continue reading

Debugging Adobe AIR Applications Using The Dojo Toolkit

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.

Continue reading

Getting Started with Adobe AIR

As previously announced by Dylan Schiemann, SitePen has released the Dojo Extensions for Adobe AIR (dAIR) project that help make it simple to use Dojo into an AIR application. These extensions also simplify some of the more difficult AIR APIs by wrapping them and adding some syntactic sugar.

Working with Adobe AIR is a real treat for a web developer. You get to work with desktop features such as native drag and drop, system icons, reading and writing files, an encrypted SQLite database, and chrome-less, non-rectangular windows (even with HTML!). You also have access to all of the features of Flash, like audio and video, sound transforms, uploads and downloads, byte arrays, and Pixel Bender. Best of all, you get to have a single target environment, in WebKit — CSS3 selectors and styling, a super-fast JavaScript engine, and no compatibility issues with a certain browser.

Adobe worked hard at making desktop applications easy and accessible for web developers. I’ll explain the steps to get your development environment setup.

Continue reading