Porting Dojo Methods to Flash - Part 3 of 3 May 8th, 2008 at 12:01 am by Mike Wilcox

This is the final part of our three part series on porting Dojo methods to Flash.

In part one of our series, we implemented Dojo’s hitch method, and then used hitch in part two, where we made our connect method. In part three, we will be using both of these methods as we connect a JavaScript object to a Flash object.

(more…)

Porting Dojo Methods to Flash - Part 2 of 3 May 2nd, 2008 at 12:01 am by Mike Wilcox

Adobe recently announced their new Open Screen project, which opens the licensing of the Flash Player and much more.

We’re celebrating this event with a three part series on Dojo and ActionScript and previewing some of the work by the Dojo team.

(more…)

Porting Dojo Methods to Flash - Part 1 of 3 May 1st, 2008 at 8:57 am by Mike Wilcox

There’s been some breaking news from Adobe, announcing their Open Screen project. As of today, they are opening the licensing of the Flash Player, FLV/F4V video, publishing the AMF protocol and device APIs for the player, and more.

This is great news for businesses, developers, and the Open Web in general. No longer does open source ActionScript code need to do workarounds and leave things out in an effort to make it “as open as reasonably possible”.

In celebration of this announcement, we’re beginning our three part series on ActionScript code, and preview some of the Dojo team’s efforts in this area.

(more…)

Advanced JavaScript Debugging Techniques April 3rd, 2008 at 1:53 pm by Mike Wilcox

The purpose of this article is to provide a list of advanced debugging techniques that are not easily found elsewhere on the web. Using Google to search for JavaScript debugging just gives you hundreds of articles about using alerts and how Firebug works. We all worship at the altar of Firebug, but there are things that can go beyond a console.log(). The following is a list of methods that every developer should have in their toolbox.

(more…)

Improving Component Communication with the Dojo Toolkit February 19th, 2008 at 1:47 pm by Mike Wilcox

Architect Header

I’m often asked how to keep communications clean between components when you’re dealing with widgets and objects coming from dynamic creation, markup creation, and widgets within widgets (within widgets!). Dojo provides several powerful techniques designed to make an application run faster, make it easier to maintain, and help the code look cleaner. We’ll explore some traditional component communication techniques, and how we might improve upon them using the Dojo Toolkit.
(more…)

Dissecting Dijit November 13th, 2007 at 11:05 am by Mike Wilcox

Dissecting Dijit

The Dojo Toolkit is now an official release and we’re talking about new and changed features. In my previous post, I demonstrated Dijit’s brand new ability to construct widgets in markup. Now we’ll return to the more familiar Dijit Widget and see the culmination of the previous Dojo Toolkit betas.

(more…)

HTML Widget Prototyping with the Dojo Toolkit November 2nd, 2007 at 10:58 am by Mike Wilcox

The first Dojo Toolkit 1.0 Release Candidate is complete. To celebrate, let’s take a look at one of the new features in Dijit’s dijit.Declaration.

We are already familiar with Dijit’s capabilities to render widgets in markup. This is a powerful way of providing widgets in your page with about the same effort as styling with CSS. Recently, Alex Russell blogged about new Dojo alternate script types as a way of attaching code via markup through a creative use of the script tag’s type attribute. One of the newest features in the Dojo Toolkit, dijit.Declaration, extends that approach by giving us a way to define widgets in markup.

(more…)

Wiring a Dojo App August 10th, 2007 at 6:01 pm by Mike Wilcox

Spaghetti code comes from all of your objects needing to know where all your other objects are so they can communicate. I used to attempt to alleviate this problem by creating a switchboard object that acted as a message bus. That helped surprisingly little, as I had to deal with long object paths; and the bus would fill up with a ton of simplistic pass-through functions, making for tedious coding and bloating. Then I discovered dojo.event.topic, which already is the switchboard I needed, and beyond that, helps make the application act as more of an event-driven system.

The Dojo 0.9 Topic system has been greatly simplified over that found in Dojo 0.4. Actually, Topic itself is gone (now a private object), and the system has been rolled into dojo._base.connect, where it can be utilized without having to specifically require it. The two primary methods are publish and subscribe, with a third being unsubscribe.

(more…)

Hacking Firebug July 5th, 2007 at 9:10 am by Mike Wilcox

I was never a fan of the way Dojo 0.4.x handled debugging. Sans an available console, the debugger would dump text all over the page. Dojo 0.9 no longer uses dojo.debug in favor of Firebug’s world class debugger. Because Dojo 0.4.x wrapped, extended, and essentially hid Firebug’s console, some 0.9 adopters may be even wonder what console.log is. When porting to 0.9 and doing the obligatory fishing: where did that function go, what do they call it, and is it still there?… inevitably, the first function you look for is dojo.debug, and you come across the console object in firebug.js. Dojo.firebug is a port of Firebug Lite. What this means is that if you are viewing your app on a browser without Firebug, not only will you not get runtime errors, but you’ll get a debugger… actually a console! No more messy text all over my page. Just another reason why Dojo rocks.

(more…)