Picking a platform

I want to experiment in making an online diagramming tool.

So step one is picking a platform in which to implement it. Normally this is the kind of decision that would paralyze me in weeks of delicious research and tinkering. Not anymore. As Jason Fried reminds us, decisions are temporary. Just make a choice. Change it later if it needs changing. You’re just as likely to make a bad choice after wasting two weeks fretting about it. Keep moving.

It’s got to be cross-platform because I know people whom I respect who run each of the big three as their primary platform. It’s got to be a full-featured diagramming tool that runs in a web browser because that’s what I want to use right now. So rule out any desktop development platforms: Qt, Java, Mono.

For online choices we have to chose among

  1. Silverlight
  2. Java applet/webstart
  3. Canvas tag/VML/excanvas
  4. Hybrid Flash/Javascipt (Laszlo)
  5. Javascript libraries: JQuery, Cappucino, Dojo, ExtJS
  6. Flex

1. Rule out Silverlight because nobody’s got it yet. I know all Windows users will have it shoved upon them soon enough, but it’s going to be a long time before it’s commonly found on OS X or Linux.

2. Rule out Java because Sun has done such a miserable job of getting the JRE installed universally (maybe partially because it’s GIGANTIC).

3. The Canvas tag is phenomenal (where it works). Excanvas (canvas ported to VML) just doesn’t cut it for performance, though.

4. Laszlo is pretty compelling. There has been some very nice work done in it, but it really smacks of a technology that got outpaced by Flex. Compiling server-side to swf is awfully cool, but really seems pointless now that Flex has matured. The other great potential advantage of a hybrid Javascript/SWF solution is that where Flash isn’t available, you can fall back to Javascript. That’s all fine and good in principle, and Laszlo’s simple widget tester example does run fine in pure JS, but I can’t really believe the high-power interactive graphics stuff works decently in pure JS. But how do I know? Somebody argue with me. Prove me wrong. I’ll be happy.

5. We’re left with Flex vs. Javascript. It’s a really tough call. And I fall back on the some of the same concerns I have about Laszlo: can the pure JS graphics really do it? If you look at Cappucino and 280Slides, you have to hand it to them–it looks like it can be done. But just barely. 280Slides is an incredible feat, and yet I’ve been able to drive it into the dust pretty easily. I don’t want to embark on a project where the most impressive thing about it is that it works. I want the software itself actually to be good. The other concern is that these libraries are still pretty close to the browser, and cross-browser issues are not something I’m really interested in spending a lot of cycles on. Oh, and finally, JS isn’t a very good application development language. Projects like Dojo go a long way toward bringing it up to par, but its missing a lot of what you’d want in a modern programming language.

6. So it’s Flex. Macromedia (I’ll get used to saying Adobe, I really will) did an incredible job getting their plugin installed. It’s pretty much everywhere. ActionScript 3.0 is quite a respectable language. It’s arguably better than Java in certain corners–Events/Observing/Listening, for example. The library is certainly expansive. The canvas Flash gets you is very nice and performs beautifully. I’m sold.

(My first painful attempts to get a circle onscreen following a mouse have not yet convinced me I made a bad choice. It’s clear that Flex/AS3 are towing a lot of legacy baggage from previous incarnations of Flash/AS that are bunging up its API. But I eat technologies like cereal, and now I know the difference between addChild and getRawChildren.addChild. No problem no more.)

Leave a Reply

Your email address will not be published. Required fields are marked *