Professional JavaScript | 16 | WebReference

Professional JavaScript | 16


Professional JavaScript


Beyond basic objects and syntax in JavaScript lurk some powerful and flexible features. Although the language easily and simply supports basic and trivial scripts, the scriptwriter can expand his horizons well past that if required. Support for Object-Oriented programming, including exceptions and inheritance lets the JavaScript language stand tall with the best. Self-evaluation of data as code and vice versa mean that JavaScript is even more amenable to advanced mobile code architectures than popular languages such as C++ and Java.

With the 'ECMAScript 2' standard still under development in late 1999 it is certain that these features will be standardized once the new version of the language is launched. Nevertheless, prototype and scope chains are fairly fundamental to JavaScript and can be relied upon almost everywhere.

Regardless of these advanced features, the basic language is still almost useless taken purely by itself. A host environment is needed in order for the interpreter to have an application domain to work with. Such a domain (e.g. web browsers) can be so interesting in its own right that high-end features of the language are entirely forgotten in the excitement. When that domain has been pushed beyond its obvious uses, advanced JavaScripters turn back to the more subtle language features for inspiration, innovation and solutions. In the meantime, the rest of this book considers those host applications – browsers, servers, shells, custom applications and others – and JavaScript's general role in extending their utility.

Created: February 21, 2001
Revised: February 26, 2001