Microsoft has released a Live Lab's (Microsoft Research and Live Services) preview technology package called Volta.
Volta is a framework that allows a developer to potentially build a multi tier application initially as an client application, and then use a technique called "declarative tier-splitting" to identify which pieces of the application run on a server and which pieces run on the client.
This is accomplished by using and XML like declarative markup within the code. With this approach a developer can focus on getting the application designed and functional and then let Volta split the tiers and create the communications "glue" that lets the applications tiers work together.
How this is accomplished is rather interesting, Microsoft decided to go with an MSIL based approach, mostly accomplished in the post compilation area. MSIL code is rewritten to run in Javascript for the client, and ASP.NET for the server side, typically as a web service.
Since Volta works it's magic at the MSIL level, any CLR targeted language is supported, C#, VB.NET, IronPython and others. Visual Studio 2008 is required at this stage, 2005 is not supported and it is unclear if it will ever be.
So show me some code already!
The code shown below is from the Volta Recipe's page. It shows the [RunAtOrigin] custom attribute in use.
namespace VEMashup.Weather
{
[RunAtOrigin]
public class WeatherSvcProxy
{
public string GetJsonWeatherInfoFor(double lat, double lng)
{
var baseUri = @"http://ws.geonames.org/weatherIcaoJSON";
var uri = baseUri + "?lat=" + lat.ToString() + "&lng=" + lng.ToString();
var xhr = new Microsoft.LiveLabs.Volta.Xml.XMLHttpRequest();
xhr.Open("GET", uri);
xhr.Send();
if (xhr.Status == 200)
return xhr.ResponseText;
else
return null;
}
}
}
This is an example of "tier splitting" via markup. This tells the Volta framework that this code is destined to run on the server. Code not marked will continue to run on the client. This means that as a developer you can postpone deciding how and where to partition your application until the last minute.
The agile developer in me seriously enjoys this particular aspect! Volta technology is seriously early in the life cycle however, so bear in mind that this will change before it gets released.
There is a handy list of known issues you should review before you start playing with the framework.
You could think of Volta as architecture refactoring on steroids. As shown below Microsoft has designed it explicitly with that in mind. (Image from Volta Web Site.)
Bear in mind that you are not limited to 2 tiers, you can retarget portions of your application to as many tiers as you want!
All in all I think this bears some watching!
Cheers,
Robert Porter