Shoes vs. AIR
To really give you a sense of how sad I am as a human being, here’s what I woke up thinking about:

vs.

Historically, there have been a bunch of really heavyweight GUI and graphics toolkits available for developers. Stuff like MFC, OWL, Java OpenGL, SDL, Direct X, etc. Admit it, they are fierce, fierce overkill for simple apps: a leetle twitter client, a focus-follows-mouse eyeballs widget, stuff like that. So what is a person to do?
Well, the web proved that the slightly above average joe can actually create semi-reasonable user interfaces with a simplified layout toolkit (HTML) and simplified design toolkit (CSS) or some kind of framework that produces that output (Dreamweaver, Google Page Creator).
So one answer to how developers create small, fast, light GUI applications is to model a toolkit on the same principles of simple layout and styling. Some kind of light box model with colors, shapes and simple animation.
Enter Shoes
Why the Lucky Stiff created Shoes to provide a simple GUI tookit for Ruby. It runs on top of the heavier Cairo and Pango libraries, so it’s cross-platform. Apps are simple to create and style and use a system of flows (left-to-right) and stacks (top-to-bottom) with nesting and margins to produce a kind of box model. Colors, shapes and simple animation are quite easy to pull off. I’ve been messing with this and aside from some nasty issues which may to be related to 64-bit, I’m impressed.
Pros:
- Very fast.
- Very simple and small syntax.
- Supports drawing and animation very directly.
- Can embed pretty much any Ruby code.
Cons:
- Not sure about maturity. I’ve had more problems than most users, though.
- You have to know Ruby (should this be a pro?).
- Not a lot of holistic tutorials for creating non-trivial apps.
- Users need to have shoes, which means you will quite likely have to distribute the runtime with your app. This is supposed to be easy to do, but any local issues could crop up. This is true for AIR as well (see below), but Adobe has more weight to put behind runtime distribution.
Enter Adobe AIR
Adobe AIR is a runtime and installation/packaging system for apps created using HTML and CSS directly. Or Flash. Or Flex. This means that apps are verbose mess of tagging, although no worse than a sophisiticated HTML/CSS layout, really. Without getting in to Flash and Flex, you can create some animation effects and other things using javascript and the DOM, as well as some AJAX interactivity with the server.
Pros:
- Relatively mature (aside from Linux 64-bit, grr). Distributed by Adobe, easy installer, easy app installer. Bunch of documentation. Some IDE support if you care about IDEs.
- App signing mechanism for ensuring authenticity.
Cons:
- Does not provide any abstraction on top of HTML/CSS. It’s not faster than building a web page of equal sophistication. Until you get used to AIR, you might be a bit slower due to some sandbox and security stuff.
- Does not support real drawing or animation out of the box. Maybe, maybe you can add in canvas support somehow?? No clue.
Enter ?
Anyone know of other alternatives? I’m guessing HyperCard used to be. How about Silverlight? What do other weensy, gooey app developers know and love? Are there any cross-platform libraries for languages like Ruby and Python which provide a high-level mini-app factory? What is the Shoes for Python?
Improving AIR
I think you could do two things to AIR to really make it kick ass. You know, aside from fixing the 64-bit Linux issues:
- Support some kind of programmable runtime underneath. If you could use Rhino to code javascript against the Java APIs, suddenly you could do nifty things on the client side like break out an OpenGL window or play an MP3 (without Flash). I imagine this is fundamentally a security issue for Adobe, though, since they currently have strict rules about client/server communication and file system access. Shoes provides an app layer on top of all that is Ruby, whereas Adobe provides pretty much only a self-contained GUI box.
- Support HAML and SASS. There’s a huge productivity gain when you get out of the business of writing out opening and closing tags for everything. It would be slick if you could cut the size of an AIR app in half by generating the resulting layout and styling from HAML and SASS rather than punish the developer up front.
For now, I’m sticking to Shoes. I need full Ruby underneath and I need to do some drawing. But let’s get all this 64-bit stuff behind us. I’m tired of segfaults :-)