JavaScript Quick Start-Introduction

Source: Internet
Author: User

First, JavaScript history (excerpt from W3school)

JavaScript is the most popular scripting language on the Internet, and it exists in all Web browsers around the world to enhance user interaction with Web sites and Web applications. JavaScript is the most popular scripting language on the Internet, and it exists in all Web browsers around the world to enhance user interaction with Web sites and Web applications.

Nombas and Scriptease

Probably in 1992, a company called Nombas developed an embedded scripting language called C-minus (C-minus-minus, or Cmm). The idea behind the Cmm is simple: A scripting language that is strong enough to replace macro operations, while maintaining enough similarity to C (and C + +) So developers can learn quickly. The scripting language, bundled in a shared software called Cenvi, was the first to show the power of the language to developers.

Nombas finally changed the name of the Cmm to Scriptease because the latter part (mm) sounded too negative and the letter C was "scary".

Now Scriptease has become the main driving force behind the Nombas products.

Netscape invented JavaScript.

When Netscape Navigator made a debut, Nombas developed a version of Cenvi that could be embedded in a Web page. These early experiments were called Espresso page (espresso-like pages), which represented the first client language to be used on the World Wide Web. And Nombas the idea that it would be an important cornerstone of the World Wide Web.

As web surfing becomes more prevalent, the need to develop client-side scripting is growing. At this point, most Internet users are also connected to the network only via 28.8 kbit/s modems, even when the Web page is constantly becoming larger and more complex. What is more painful to users is that, for simple forms validation, it is necessary to interact with the server multiple times. Imagine that a user fills out a form, clicks the Submit button, waits 30 seconds for processing, and sees a message telling you to forget to fill out a necessary field.

At that time, at the forefront of technological innovation, Netscape began to seriously consider developing a client-side scripting language to solve simple processing problems.

Brendan Eich, who worked at Netscape, began to develop a scripting language called Navigator for the upcoming 1995 release of Netscape LiveScript 2.0, which was intended to be used in browsers and servers (which would have been called Live WIRE) end to use it. Netscape and Sun completed LiveScript implementation in time.

Just before Netscape Navigator 2.0 was officially released, Netscape renamed it JavaScript to use Java, the Internet buzzword. Netscape's bets are finally rewarded, and JavaScript has become an essential component of the Internet.

three pillars

Because JavaScript 1.0 was so successful, Netscape released version 1.1 in Netscape Navigator 3.0. It happened that time, Microsoft decided to enter the browser, released IE 3.0 and a JavaScript version of the clone, called JScript (so named to avoid potential licensing disputes with Netscape). This important step in Microsoft's Web browser landscape is a significant step in the development of the JavaScript language, although it is notorious.

After Microsoft entered, there were 3 different versions of javascript: Netscape's JavaScript, Microsoft's JScript, and Nombas's scriptease. Unlike C and other programming languages, JavaScript does not have a standard to unify its syntax or features, and these 3 different versions highlight the problem. As the industry's fears increase, the standardization of the language is clearly imperative.

Standardization

In 1997, JavaScript 1.1 was submitted as a draft to the European Association of Computer Manufacturers (ECMA). The 39th Technical Committee (TC39) was delegated to "standardize the syntax and semantics of a generic, cross-platform, vendor-neutral scripting language" (http://www.ecma-international.org/memento/TC39.htm). TC39, composed of programmers from Netscape, Sun, Microsoft, Borland and other companies interested in scripting, has honed ECMA-262, which defines a new scripting language called ECMAScript.

In the next few years, the International Organization for Standardization (ISO/IEC) also adopted ECMAScript as the standard (iso/iec-16262). Since then, Web browsers have struggled (albeit with varying degrees of success and failure) to ECMAScript as the basis for JAVASCRIPT implementations.

second, JavaScript implementation

The ECMAScript above is an important standard, but it is not the only part of JavaScript, and of course, it is not the only one that is standardized. In fact, a complete JavaScript implementation is made up of the following 3 different parts:

    • ECMAScript Core
    • DOM Document Object Model
    • BOM Browser Object Model
1, the content of ECMAScript
    • Grammar
    • Type
    • Statement
    • Key words
    • Reserved words
    • Operator
    • Object

ECMAScript is just a description that defines all the properties, methods, and objects of the scripting language. Other languages can use ECMAScript as a benchmark for functionality, as JavaScript does:

2. DOM (Document Object model)

The DOM is an application interface (API) for HTML and XML. The DOM will plan the entire page into a document composed of node hierarchies. The main purpose of DOM is to facilitate people's control over HTML.

Please consider the following HTML page:

  

This code can be drawn as a node-level graph using the DOM:

The DOM creates a tree to represent the document, giving developers unprecedented control over the content and structure of the document. The DOM API makes it easy to delete, add, and replace nodes.

3. BOM (Browser object model)

A BOM (Browser object model) that can be accessed and manipulated by the browser window. Using the BOM, developers can move the window, change the text in the status bar, and perform other actions that are not directly related to the content of the page. What makes a BOM unique and often questionable is that it is just a part of JavaScript and does not have any relevant standards.

The BOM mainly deals with browser windows and frames, but usually browser-specific JavaScript extensions are considered part of the BOM. These extensions include:

    • Pop up a new browser window
    • Move, close, and resize a browser window
    • Anchor object that provides details about the Web browser
    • Screen object that provides detailed information about the user's screen resolution
    • Support for Cookies
    • IE expands the BOM, joins the ActiveXObject class, and can instantiate ActiveX objects through JavaScript

Because there is no relevant BOM standard, each browser has its own BOM implementation. There are some de facto criteria, such as having a Window object and a navigation object, but each browser can define its own properties and methods for those objects or other objects.

    • Window Object
    • Navigator Object
    • Screen Object
    • History Object
    • Location Object
Iii. Summary

1. The emergence of Scriptease,scriptease created by Nombas company has become the driving force of JavaScript.

2, Netscape's Brendan Eich designed the JavaScript architecture. (in order to meet the company's assigned tasks, he designed the JavaScript in just 10 days.) )

3, JavaScript1.0 out, because at that time Netscape in the browser is a single big, so in JavaScript standardization is very slow. But at this time the rival Microsoft appeared, Microsoft developed a JavaScript clone version of JScript, Microsoft through his Free browser (IE) in the world to promote, in the browser to gain a large share, so Microsoft also began to implement its own standards, Hope to be able to use their own standards as the standard of the industry as a whole. Finally, Netscape was taken by Microsoft as a step-by-step, in 2003 Netscape disbanded.

4, ECMAScript standard appearance process.

  • 1997 JavaScript submission Standard Draft, June 1998, ECMAScript 2.0 release;
  • In December 1999, ECMAScript version 3.0 was released as a standard for JavaScript and was widely supported.
  • In October 2007, the draft version of ECMAScript 4.0 was released, and a major upgrade was made to version 3.0, which is expected to be released in August. After the release of the draft, due to the 4.0 version of the target is too radical, the parties to the adoption of this standard, there have been serious differences. Large companies, led by Yahoo, Microsoft, and Google, oppose a major JavaScript upgrade, advocating minor changes, and Mozilla, the JavaScript creator Brendan Eich, insists on the current draft.
  • July 2008, due to what features should be included in the next version, the parties are too divergent, the debate is too radical, the ECMA meeting decided to discontinue the development of ECMAScript 4.0, which involves a small part of the existing improvements in functionality, released as ECMAScript 3.1, while the other radical ideas are expanded to include later versions, due to the atmosphere of the Conference, this version of the project Code is named Harmony (harmony). Shortly after the meeting, ECMAScript 3.1 was renamed ECMAScript 5.
  • In December 2009, the ECMAScript 5.0 edition was officially released. The Harmony project was divided into split, and some of the more plausible assumptions were that javascript.next continued to develop and later evolved into ECMAScript 6; some are not very mature ideas, is considered a JavaScript.next.next and will be considered in the further future.
  • In June 2011, ECMAscript 5.1 was released and became an ISO international standard (IEC 16,262:2011).
  • In March 2013, the draft ECMAScript 6 was frozen and no new features were added. New functional assumptions will be placed in ECMAScript 7.
  • In December 2013, draft ECMAScript 6 was released. Then a 12-month discussion period to hear feedback from all parties.
  • June 17, 2015, ECMAScript 6 released the official version, namely ECMAScript.
  • The ECMA 39th Technical Experts Committee (Technical Committee 39, abbreviated TC39) is responsible for the development of ECMAScript standards, including Microsoft, Mozilla, Google and other large companies. TC39 's overall consideration is that ES5 is basically compatible with ES3, with the addition of larger syntax corrections and new features, which will be done by Javascript.next.

JavaScript Quick Start-Introduction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.