ECMAScript is an object oriented programming language for performing computations and manipulating computational objects within a host environment.
It defines the central or core capabilities of the language and does not define any of the host defined capabilities.
As defined in the standard, ECMAScript is not intended to be self-sufficient, but should provide core functionality on top of which host objects need to be added.
Scripting languages are intended to be used by both experienced programmers and non-programmers. This means a scripting language will tend to be less formal than a compiled language and will relax the rules a little. Basically you can get away with more things than a compiler would permit.
Scripting languages are generally used to automate existing capabilities of a hosting environment. Those facilities may be already accessible under manual operation via a Graphical User Interface.
ECMAScript was originally designed to be a web scripting language to provide facilities to add dynamics to client-side browser displayed web pages.
Some of the facilities provided by ECMAScript interpreters are similar to those available in other languages such as Java, Perl and C.
Here is an extract from the ECMA second edition standard:
"This ECMA Standard is based on several originating technologies, the most well-known being JavaScript and JScript. The language was invented by Brendan Eich at Netscape and first appeared in the Netscape Navigator version 2.0 browser. It has appeared in all subsequent Netscape Navigator browsers and in all browsers from Microsoft starting with MSIE version 3.0."
The browser manufacturers go to great lengths to stress how well they comply with a standard. Microsoft and Netscape both claim compatibility with ECMAScript.
It is not always clear which revision of ECMAScript they are claiming compliance with. It is hoped that they mean edition 3 of the standard. However if they don't make this clear, they may only be edition 2 compliant.
If all the browsers you are using were 100% compliant with ECMAScript edition 3, would this then mean that you could write one version of your script and deploy it everywhere?
Unfortunately not. ECMAScript only defines the core language. It allows for the browser manufacturers adding host specific features in a compliant fashion, but it does not specify what they should be. Because the DOM implementations are so different, claiming ECMAScript compliance is almost meaningless in terms of whether you can really build portable scripts to run in web browsers.
That is not to diminish the importance of ECMAScript at all. It is the foundation on which every JavaScript interpreter should be based - without question. However, for your script to be truly portable, every other facet of the implementation must also conform strictly to the same standard.
At least we could expect browser manufacturers to comply with ECMAScript and the W3C DOM definition. That still leaves many holes in security standardization and event handling. Not to mention the new directions regarding mobile devices and TV set-top boxes, which will all lead to diverging implementations.
The event handling is being rigorously worked out as part of the DOM level 2 and level 3 standardization work.
ECMA 262 edition 2 - section - 4
ECMA 262 edition 3 - section - 4
Wrox Instant JavaScript - page - 12
Prev | Home | Next |
ECMA | Up | ECMAScript - edition 2 |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |