Library tutorials & articles
The Zen of Volta
- IL Re-writing
- Refactoring
- Tier Splitting
Tier Splitting
TierSplitting is a far more radical refactor than the Async one. In this case you annotate types and the Volta compiler rewrites the IL to distribute the assemblies into multiple tiers. This allows you to concentrate on developing the functionality of the application and decide about where things are deployed later in the development cycle.
With Volta, the developer determines which classes run on the server and which ones will run on the client through a new option in the Refactor menu:
This adds the [RunAt(“someName”)] attribute and sets up the project to run a test web server to host the server part of the application:
[RunAt("Server")]
class QuoteServer {
//...
}
Here "Server" is a reference to a URL in the app.config file that corresponds to the location where this code will live. You can also use the [RunAtOrigin] attribute in web applications to indicate that the code should run on the web server hosting the application. With client/server applications, this option is not available since there isn’t a defined “origin” server.
How does Volta pull off this tier splitting magic? First, Volta rewrites the class into two separate implementations. The client-side implementation becomes a proxy – it looks and acts like the real QuoteServer, but in reality is going to send a request to the server to perform the work. The server side ends up with the basic QuoteServer class with some additions to manage state.
The Volta compiler also creates a __TierSplit.aspx web page that is used as the endpoint for the server code. This becomes evident when we run a Volta application – it creates a Volta test server icon in the tray that is used to display the diagnostics window:
Each method and property access from the client portion (classes not decorated by RunAt attributes) to classes running on the server(s) will cause a server round-trip. As you can see, the effect is very seamless and easy to achieve with this preview.
As easy as this is, I do have some reservations about the current implementation of tier-splitting, which rather than spend more time repeating here I’ll just direct you to the blog posts, here and here.
Conclusion
All in all, I think Volta is a very exciting technology with some real potential benefits for developers. The more time developers can concentrate on solving the real business problems rather than writing the plumbing the better. I also think Volta has to be seen for what it is at the moment – a technology preview. This is not a finished product, but an idea with a bunch of implementations that are applicable to different scenarios; some of which are very compelling. That said, it clearly has a long way to go before whatever Volta becomes is released. Now is a great time to pull down the bits and experiment with how you could conceptually use this technology. Send feedback to the team – this is exactly why they released the preview. We have a chance to influence the direction of a potentially very powerful technology.
Related articles
Related discussion
-
VS.NET/sql server installation problem
by daspeac (4 replies)
-
Unable to access AxInterop.AcoPdflib.dll on 64 bit OS
by Shaila14041981 (0 replies)
-
connect to .dbf files
by daspeac (5 replies)
-
Binary Studio | software development outsourcing Ukraine
by shane124 (4 replies)
-
Research topic in software
by reachsangeethamathew (0 replies)
Related podcasts
-
More jQuery in ASP.NET
In this episode Chris Brandsma, Rick Strahl, Dave Ward, Bertrand Le Roy, and Scott Koon conclude their discussion of Microsoft's jQuery in ASP.NET announcement1.This episode of the Alt.NET Podcast is brought to you by LLBLGen Pro, the most mature O/R mapper and code generator out there.Are ...
Events coming up
-
Dec
9
GL.net Group Meeting - December 2009
Gloucester, United Kingdom
The beginning of this year holiday season will belong to mocks. Ronnie and Stephen will take us for a tour around exciting world of unit testing.
This thread is for discussions of The Zen of Volta.