Minggu, 15 Februari 2009

Learning Javascript

Section 1.1. Twisted History: Specs and Implementations

Learning a programming language doesn't require learning its historyunless you're a language like JavaScript, whose history is reflected in web pages today.

JavaScript originated with Netscape, back when it was first developing its LiveConnect server-side development. The company wanted a scripting language that could interface with the server-side components and created one called "LiveScript." Later, after an initial partnership with Sun, owner of the Java programming language, the Netscape engineers renamed LiveScript to JavaScript, even though there was and is no connection between either programming language. Well-known JavaScript guru Steven Champeon wrote:

Rewind to early 1995. Netscape had just hired Brendan Eich away from MicroUnity Systems Engineering, to take charge of the design and implementation of a new language. Tasked with making Navigator's newly added Java support more accessible to non-Java programmers, Eich eventually decided that a loosely typed scripting language suited the environment and audience, namely the few thousand web designers and developers who needed to be able to tie into page elements (such as forms, or frames, or images) without a bytecode compiler or knowledge of object-oriented software design.

The language he created was christened "LiveScript," to reflect its dynamic nature, but was quickly (before the end of the Navigator 2.0 beta cycle) renamed JavaScript, a mistake driven by marketing that would plague web designers for years to come, as they confused the two incessantly on mailing lists and on Usenet. Netscape and Sun jointly announced the new language on December 4, 1995, calling it a "complement" to both HTML and Java.

(From "JavaScript: How Did We Get Here?" O'Reilly Network, April 2001.)

Not to be out-engineered, Microsoft countered Netscape's effort with the release of Internet Explorer and its own scripting languageVBScriptderived from the company's popular Visual Basic. Later, it also released its own version of a JavaScript-like language: JScript.

The competition between browsers and languages impacted the early adoption of JavaScript within many companies, especially as the difficult challenge of maintaining cross-browser compatible pages increasednot to mention confusion about the name.

In an effort to cut through the compatibility issues, Netscape submitted the JavaScript specification to the European Computer Manufacturer's Association (ECMA) International in 1996, to reissue it as a standardized work. Engineers from Sun, Microsoft, Netscape, and other companies holding a stake in the language were invited to participate, and the result was the release of the first ECMAScript specificationECMA-262in June 1997. Since that time, most companies that support a version of JavaScript (or JScript or ECMAScript) have agreed to, at a minimum, support ECMA-262.

You can download a PDF of ECMA-262 at http://www.ecma-international.org/publications/standards/Ecma-262.htm. It's not exciting reading, but it does make a good companion reference.


The second version of ECMA-262 was strictly a maintenance release. The third, and current, version was released in December 1999.

However, this wouldn't be JavaScript if the confusion ended with the passing of ECMA-262. Scattered about the Web is discussion of a new version of ECMAScript, designated ECMA-357. However, this isn't a new edition or version of ECMAScript; it's an extension known as E4X. The purpose of the extension is to add native XML capability to ECMA-262. ECMA-357 was published in 2004, and at this time, JavaScript 1.6 has partially implemented E4X.

What's important to remember from all of this is that many of these older versions of scripting langauges are still in use, even today. It's not uncommon to find old JScript or the earliest versions of JavaScript. To clarify all the versions of scripting languages and how they relate to one another, Table 1-1 provides an approximate correspondence between JavaScript, JScript, and ECMAScript version, and what version of each is supported by today's most popular web browsers.


Download Link....

Hacking Bios

0 komentar:

Posting Komentar

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Press Release Distribution