Featured Post

Linkedin

 These days, I mostly post my tech musings on Linkedin.  https://www.linkedin.com/in/seanmcgrath/

Saturday, October 30, 2004

Code, data, dynamic languages, gmail and bootstrapping a GUI

So, the hunt is on amonsgt the perspicacious blogopuli to classify what kind of a thing Gmail is from a GUI perspective.

I haven't looked closely enough to comment but, since that never stopped me before, I'll comment anyway :-)

GMail looks to me like a classic bootstrap. I suspect that on the server side there is a model of the client side expressed in domain terms - concepts like inbox, e-mail composer, contacts list and so on.

When a client connects, it effectively downloads an implementation of that model. Once in situ, further conversations between client and server can go up a notch - expressed in terms of domain specific concepts "render the inbox will you? There's a good chap" rather than "At X,Y render a blue box...".

Web clients carry around a basic, low level programming language called Javascript. The real beauty of Javascript is that it is dynamic - you can blurr the distinction between code and data. You can hoist the level of abstraction you work with in your app by layering domain specific concepts on top of it in the form of functions and data structures. You can sling across data structures already teed up for use on the other end with the aid of the magic of "eval". You can implement complex behaviour by sending across a program to be run rather than trying to explain what you want done declaratively to the other side.

Now, in such a world - would you send XML data to and fro? Developers with a static typing programming language background might be inclined to say yes but I suspect javascriptophiles, lispers, pythoneers and rubyites are more likely to say no. Reason being, it is so much more natural to exchange lumps of code - mere text strings remember - that can be eval'ed to re-create the data structure you have in the XML.

In my opinion, there is more power in that one idea than in the whole minatory miasma of WS-GetAGrip.

No comments: