X
Tech

Why Google and Microsoft need Javascript compilers

In my previous post, I revealed that small Australian startup Morfik intends to vigorously defend its IP rights against the very similar Google Web Toolkit product. Both products are Javascript compilers, meaning they enable developers to program in higher level languages and then compile into Javascript.
Written by Richard MacManus, Contributor

In my previous post, I revealed that small Australian startup Morfik intends to vigorously defend its IP rights against the very similar Google Web Toolkit product. Both products are Javascript compilers, meaning they enable developers to program in higher level languages and then compile into Javascript. The main purpose of this is to utilize Ajax technologies on the Web, because there is such huge demand for that right now (the 'J' in Ajax of course standing for Javascript). So Morfik and Google now both have Javascript compilers - and Microsoft is soon to follow, as I will explain in this post.

Why are Google and Microsoft To create complex web applications, 'high-level language to Javascript' compilers have come into play.so intent on Javascript compiler technology? The simple answer is that Ajax is the number one method of achieving interactive web sites and services in today's Web. Google in particular uses Ajax extensively in its product line - e.g. the user experience of Gmail and Google Maps is achieved via Ajax. Microsoft of course is competing with Google for dominance on the Web, so if its rival is using Ajax - then Microsoft is forced to as well. Microsoft's long-term solution may well be rich apps, but in the short-to-medium term they need to compete head-on with Google - and that means doing a 'full court press' on them with Ajax.

Indeed Microsoft is at this moment developing its own Javascript compiler product too. A blog post by Nikhil Kothari, an architect on the Web Platform and Tools team at Microsoft, reveals that Microsoft is well on its way. Kothari notes that he's working on a product called Script#, which "brings the C# developer experience (programming and tooling) to Javascript/Ajax world." Apparently Script# has been a spare time project of Nikhil's, but it is now seeing the light of day. Basically Script# is a C# compiler that generates Javascript. Similar then to Morfik's JST and Google's GWT. It has Visual Studio wrapped around it, which makes it a sophisticated product - probably moreso than GWT.

Why are Google and Microsoft developing Javascript compilers?

As web applications grow more and more sophisticated, with lots of user interaction, it gets harder and harder to hand code it all in Javascript. Back when Javascript was conceived as a macro language for web pages, web apps were much less interactive than they are today. So even though it is possible to write very complex applications directly in Javascript - it is hard work and to most programmers is just not practical.

Applications such as Google's Gmail or Microsoft's Live products depend heavily on Ajax (Asynchronous Javascript And XML) - a now common Web coding technique that allows the creation of complex, interactive web pages that do not have to be completely reloaded from the web server to update. This technique, though not overly complex to implement, requires a lot of coding.

So in order to create complex web applications, as well as maintain and evolve them over time, solutions such as 'high-level language to Javascript' compilers have come into play. These products allow developers who are not familiar with Javascript - and indeed may even have no idea what Ajax is - to quickly develop complex applications by writing in the language they are already familiar with. It's the old 'write once, run anywhere' scenario. In Google's case this is Java, in Microsoft it appears C# will be the choice, and in Morfik they handle C#, Java, Pascal and Basic (for VB).

We can also see the larger J2EE vs .Net battle involved in this - Google choosing Java and Microsoft of course going with C#. So both will only support one language seriously, because they're busy fighting with each other. This possibly opens up an opportunity for Morfik, which supports more languages. Time will tell I guess.

One final thing, looking at it from a higher level - GWT allows Google to hire more Java developers to do web app coding, rather than Javascript developers. I'm no expert in the programming job market, but I'm guessing skilled Java developers are more plentiful than skilled JS developers. So GWT is a smart move for Google, because it allows them to have a much bigger pool of programming talent to choose from.

Editorial standards