« A Shift in Microsoft's Code Names? | Main | The legal system in Harry Potter »
September 18, 2005
The Rise of Javascript
If technology companies could pick a martial art to associate themselves with, Google would surely pick Aikido. Instead of blocking attacker's movements, Aikido chooses to deflect, control and redirect the attacker's energy. Likewise, instead of expending considerable energies to build a brand new Web application platform, Google merely wove together existing technologies such as Javascript and the XMLHttpRequest object to create Google Maps and GMail, now viewed as formidable threats to the traditional model of desktop software. This move by Google has spurred considerable interest in Web-based user interface innovation. The Javascript-XMLHttpRequest combination, now catchily christened Ajax (Asynchronous Javascript And XML), will form the basis of a new framework that will debut in Microsoft's ASP.NET v2.0.
Major Internet companies have also recently built or bought products that give a user greater control over their browsing experience using client-side extensions. A month and a half ago, Yahoo! bought a small company called Konfabulator that develops so-called widgets that draw information from web sites but look and feel like applications running on the local computer. Microsoft has developed a similar product called Microsoft Gadgets. The closest direct answer that Google has to these products is the sidebar in Google Desktop 2. The Greasemonkey extension to the Firefox web browser gives users considerable control over what they want to see on their pages, and has potential to be developed into a similar platform for client-side widgets. As it so happens, the original developer of Greasemonkey is in Google's employ.
Central to the emergence of Ajax and client-side widgets has been the rise of Javascript. Javascript, born as LiveScript, was developed at Netscape Communications Corp. by Brendan Eich. Naming the language Javascript was partly a marketing ploy to whip up hype by association with the Java programming language, which was making waves all over the software community. It was also named Javascript to reflect its original intention -- to give Web developers with no formal Java training access to Netscape's Java engine and browser object model. In a sense, it was similar to the function of Visual Basic on the Windows platform. Just as developers on Microsoft's platform could avoid the arcane traps of C++ by writing in Visual Basic, Web designers could use Javascript to program for the Web while avoiding the barrier to entry that Java presented.
Javascript quickly grew to have a sophisticated object and event model. Unfortunately, it never had a powerful integrated development environment (IDE) or reliable cross-platform debugging because of the browser wars of the 90s. Programmers also perceived it as a simple-minded, second-tier language because it had a low barrier to entry and did not have features of industrial strength programming languages, such as compile-time checking. Javascript can boast of having several distinctive features of modern programming languages, such as function objects, dynamic typing, regular expressions and native support for compound data types such as hashes. Even after Java applets on client browsers withered away, Javascript's object model continued to be used in Dynamic HTML, a lightweight (read non-Macromedia Flash) technique of creating dazzling user interface effects on Web applications.
Thankfully, companies like Google recognized the tasks towards which Javascript's innate technical merits could be applied. By capitalizing on Javascript's versatile user interface event model and the power of XML to send data across the Web, it was possible to create a responsive user interface like that of Google Maps. Javascript seems to be experiencing a resurgence in the software community. There are a few things that Javascript always got right as a platform. Some of these lessons are valuable when considering what could make a new platform successful.
1. Lower barriers to entry. Make the language accessible to software types without requiring them to learn a new development environment and a new set of development tools. Structure the workflow of the language so that it is easy to create quick and dirty prototypes with it. In other words, make complex things simple to express and simple things even simpler. Dynamically typed languages work well for this kind of thing because the developer needn't worry so much about the formal type of a value as what type it should have when used in a certain syntactic context. Even if you provide a runtime environment that disallows raw memory addresses for security reasons, make it easy for developers to insert their own behaviors using concepts like events and function objects.
2. Embed. Embed. Embed. Embedding a programming language into another application gives the programming language an automatic raison d'être. There is a manifest platform against which programmers can begin coding immediately. Nobody has to come up with a conceivable use for the language because it has not been developed in a vacuum. Of course, the developers of the language should take care not to tie the language to the application in which it is embedded. Taking Javascript's case as an example, it shouldn't include native language features, such as keywords, that refer to browsers or windows.
3. Remove barriers between users and developers. Devolve control over the language's development and intended use cases to the users of the language. There should be no rigid one-way flow of technology from a privileged group of language developers to a larger set of users. The ideal goal of a platform's evolution should be to combine as much of the language's developer and user communities as possible. Passionate outreach and teaching will go much further towards this goal than traditional flashy advertising. A smart user may well come up with a use for your language that you never foresaw. Take advantage of the conversations that happen among the users in your market because users of a product can sometimes be a lot more passionate about changing it than developers who have adapted to some of its quirks. This principle may vaguely remind readers of the cluetrain manifesto. The lessons from the manifesto apply as much to technology platforms as to marketing the new wave of products.
It is said that the technology industry has matured to such an extent that completely new platforms must break through extraordinarily high inertia to make an impact. However, a smart platform still can, Aikido-like, redirect the energies of its users to propel itself to greatness.
Posted by Vishy at September 18, 2005 01:10 PM