Microsoft Unleashes Volta

Well, I knew there had to be a reason that we haven’t seen any real movement in the ASP.NET AJAX Futures realm for a while… say hello to Volta.

Basically it’s Microsoft’s approach to using .NET to emit client side code (JavaScript). It shouldn’t be too big a surprise that Microsoft was working on this because Nikhil Kothari released a prototype called Script# that did something similar back when the ASP.NET AJAX 1.0 bits were in beta. Basically it uses reflection to emit JavaScript types based on your .NET types and, even cooler, will translate the MSIL that your C#/VB.NET/IronPython/etc. generated when it was compiled back into JavaScript for execution in the browser. There’s also an entire set of intrinsic controls that represent the DOM that you act on in your code that will be translated into the property client side calls. For example, let’s say you put an <input id=”myTextBox” type=”textbox” /> in your HTML. Here’s how you would access the current value on the server:

string value = Document.GetById<Input>(“myTextBox”).Value;

That would then be translated to the following JavaScript on the client:

var value = document.getElementById(“myTextBox”).value;

Get it? I haven’t had time to peruse all the details yet, but I must say that it’s pretty cool stuff and looks to be done in a pretty neat way from the .NET perspective. Is it an entirely new concept? No. Google’s Web Toolkit has done these same things for Java for a while now, but it’s definitely a richer twist on the approach.

2 thoughts on “Microsoft Unleashes Volta

Leave a Reply