A little bit of Ajax

Volume 10, Issue 109; 15 Oct 2007; last modified 08 Oct 2010

After a brief exploration of “information management” programs, I decided to roll my own. Irrespective of whether it succeeds or fails, I learned a little something about Ajax. Emphasis on little.

There are two parallel threads to this story. A while back when I wanted to learn more about Ajax, I started working on my photographic metadata application. It worked great, until it stopped working altogether. Ajax succeeded for that application, but it was built to be that way from the start. Prototype or not, I expect 1500 or so lines of Ruby and 1500 or so lines of JavaScript to do something useful.

The second thread is about information management. There are lots of Mac applications designed to help with “information management”. I recall looking at “iGTD”, “Yojimbo”, and “Tinderbox” but I'm sure a few others crossed my desk as well.

(Tinderbox was probably the most interesting option. Some folks describe it as a life changing application, but I never really groked it. And it's fairly expensive as these things go, but at least it does store its data in XML.)

Anyway, I spent a few days pouring sample data into these applications and thinking about adopting one of them as my “go to” tool for managing action items, wish lists, tasks, and the rolling sea of little slips of paper and reminders that wash around my physical and virtual desktops.

Then it hit me.

None of them, with the notable exception of Tinderbox, seem to store the data in any open format. I was seriously considering one of these commercial black boxes for an important chunk of the data that drives my day-to-day life. The little voice in my head reacted viscerally when the observation was made: “What the hell you thinking, man! Stop that!”

I generally do what the voices in my head tell me to.

I took a step back and realized that, in their simplest form, these applications boil down to a little three-pane UI.

On the left, some sort of categorization. I decided to go with a collection of tags because folksonomies are trendy and because building a proper ontology would have been hard (and pointless since if I was sufficiently organized that I could predict how it would grow, I probably wouldn't need the crutch that I'm building). On the right, some sort of list of the items in that category and then a place for each individual item.

The categories are organized into a tree where each tag is considered a primary key, a secondary key for every other tag with which it appears, a tertiary key for every pair of primary and secondary, etc. There's probably a term for that, but if so, it escapes me at the moment. (One or more of the first three comments will no doubt contain the answer.)

The items have a title and some other basic metadata that can be used for summary information and each has a body that can either be empty (as in the “Explore ‘Linked Data'” example above), contain text, or contain a saved copy of a web page.

The three pane view is just an HTML frameset and the whole thing is built from a collection of small XML files by a few lines of Perl and XSLT.

The tricky part, if there is one, is making the check boxes and the little “flag” icons persist. Any attempt to do this with old school “submit” buttons would be a total disaster. If this application has any hope of succeeding, it has to be at least a little bit easy to use.

I decided to try a little Ajax. It worked, and there's nothing very rich or interesting about the script, but it's just a fraction over 100 lines. Easily less if I tried.

There's nothing really earth shattering here, except if “Ajax” makes you think of big, sophisticated applications like Google maps or the latest extraordinary mashup, maybe you're missing something. My little notes application may be crude, but it still gets a pretty big bang for 100 lines of code. I'll be thinking about that from now on when I build web pages.

If you want to see more of my little notes application, you can find it with a small selection of sample data at http://portal.nwalsh.com/ under the “Notes” tab. Disappointingly as demos go, the one thing I had to turn off in the public version was the Ajax. It wasn't designed to be a multi-user application and I doubt it would behave well.

By the way, I was reminded to write this essay by Adding Ajax. I thumbed through it in the local bookstore and it looks like a good read. Recommended if you're thinking of…adding a little ajax to your web.

Comments

This is kind of what us Semantic Desktop people try to do. Alas, we often try to do many other things as well, so we dont often get to a usable state, but you may want to look at:

* Nepomuk - which is the big EU project version, alas there is nothing really releasable there yet.

* Gnowsis - which IS released, but a fairly large java-monster

* Koble which is the light-weight web-version

That being said, I probably wouldn't trust my data to either of these if I were an outsider. I know several people who trust Gnowsis and I trust Koble, but I have direct access to the server when it all goes wrong :) (oh, btw, why can't I use ul/ol lists in my comments?)
—Posted by Gunnar Grimnes on 16 Oct 2007 @ 10:57 UTC #

Have you checked out Org Mode or Planner Mode from Emacs? Everything is saved in plain text and has xml and html export options in both.

—Posted by P.F. Hawkins on 16 Oct 2007 @ 12:43 UTC #

Norm,

This is really cool. Keep us posted.

—Posted by Bob DuCharme on 16 Oct 2007 @ 01:39 UTC #

I'd second the org-mode comment. Being an Emacs user (and extension writer) you should find it easy to pick up and extend for your purposes.

—Posted by Rick on 17 Oct 2007 @ 06:34 UTC #