This time last year, Erik Meijer sent me a paper about a new programming language project he was working on. I was high on the social graph at that time and didn't get around to responding to Erik's paper until this fall. The premise seemed fundamentally interesting; create an MSIL to Javascript compiler which is conceptually similar to Google's GWT and Nikhil Kothari's Script# then flip the traditional Web development script by allowing developers to choose whether code runs on the server or on the client by simply decorating methods with attributes. The last bit is the interesting innovation in Erik's project although it is obscured by the C#/VB/MSIL to Javascript compiler aspects.

As an example, let's say you have a function like ValidateAddress(). Whether this logic lives on the client (i.e. Javascript in the browser) or runs on the server is really a function of how complicated that function actually ends up being. Now imagine if when the time comes to refactor the function and move the validation logic from the Web client to the server or vice versa, instead of rewriting Javascript code in C#/IronPython/VB.NET/IronRuby/etc or vice versa you just add or remove a [RunAtOrigin] attribute on the function.

This project shipped last week as Microsoft Volta. You can learn a little more about it in Erik Meijer's post on Lambda the Ultimate entitled Democratizing the Cloud using Microsoft Live Labs Volta. Try it out, it's an interesting project that has legs. 

Now playing: Jay-Z - Pray


 

Monday, December 10, 2007 2:58:48 AM (GMT Standard Time, UTC+00:00)
The first bit of Volta (MSIL to Javascript) is the interesting part. The dynamic tier-splitting sounds compelling but is very problematic since it it is a bad assumption to make you can just move any-ol' code to the server and get a viable solution. This is the same approach that got remote objects into trouble. I tried to explain that further here :http://www.rgoarchitects.com/nblog/2007/12/06/MicrosoftVoltaOhMyOhMy.aspx
Monday, December 10, 2007 3:19:51 AM (GMT Standard Time, UTC+00:00)
Just playing around with this a little, it seems pretty cool, but I could only get things working in IE. Everything I tried in firefox gave a javascript error in VoltaManagedInteropHelpers.js:
window.Volta has no properties

Also, to my novice eye, the javascript they are emitting is really lean. Unfortunately for me, this meant it was so abstract I couldn't figure out where the magic was happening. Even enabling the "create verbose javascript" option didn't let me see (with Firebug) anything that resembled what I would've imagined my c# code being transformed into. (I guess I was expecting something like what Script# emits)

Not sure if maybe I wasn't seeing something with Firebug because of the Firefox issues, since I don't have anything comparable to use in IE, where everything was working properly. I suspect I'm just a dumbass though and this is abstracted to a level that I can't get my head around.
Comments are closed.