My first AIMPages Module (

[ This post has been updated -- see below ]

The first thing to note is that AIMPages is VERY beta. Most of the docs were written by the main developer (“Kevin Lawver”:

The next thing is: their heart is in the right place. I am NOT going to pontificate on the future of AIMPages, they have a lot of weight behind them, they’re doing some good stuff, but they are a late-commer to the space. They also have the stigma of being “AOL” to overcome. We’ll see how it shakes out.

But, building a module for them was a cool learning experience.

h3. The Good

The approach they’re taking is to have a module be a directory of a main “manifest” file (index.html), with asset files also in that directory or levels below that (images, javascripts etc). Here’s where it gets interesting: the manifest has to be VALID xhtml! Cool concept. The manifest (and linked stylesheets and scripts) get folded INTO the person’s AIMPage. It’s almost like a mixin in ruby. This presents some interesting challanges – espically since it’s possible to have multiple copys of your module in one page. Therefore no “id”s on elements (except your main “module” one). Everything is accessed by class name.

They also give you access to the “Dojo”: toolkit for javascript goodness.

h3. The Bad

The code, test, deploy cycle seems a bit broken to me. I had TextMate open with my files, I’d make changes, apple-tab to terminal, hit up-enter to rezip the archive, apple-tab(2x) to mozilla, hit back-back to get to the upload form, scroll down a page with a disclaimer that I had to agree to every time (WHY more then once?!?), then find my archive, then hit “save” (I think ‘upload’ makes more sense in this context, but that’s just nitpicking).
In looking through some other code I found (the flickr module by “Ian Costello” – any relation to Eric Costello from flickr?), I noticed something about “local testing” which looked like it had hurdles of its own. All in all, I think that testing needs to be made much easier.

h3. The Ugly

*Documentation* This is under “The Ugly”, b/c I’m fully expecting it will be worked on. As it stands now, there are 3 or 4 example modules on the developer site, each which does something different (different versions of the microformat maybe?). There was no real documentation for dojo or their dojo extensions.

*Testing* As I stated above, the testing cycle is strange and cumbersome. By making modules xhtml and javascript (ala Widgets for Konfabulator and Os X), you’re going to attract developers who want quick results. If those developers have to jump through too many hoops, you lose them. Thats why I never wrote too many firefox extensions – too much work to test and change them.

From one of their VPs:

We’re starting off with a pretty quiet beta, but will start promoting heavily to AIM and AOL users in about a month or so.

I’ll write up how I actually WROTE the thing in another post for now, here is a zip file of the module if you want to look at it:
“Spell with Flickr AIMPages module”:

Oh, and a tip for now – dojo.html.getElementsByClass() is your friend.

[ Update at 6:47 pm ]
Both the Kerry (VP) and Kevin emailed me RIGHT after I sent them this blog post.
From Kevin:


We JUST rolled out the new site today and it has some more
documentation around the javascript stuff. I’d LOVE your feedback on
it if you have the time.

And thank you for the blog post. I need to dig back in and write a
better “setting up your local dev environment” post. It’s not really
that bad, it just takes a few extra lines of javascript to check to
see if you’re in AIM Pages or in standalone mode. I do almost all of
my debugging in standalone mode and then usually only have to upload
the module a couple times. The hardest thing about the local dev
environment is if you want to write server-side modules. Testing
locally with AJAX-y stuff is fairly straightforward. Expect a better
tutorial on that next week.

From Kerry:

Hey Erik~
Great feedback. I ran into some of the same issues when I made my simple module.
After we get the documentation updated, I’ll let you know–would love your thoughts on whether we improved the info.

I’m not afraid to say that I went into the building of this module with some prejudice towards the whole project – I was very wrong – not only have they responded to my concerns – they admited to having simliar problems!

They’re really trying to do the right thing here!