Tim Anderson's ITWriting [Valid RSS]

Tech writing blog

Blog Home RSS Archives ITWriting.com
Add to Feedburner Add to Bloglines Add to Newsgator Add to My Yahoo

May 23, 2006

Targetting the JavaScript virtual machine

Posted 1528 days ago on May 23, 2006

Nikhil Kothari from Microsoft's ASP.NET team describes Script#, which translates C# code to JavaScript. It kinda looks like an answer to Google Web Toolkit, though in reality it's a personal project Kothari has been working on since late last year. Google's product is a beta, whereas Kothari's is a prototype; there's no guarantee that Script# will become an officially supported product.

The key feature of both Script# and GWT is that they translate ("compile") to JavaScript from source code in C# or Java respectively. Kothari does a good job of explaining the benefits. You get the benefits of strong typing, rich IDE support with code completion and refactoring, and clean object orientation, as well as being able to code both client and server in the same language.

What about debugging? It's generally easier to debug C# or Java than JavaScript, so this is an additional benefit. Google's project goes further than Kothari's, letting you debug the code as Java running within a customized web browser.

In both cases there's going to be a second phase of debugging where you test the generated JavaScript in a variety of browsers. This part may be more challenging, depending on the quality of the supporting library and how much you stress its capabilities. Google says GWT is for "developers who don't speak browser quirks as a second language"; but let's not skate over the possibility of intricate and obscure runtime-only bugs.

Where are we going with this?

This is the part that interests me most. What is the future of rich client applications? What runtime should we target for cross-platform apps? A while back Java was really the only player; then Macromedia Adobe started promoting Flash as a runtime engine for general applications as well as multimedia effects. Microsoft hasn't shown much interest in cross-platform .NET until recently; Kothari observes that Script# is intended as a stepping stone to WPF/E, which includes a cross-platform Common Language Runtime.

While these three jostle for position, innovations like GWT and Script# further extend what you can do with a plain old browser. In reality, the more developers can achieve with just JavaScript, the less interest they will have in depending on other runtime pieces. The rise of AJAX and JavaScript is damaging the prospects of alternate runtimes.

Tags:



No comments, be the first!


Add Comment

You are welcome to comment below. For your guidance, HTML is not supported and URLs will be displayed as plain text.

 Title

 Name

 Email - Optional, not displayed

 Website. Make Public?

Your comment

Please enter this code below:

 Code

Recent posts

Users plead with Borland to give up .NET
IE7 to be released 18th October,...
If Microsoft doesn't use UAC, why...
Google's unsettling lack of direction
Vista security: now prove it


Powered by bBlog