Microsoft creates GWT clone

Microsoft creates GWT clone

Summary: While the GWT conference was going on in San Francisco, Microsoft announced its own take on the concept: Volta. GWT compiles Java source code into Javascript, and now Volta does the same thing for C# and other .NET languages. A technology preview is available now, but it has a few rough edges.

SHARE:

Microsoft creates GWT cloneWhile the GWT conference was going on in San Francisco, Microsoft announced its own take on the concept: Volta. GWT compiles Java source code into Javascript, and now Volta does the same thing for C# and other .NET languages. "JavaScript is just an assembly language," says Live Labs product manager Alex Daley.

Erik Meijer goes into more detail in an OOPSLA paper called "Democratizing The Cloud" (pdf):

We pick the .NET Common Language Runtime (CLR) as our universal computation model. We prefer, of course, to use the already available CLR implementation on each respective tier: SQLCLR on the data-tier; regular CLR on the middle-tier; and Silverlight for Web-clients, or the regular CLR for desktop clients.

When no CLR is on hand, we use the materials already available in the room. On the data-tier we compile MSIL to SQL. This is the approach currently taken by LINQ-to-SQL and LINQ-to-Entities. On the client-tier we compile MSIL to JavaScript or Flash. This is the approach taken by Volta. The upshot is that we uniformly provide (the illusion of) the .NET platform on each tier, in effect stretching it to cover the Cloud. Application programmers only need to care that they can run MSIL everywhere, not about how this is technically accomplished under the hood.

Getting Started To use Volta, you first need to install Visual Studio 2008. Create a new Volta project using the wizards provided, design a regular-looking HTML web page, define your business logic in C#, and then add some boilerplate code that associates your web components (such as an Input box) with C# variables. If you publish the project at this point, all the object code produced by the C# compiler (MSIL) will be converted into Javascript resulting in a client-only application that runs in the browser. Like GWT, Volta provides a subset of the standard class library for code running on the client.

To split the program between client and server tiers, you flip a switch and add the "[RunAtOrigin()]" annotation in the source code to indicate which classes that you want to run on the server. Then just rebuild and poof, all the RPC/Web service stuff is taken care of for you. This is one area where Volta differentiates itself from GWT. In GWT, the client/server split is explicitly written into the code by the programmer. Another difference is that remote calls in Volta are synchronous by default but GWT's remote calls are asynchronous by default. Asynchronous calls require a little extra code to implement but result in a better experience for the user.

By setting another option you can have your Volta application cut trace records for later analysis in the WCF Service Trace Viewer Tool. This tool gives you an easy way to view, group, and filter traces so you can diagnose and repair issues in a multi-tier environment.

Word Worm sample

Microsoft labels Volta as "experimental" at this point so there are a few rough edges. For example, every class used in your application will be a separate download from the server. This means currently you can expect Volta apps to be much slower than GWT apps, at least the first time you run them. When I tried the online WordWorm sample, Firefox 2 put up a dialog saying the script was unresponsive (see above). On Internet Explorer it worked but took over a minute to start up. According to Microsoft they plan to make this smarter in future versions.

Analysis If Volta had been released two years ago it would have been revolutionary. At this point, though, Microsoft is playing catch-up with Google and Adobe. Volta also sends a confusing message to .NET developers targeting the browser. Silverlight 1.1 is supposed to include a full .NET environment inside the browser for multiple platforms. Now with Volta you can get "the illusion of" the same thing without a plug-in. So why do you need Silverlight?

Another concern developers will have is Microsoft's commitment to browsers other than Internet Explorer. If, for example, a new browser or operating system came out that broke GWT, then the source code is available so you could fix it yourself if Google's GWT team wasn't fast enough. That's not an option with Volta.

The Volta technology preview is available for download now at Microsoft Live Labs. The current version supports Internet Explorer and Firefox only.

Topics: Software, Browser, Enterprise Software, Microsoft, Open Source, Software Development

Ed Burnette

About Ed Burnette

Ed Burnette is a software industry veteran with more than 25 years of experience as a programmer, author, and speaker. He has written numerous technical articles and books, most recently "Hello, Android: Introducing Google's Mobile Development Platform" from the Pragmatic Programmers.

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Talkback

3 comments
Log in or register to join the discussion
  • The "clone" strategy..

    ~ "If Volta had been released two years ago.. ..Microsoft is playing catch-up with Google and Adobe" ~
    They are, and it'll most likely be an uphill battle, too as those two giants focus on newer and progressively more powerful versions.

    Bill Burke
    http://wirelessspeech.blogspot.com
    a_chameleon
    • MS: Start late, catch-up, over take. - Nothing new here!

      Playing catch-up is not that big of a deal to MS. There are been plenty of technologies where they started behind and now are even or on top. I kind of like that strategy. They have the time and resources to gain ground on the competition so quickly. They seem to lay low to see what finally reaches the top, then uses all the gaffs and errors, that the competition made to get there, as stepping stones. When they do finally come out, they usually have a pretty good product; I didn't way perfect product. :-)
      andrej770
  • Nothing to get Surprised!

    Hey, we are web design and development team at Techmodi.com. We have prepared many clone especially Groupon clone. We suppose that there is nothing new and wrong in it except the big name MS. MS launched plenty of technologies. They are capable of doing almost every thing. So now its will be battle for a powerful version but no longer a clone issue!
    techmodi