Chapter 3. JavaScript for Ajax developers
In this chapter:
- JavaScript basics
- The JSON data format
- Object-oriented patterns in JavaScript
- Reflection on client objects
- Exposing events in JavaScript objects
Established in 1995 and initially integrated into the Netscape Navigator browser, JavaScript was capable of validating web-page user input without refreshing. Microsoft later packaged its own version, JScript, in Internet Explorer 3.0. In the following years, the language evolved, and developers began using it in conjunction with the Document Object Model (DOM) for Dynamic HTML pages. In 1998, the language was standardized as ECMAScript to facilitate the release of different versions.
Some JavaScript characteristics (weak typing, prototyping, the use of first-class functions), although typical for functional languages, may scare a programmer who works mostly with an object-oriented language like Java or C#. On the other hand, JavaScript has been used effectively to write complex and extraordinary client controls. You’ll soon discover why JavaScript is now the language of choice among Ajax developers.