Tuesday, May 6, 2008

Cutting my Karma some slack

It seems like everybody goes into crunch-mode this time of year, almost like migratory birds or something. Naturally, so did my client.

This led to a lot of positive things, most of all the smart timeseries hack which I hope to build something out of as soon as I've gone through the latest changes the Eugene has made to Dojo's stellar charting engine. But also a deeper understanding of Dojo in general. Every week I'm able to crank out one or two Dijit's for some custom need, that make the client happy without disturbing the server guys (since we're using TSA/SOFEA architecture here, hello?)

On the down side, my work with getting the Bunkai architecture finished all but stalled. Let's see why this happened:

1. The first Bunkai verison was a (very) quick hack with no respect for extendability whatsoever. I did maybe a dozen things large and small, that I've never done before.
2. The revamp was fairly ambitious, using a pluggable message bus for both editors and resource loaders, so that you can have any amount of loaders (Sling, GData Google documents, static examples, et.c.) open at any one time, which lets you browse the resources as trees. You can have the same resource open more than once and you can close and open it again, et.c. This works now. (although only Sling and static).
3. The editors are also (as said) pluggable, which in theory can let you have the same resource up in two different (or same) editors, which communicate changes between each other (the message bus again, natch! :) This only works partiall at the moment., due to..
4. Some weird Dojo behavior, when adding Tabs dynamically. I've tried this with a number of components, and they all react the same way; When I create a tab and add (and editor) to it, the editor component gets rendered inside the upper part of the tab where you click to switch between tabs. When I add another tab, both gets rendered correctly. Yes, I've tried refresh, Yes I've tried doing it backwards, using containers and calling layout, what have you. This is odd.

Anyway, what I did have did work inside the Sling repository, so now I've mailed it to Lars (Trieloff) to pick apart and throw it back at me hard, but for the moment I feel I've at least moved the boulder forward.

Then there's the book, which should have had a finished chapter 3 (Introduction to Dojo Widgets) done weeks ago. My only defence here is that I haven't been procrastinating any more, I've been dead busy! But still.. I managed to find a couple of hours last night and push it up to ten pages (out of an estimated 32), so at least it's moving forward.

Also, my game-writing depravities has luckily been put on hold while some of the fruits of that effort have been used in writing a tentative Google Application Engine db.Model object -> dojox.data JSON converter. Actually I began to write it as a SMD file exporter for db.Model objects, so that it created a full SMD (simple Method Description) json file, to be consumer by Dojo rpc objects, and create client function endpoints to call server-side objects directly.

But then I realized that it was silly, and that each object would only have four calls anyway (CRUD- Create, Read Update, Delete). So now I'm just exporting object properties.

The upside of this is that I'm able to continue doing the dojo Grid integration for the World Change Network. I'm nearly there, so expect some news this week. What's nice is that I now have a model for GAE which let you have any db.Model object inside GAE and get a Dojo tree and/or Grid together with a create/update Dialog. That means that you can just create some mobjects and get an admin-interface in a can - using two pages of python code and just Dojo. Schweet :) Roberto Saccon is working on something similar, so we're going to integrate our stuff soon.

And speaking of ROverto, I remember promising him that I'd port Christophe Dolivet's exellent EditArea source code editor as a Dojo Widget. I've actually started on that, as I'd like to streamline the loading process for Bunkai, anyway, but as always, everything takes time. Just my good fortune I don't try to do any of this in Java huh? :)

And speaking of source code editor widgets, I've *still* not checked out Marijn Haverbeke's _also_ truly excellent JavaScript source code editor (which as well as EditArea support html, php, js, and a lot of other syntax). But since Christophe made me co-developer for EditArea I suppose I have to go through with that first.

And I'm looking forward to coming to SF in just under three weeks, for the Google I/O event. This will totally rock, I'm telling you!

So, back to client coding..

No comments: