Posted in September, 2007

Dojo on the iPhone conference slides September 27th, 2007 at 1:55 pm by Dylan Schiemann

I recently had the opportunity to speak about Dojo on the iPhone at AjaxWorld West. The session was a straightforward, if not colorful, review of the current state of app development for the iPhone.

In preparing for the presentation, I needed to install several native applications in order to create high quality screenshots for my slides. As a result, I presented the audience with an overview of this information because there are a variety of useful development tools that require installation.

Because Christopher Allen gave a talk just prior to mine with an iPhone and iPod Touch Ajax overview, I dove right into specifics about the current issues and problems with iPhone development for Dojo developers. I wrapped things up by walking through a few working examples of Dojo-based applications, some optimized for the iPhone and others not. At the end of the talk, I promised a forthcoming, iPhone-optimized Dojo build that removes features and code for items not supported on the iPhone. We hope to have that ready in time for the 1.0 release of Dojo on October 31.

The press seems to have enjoyed the session, with Network World running a fairly lengthy article titled Unauthorized iPhone Apps Market Flourishes. I should make it clear that my talk focused mainly on pitfalls and frustrations that developers face, but the iPhone is by far the best mobile, open web, development solution on the market today.

Dojo Workshop Updates and the Grails eXchange! September 26th, 2007 at 9:41 am by Dylan Schiemann

With the recent launch of Dojo 0.9 and the planned launch of 1.0 in late October, the SitePen Dojo training courses have been revamped and now focus exclusively on the new code base.

SitePen’s partnership with UK-based Skills Matter is allowing us to offer our 3-day Dojo training workshop overseas, several times, in the upcoming months.

  • London, Oct. 15-17, 2007
  • London, Nov 14-16, 2007
  • London, July 9-11, 2007
  • Denmark, July 15-17, 2008

On another note, and speaking of Skills Matter, the Grails eXchange is taking place October 17-19 in London, and I will be giving a brief talk on Dojo there as well. Skills Matter puts on a number of great training sessions and evening seminars, and we have high expectations for their first major conference. The itinerary includes a number of excellent sessions on Ajax and Comet techniques to be presented by Joe Walker, Jonas Jacobi, Scott Davis, Dave Crane, and Sven Haiges. As an event sponsor, SitePen is pleased to offer a £100 discount to all of our friends and clients. Please contact us for the promotion code and then visit Grails eXchange to register!

A Fine Line Between Abstraction and Obfuscation September 24th, 2007 at 9:09 pm by Neil Roberts

Introduction to Part 1

By the time you have written your abstraction layer, you have essentially written your own framework. Chances are, you are not a good framework writer, and it’s going to suck, and you are going to realize that one or two versions down the road and re-write it. © RedMonk in Java’s Fear of Commitment.

While there is a lot written on how difficult it is to write a good abstraction layer, there is very little advice on how to avoid the worst evil of the abstraction layer: obfuscation. As I scoured the internet looking for any discussion on this topic, my search results were a lot more sparse than I was expecting. There is a very succinct blog entry by Rhett Maxwell that turned up in my results that summarizes some of what I’d like to say in a single sentence: Most of the books out there that teach OO design talk about Abstraction, but they do not warn about Obfuscation at all. Its a shame.

And to those of you wondering why this type of obfuscation is a problem, let me clear it up. Obfuscation at its most harmless simply confuses people. Obfuscation at its worst makes people stupid. When the most brilliant programmer can no longer figure out how to get from point A to B, even though they are right next to each other, all their genius is useless.

JavaScript is incredibly susceptible to becoming accidentally obfuscated. In the next month or so, I want to go over various common methods of abstraction that I have seen widely used in JavaScript and discuss how and why they can lead to obfuscation.
(more…)

Dojo 0.9 Power Tools: <script type=”dojo/method”> September 21st, 2007 at 5:30 pm by Alex Russell

