Saturday, December 13, 2008

So, what is Javascript?

Virtually every personal computer in the world has at least one JavaScript interpreter installed on it and in active use. JavaScript's popularity is due entirely to its role as the scripting language of all Browsers. JavaScript is a general purpose programming language that was introduced as the page scripting language for Netscape Navigator.

JavaScript is still widely believed to be a subset of Java, but it is not. The Java- prefix suggests that JavaScript is somehow related to Java, that it is a subset or less capable version of Java. JavaScript is not interpreted Java. Java is interpreted Java. JavaScript is a different language. Java was introduced by Apple into their Browsers early on, but it was too complex and it failed, often, and so Apple fell into step and delivered JavaScript as their de facto Browser language too.

JavaScript has a syntactic similarity to Java, much as Java has to C. But it is no more a subset of Java than Java is a subset of C. It is better than Java in the applications that Java was originally intended for.

JavaScript was not developed at Sun Microsystems, the home of Java. JavaScript was developed at Netscape. It was originally called LiveScript.

The -Script suffix suggests that it is not a real programming language, that a scripting language is less than a programming language. But it is really a matter of specialization. Compared to C, JavaScript trades performance for expressive power and dynamism.

As mentioned earlier the books available for Javascript are just poor, the main one we would recommend is JavaScript: The Definitive Guide

No comments: