JavaScript Advanced Path (i)--History and introduction

Source: Internet
Author: User
Tags hosting

the previous blog post is now four months, have been trying to write something helpless work relatively busy. My mentor Lao Wang in the Graduation dinner day with a breath of wine told me to insist on writing down the blog, so today determined to start this new chapter.

The reason why you want to write a series about JavaScript from scratch is due to several reasons:

1.JavaScript is the core technology of web programmer

2. Many people will use jquery to write good special effects but the JS in the inheritance, the prototype does not know much, this article is intended to let this dish and everyone together to enhance the "internal force", after all, the internal force deep in the future martial arts will be high

3. This dish in the writing blog at the same time will continue to learn JS do not understand things, and we grow together

Nonsense, first introduce several JS originator:

Brandon Aichi (Brendan eich,1961 years ~), the father of JavaScript


Douglas Crockford, JavaScript generation guru

John Resig, founder of jquery

JavaScript history:

javascript was born in 1995. Initially, its primary purpose was to handle some of the forms that were previously responsible for server-side validation. in the era when the vast majority of users are using modems to surf the Internet, users fill out a form to click Submit, wait a few 10 seconds, the server feedback to you said somewhere wrong ... At the time, it was absolutely exciting to do some basic validation on the client. The was at the forefront of technological innovation netscape (Netscape) decided to start developing a client language to handle this kind of simple verification. At that time, netscape company Brandon Aichi began to plan to release February 1995 is also used in both the browser and the server. To be completed before the release date livescript development, netscape and Span style= "color: #ff0000;" >sun Company established a development alliance. At this time, netscape in order to catch media stir java 's Hitch, temporarily Span style= "color: #ff0000;" >livescript renamed javascript , so essentially and java doesn't matter.

javascript 1.0 has been a great success, netscape followed by netscape Navigator 3 (Netscape browser) published javascript 1.1 . Later as the competitor of Microsoft in the home of the ie3 added a named jscript (the name differs in order to avoid infringement) of the JavaScript implementation. At this point there are 3 different javascript version, jscript , Netscape javascript and scriptease The javascript . javascript was finally put on the agenda as the issue of different releases became increasingly apparent.

In 1997, a proposal modelled on JavaScript1.1 was submitted to the European Association of Computer Manufacturers (Ecma,european Computer Manufactures Association the Association's Designation of Technical Committee No. 39th is responsible for standardizing it,TC39 to the major companies and programmers of other companies interested in scripting language development, after months of effort to complete the ECMA-262--defined by a name ECMAScript The standard of the new scripting language. The following year,ISO/IEC(National standardization Organization and International Electrotechnical Commission) also adopted ECMAScript as the standard (i.e. iso/iec-16262).

JavaScript implementations:

While JavaScript and ECMAScript are often used to express the same meaning, JavaScript has much more to say than ECMA-262 . A complete JavaScript implementation should consist of three parts:

1. Core (ECMAScript)

2. Document Object Model (DOM)

3. Browser object Model (BOM)

ECMAScript

ECMAScript , defined by ECMA-262 , does not have a dependency on the Web browser. A Web browser is just one of the possible hosting environments for ECMAScript implementations. ECMA-262 defines only the basis of this language , and on that basis it is possible to build a more complete scripting language. Speaking back to the host, it not only provides basic JavaScript implementations, but also provides extensions to the language, such as the DOM. Other hosting environments also include Node and Adobe Flash.

The ECMA-262 standard mainly stipulates the following components of the language:

1. Syntax, 2. Type, 3. statement, 4. keyword, 5. reserved word, 6. Operator, 7. Object.

Version of ECMAScript

  Different versions of Ecamscript are also called editions,ECMA-262 The latest version is the 5th edition , released in 2009. The 1th edition of ECAM-262 is essentially the same as the JavaScript1.1 of Netscape , except for minor changes: support for the Unicode standard, the object is platform independent.

  ECMA-262 2nd Edition is mainly the result of the editing process, no new, modified or abridged processing.

  The 3rd edition of ECMA-262 is the first real change to the standard. Modifications include string processing, error definitions, and numeric output. This version also adds support for regular expressions, new control statements,Try-catch exception handling, and minor changes around standard internationalization. The 3rd edition also marks ECMAScript as a true programming language.

  The 4th edition of ECMA-262 a comprehensive overhaul of the language. Because JavaScript is becoming more popular on the web. Developers have suggested revisions to ECMAScriptto enable them to meet growing web development needs. The ECMA TC39 re-convened the relevant people to plan, and as a result, the standards were almost entirely defined on the basis of the 3rd edition of a new language. The 4th edition contains not only strongly typed variables, new statements and new data structures, but also real classes and classic inheritance. It also defines a new way to interact with the data. At this point, a team inTC39 that the 4th version of the language to bring the leap too big, they put forward ECMAScript 3.1 Alternative suggestions, the proposal only a few improvements to the language. Eventually, the ES3.1 subsidiary Committee received more support than TC39, andECMA-262 4th was abandoned before the official release. ECMAScript 3.1 eventually became the 5th edition of ECMA-262 and was officially released on December 3, 2009. Version 5th seeks to clarify known ambiguities in version 3rd and adds new features, including native JSON objects, inherited methods and advanced attribute definitions, and strict patterns.

Document Object Model (DOM)

The Document Object model is an application programming interface for XML but extended for HTML. The DOM maps the entire page into a multi-tiered node structure. Each component of an HTML or XML page is a node of a certain type, and these nodes contain different types of data.

For example, the following page:

<HTML>    <Head>                <title>Sample Page</title>    </Head>    <Body>        <P>Hello world!</P>       </Body>          </HTML>    

This can be represented by the following hierarchical node tree:

This tree of documents created by DOM, often referred to as the document tree, allows programmers to easily delete, add, modify, and manipulate any of these nodes through the API provided by the DOM.

Level of DOM:

  The DOM was formally unified planning from Microsoft and Netscape in the development of DHTML(Dynamic HTML, Dynamics HTML) on the disagreement, the advent ofDthml so that developers do not have to reload the page for the first time You can modify its contents. In order to control the Netscape and Microsoft in the field of web development, leading to a non-compatible browser situation, responsible for the development of Web communications standards (Worldwide Web Consortium, the World Wide Web Consortium) began to plan the DOM .

  DOM Level 1 became the recommended standard in October 1998. The DOM Level 1 is made up of two parts : the DOM core and Dom HTML. TheDom Core is how to map the XML-based document structure to access and manipulate the nodes in the document. dom HTML is expanded on the core of the DOM, adding objects and methods for HTML . It is important to note thatDom is not only for JavaScript, but also for many other languages. Just not in the Web, Dom has become an important part of JavaScript.

DOM Level 2 extends the mouse and user interface of the whole, scope, traverse and other subdivision modules, and through the object interface added to the CSS(cascading Style Sheets, Cascade   Style sheet) support.

  DOM Level 3 extends the DOM further, introducing methods for loading and saving documents.

Browser object Model (BOM)

Developers can use the BOM to control the browser from displaying parts of the page. The real difference in the BOM, or often the problem, is that it is part of the JavaScript implementation and doesn't have the same standards as DOM. This problem has been solved in HTML5, and HTML5 is committed to writing many BOM functions into the specification. After the release of HTML5, many of the confusion about the BOM disappeared. In essence, the BOM only handles browser windows and frames, but it is customary to count all browser-specific JavaScript extensions as part of the BOM. Here are some of these extensions:

    • Popup new browser window function; the ability to move, zoom, and close the browser window;
    • A Navigator object that provides detailed browser information;
    • A Location object that provides detailed information about the page loaded by the browser;
    • A screen object that provides detailed information about the user's display resolution;
    • (a) Support for cookies;
    • Custom objects such as XMLHttpRequest and IE's ActiveXObject (the core implementation of Ajax).

More information about the BOM will be detailed in a later blog post.

Thank you for your visit and hope to be of help to you.

Reference documents:

Nicholas C.zakas JavaScript Advanced Programming (3rd edition)

JavaScript Advanced Path (i)--History and introduction

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.