Dojo 0.9 is a different beast than any Dojo before it. It’s smaller, it’s (much) faster, and it “feels” different in many ways. As Jon Sykes noted, “everything is familiar yet strangely different”. I could go on for hours about why dojo.query() is completely indispensable or how having dojo.behavior as a part of Core changes everything, but there’s some fun stuff up the stack too. In particular, new parser bears mention, and a bit of explanation. In addition to now letting you build instances of any class (not just widgets), it also lets you configure their behavior as well as their properties.

For a long time systems like Flex and Laszlo have had a corner on naturally mixing behavior with markup. HTML’s native <script> tag doesn’t provide any context, and worse, can’t provide a way to be triggered by a particular event or action (outside of proprietary extensions). Several use-cases are important:

  • Scoped execution
  • Event-driven execution
  • Attachment vs. replacement

In Dojo 0.9 we took a hard look at them and devised <script type="dojo/method"> and <script type="dojo/connect">. Lets take a quick tour and show how it makes writing event handlers natural, building new widgets a snap, and over-riding built-in behavior trivial.

(more…)

The Dojo Grid September 16th, 2007 at 9:58 pm by Dylan Schiemann

The single, most asked question with the Dojo 0.9 release has been, “Where’s the grid widget?” We’re finally able to address this request with today’s announcement that SitePen, Mozilla Foundation, Nexaweb Technologies, Redfin, & SnapLogic Announce Open Source Contribution of TurboAjax Group’s High-Performance Grid Widget to Dojo Foundation.

For those of you familiar with the existing TurboGrid widget, you’ll be happy to know that the same great performance and feature set are currently being ported to the 1.0 codebase, with support for Dijit and all of the great features Dijit offers (CSS theming, a11y, il8n, dojo.data, etc.).

(more…)

Extending Dojo 0.9: Multipart Transfers September 11th, 2007 at 8:55 pm by Bryan Forbes

The release of Dojo 0.9 on August 20th marks a return to our roots: fast and lean. As Alex mentioned in a previous post, the surface area of the API has been reduced. With this API refactor, things were bound to be left out, and rightly so. The “core” of Dojo needed to be lean so we cut out the fat. But cutting out the fat sometimes removes some useful functions that people use. Fortunately, Dojo 0.9 makes it easy to add features on to it with little hassle.

One feature that wasn’t ported to 0.9’s AJAX IO was multipart transfers. I stumbled across this casualty of the refactor while working on a side-project: a port of Eugene Lazutkin’s webui for OpenWRT from Dojo 0.3 to 0.9. webui is a configuration interface for OpenWRT that takes the approach of trying to do most CPU and RAM intensive operations in the browser rather than use the limited CPU and RAM of the router. For example, when you edit the rules for the router’s firewall, the firewall rules file is downloaded to the browser and dissected in JavaScript. This makes it very easy to add rules in the right places and delete the correct rule without tasking the router with this work. After you’ve modified the firewall rules to suit your needs, the file is re-assembled and uploaded to the router using a multipart transfer. Because of this functionality, multipart transfers are vital to this application.

(more…)

Conference Slides September 9th, 2007 at 9:39 pm by Dylan Schiemann

Slides from our recent talks at the Ajax Experience and the Rich Web Experience are now available. Newly added talks include:

  • Standards Heresy: Dojo and the Rise of Open Web Pragmatism
  • Dojo 0.9: Faster, Leaner, and Dijit?
  • Comet: Low Latency Data Transit or Really Bad Pun?

The iPhone Screenshot Quest September 4th, 2007 at 11:10 pm by Dylan Schiemann

I speak at a number of conferences and am giving a couple of talks later this year about Dojo on the iPhone. Of course, giving a talk without being able to show demos is frustrating, but giving a talk without having high-quality screenshots is silly. There wasn’t a solution known outside of Apple until recently, and it is still a bit of a process, or I daresay a bit of a quest. These instructions are for Mac users… I’m sure the steps are pretty similar for Windows users as well.

(more…)