Volta - Microsoft Live Labs

Michael Schwarz on Thursday, January 3, 2008

Volta - Microsoft Live LabsOn December 5th last year Microsoft Live Labs announced the Volta technology preview [1], a developer toolset for building multi-tier web applications using existing and familiar tools, techniques and patterns. You architect and built your application as a .NET client application, assigning the portions of the application that run on the server tier and client tier late in the development process. You can target either web browsers or the CLR as clients and Volta handles the complexities of tier-splitting. The compiler creates cross-browser JavaScript for the client tier, web services for the server tier, and all communication, serialization, synchronization, security, and other boilerplate code to tie the tiers together. In effect, Volta offers a best-effort experience i n multiple environments without requiring tailoring of the application.

You will find the Volta technology preview downloads [2] here. Note that Volta requires Visual Studio 2008. If you want to start playing around have a look at the quick start [3] and the examples [4] (the examples are target to JavaScript application and not optimizes in speed, long download times are expected).

You should run Fiddler [5] while opening the examples to see the source code of the HTML web page and the required JavaScript files.

<pre class="csharpcode">&lt;script type=<span class="str">&quot;text/javascript&quot;</span>&gt;&lt;!-- SearchPaths = [<span class="str">&quot;./&quot;</span>];<br> var a = LoadAssembly(<span class="str">&quot;Quickstart.Client,Version=1.0.0.0,Culture=neutral,<br> PublicKeyToken=null&quot;</span>);<br> var oldLoadHandler = window.onload;<br> <br>window.onload = function() {<br> <span class="kwrd">if</span> (oldLoadHandler != <span class="kwrd">null</span>) {oldLoadHandler();}<br> a.EntryPoint();<br>}; // --&gt;&lt;/script&gt;</pre>

Very interesting, JavaScript combined with assemblies. The quickstart [6] example downloads more than 2 MB uncompressed JavaScript, the representation of a .NET Framework for JavaScript, the reason why it is currently very slow. When you click on a button an AJAX request is done with e.g. following response (JSON):

<pre class="csharpcode">{<br> __type:<span class="str">&quot;Microsoft.LiveLabs.Volta.MultiTier.ReturnValueInfo&quot;</span>,<br> result:{__type:<span class="str">&quot;System.String&quot;</span>,<span class="kwrd">value</span>:<span class="str">&quot;Hello Michael&quot;</span>}<br>}</pre>

Combined with Silverlight [7] this could be a cool solution to develop client applications:

The final question that is frequently asked is how Volta relates to Silverlight.  Is Volta meant to replace Silverlight?  Are we trying to make JavaScript work for the same scenarios as Silverlight?  Simply put, no.  As others have observed [8], Volta is compatible with and is built to be complementary to Silverlight.  The Microsft PressPass Q&A about Volta [9] further explains that Volta is an MSIL to MSIL toolkit aimed at making writing distributed applications easier. Silverlight is an implementation of the .NET platform that therefore will automatically benefit from the advantages of the Volta toolkit. The technologies complement each other well, and we believe that amplifies and validates the importance of the complete .NET platform, including Silverlight.

I hope that all the teams around ASP.NET, ASP.NET AJAX, MVC and Silverlight sit together and combine their technologies.