« January 2007 | Main | March 2007 »

February 28, 2007

TGNewTraversal: less broken traversal for TurboGears

I have been massive underwhelmed by the traversal mechanism of CherryPy, which is used in TurboGears.

If you are building a large complex application, you need a lot of control over traversal, and CherryPy just doesn’t give you this. URL components have to be fixed for the normal traversal mechanisms to work. If you want them to be variable, then you need to write some pretty hairy code that depends a lot on CherryPy internals.

In my view this is the major failing in the application, which is otherwise pretty nice. I’ll moan about the lack of daemonisation another time ;)

The other major option is to use Routes. This is lifted from Rails. I gave this a go, but I really dislike pretty much everything about it — I don’t think regular expressions are part of the mix to solve an architectural problem like this.

So, enter TGNewTraversal. I’ve ripped off some of the code from Nevow’s traversal mechanism, which is the best I’ve seen anywhere. I’ve tweaked this slightly to be more friendly in the CherryPy environment. The tiny amount of code required is a testimony to the quality of the traversal concept from Nevow.

It’s working very well on a development project I’m working on right now, and seems ready for an Alpha release at least. It’s released under a BSD license and is in the Cheese Shop. Please give it a shot and let me know what you think.

February 24, 2007

Håkon Wium Lie on the open document tussle

Over at CNET, Opera’s CTO has written an article that rather sums up my own feelings on the battle between Microsoft’s XML-based document formats and OpenOffice’s. He also introduces something that I think is little short of revolutionary.

Both of them are frankly impenetrable XML. Just by taking their binary format and turning it into tags does not make it therefore interoperable.

Interoperability in formats, as in any protocols, is gained by providing a level of abstraction. Just providing what is effectively a list of the properties of internal objects is no good — the choice of objects to solve the problem (i.e. in the solution space in architectural terms) is effectively arbitrary. In your protocols, file formats and published interfaces you need to provide some level of abstraction, so you say things about the problem space.

I am a fan of LaTeX which does provide this level of abstraction. LaTeX templates and documents deal with structure and with core concepts in typesetting such as kerning and leading. These things are necessary if you are to publish a “real” book, such as a scholarly work.

However, LaTeX is hard. Really hard. And for the sort of document generally generated in the workplace it’s overkill. In fact most documents produced in the workplace are never actually read by anyone, so the less effort involved in production the better.

Mr Lie’s suggestion of HTML and CSS3 is a really interesting one — HTML is accreting semantic information rapidly, with things such as the microformats movement. Allowing a document to provide multi-dimensional semantic information (is it a book? is it a plane? it’s both!), and that also can be viewed ‘natively’ in the browser is very exciting. What is more important it knocks all the Microsoft vs OpenDocument stuff into a cocked hat. Who gives a damn what ISO eventually certify, if you’ve got something so eminently practical you can actually use?

The proof of the pudding of course, is in the eating, and Mr Lie seems to have done just this, producing a book using Prince.

This really feels like a major step forward in convergence to me, and a proper pragmatic step too, that leads to actual results rather than a load of hand-waving at conferences. It makes me want to go and write a book!

February 21, 2007

Will the other Isotoma please stand up

As the horticultural amongst you may know, Isotoma is in fact a plant. We named the company after the flower because (a) we had some in our garden and (b) because the .com was available (the we at this point being myself and my darling wife). Of such things are history made.

I was reminded of this because I have a Google Alert running on the name of our company. My alerts this morning informed me of two novel facts about “Isotoma”, a word about which I am gaining encyclopædic knowledge. First that Isotoma is an ingredient in a stimulant and second that not only is Isotoma a plant, it is also a pretty gruesome looking arthropod.

After some consideration, I reckon that is a score draw.

February 19, 2007

I'd rather eat glass

A really interesting blog post from Brendan Eich regarding multithreading in Javascript.

It looks like JS might become the Next Big Language on the server as well as the client, so Brendan’s opinions really really matter. I am very glad to see he’s drinking the right kool aid. He doesn’t want explicit multithreading, and he namechecks Erlang, a language I am rather fond of.

Even more interestingly, he says:

In all the fast yet maintainable MT systems I’ve built or worked on, the key idea (which Will Clinger stated clearly to me over lunch last fall) is to separate the mutable unshared data from the immutable shared data. Do that well, with language and VM support, and threads become what they should be: not an abstraction violator from hell, but a scaling device that can be composed with existing abstractions.

Which is absolutely correct. I wonder if he’s thinking along the lines of Oz which uses these ideas explicitly to provide a quite different multiprogramming mechanism.

February 02, 2007

Soft launch of latest project

It's that time again... We've been working like lunatics since late December on a project with STA Travel that gets soft launched today - MapMyAdventure. It's a monster Google Maps mashup, allowing travelers to plan their trip around Australia and then blog about it once they're there. The back end was already written when we started on the team, but the front end is entirely ours and one of the biggest single Javascript jobs we've done - bigger even than Sleevenotez (at least at the moment).

It's also the first time that we've worked with Kirsty and Simon from Big Picture (now with Mindshare Interaction), who've turned out to be some of the most switched on and enthusiastic customers we've had (which is nice).

Look out for the official launch in a couple of weeks, but feel free to go and have a poke around right now...