JavaScript

※wikipediaより引用

JavaScript is a scripting language widely used for client-side web development. It was the originating dialect of the ECMAScript standard. It is a dynamic, weakly typed, prototype-based language with first-class functions. JavaScript was influenced by many languages and was designed to look like Java, but be easier for non-programmers to work with.

Although best known for its use in websites (as client-side JavaScript), JavaScript is also used to enable scripting access to objects embedded in other applications (see below).

JavaScript, despite the name, is essentially unrelated to the Java programming language, although both have the common C syntax, and JavaScript copies many Java names and naming conventions. The language's name is the result of a co-marketing deal between Netscape and Sun, in exchange for Netscape bundling Sun's Java runtime with their then-dominant browser. The key design principles within JavaScript are inherited from the Self and Scheme programming languages.

"JavaScript" is a trademark of Sun Microsystems. It was used under license for technology invented and implemented by Netscape Communications and current entities such as the Mozilla Foundation.

JavaScript(ジャバスクリプト、ジャヴァスクリプト、ジャワスクリプト、略称:JS)はスクリプト言語である。主にWebブラウザ上で動作し、HTMLの動的書き換えや入力フォームの自動補完など、ウェブページの使用感向上を目的として使用されたり、リッチクライアントアプリケーションの構築に使われる。

文法はプロトタイプベースのオブジェクト指向型である。多くの場合は、C言語に似た手続き型言語のようなスタイルで書かれるが、関数型言語とも多くの類似点がある。近年ではその柔軟な設計が評価され、様々なアプリケーションで自動実行の用途におけるマクロ言語としても採用されている。

当初は、テキストエディタで編集するだけの簡単なアプリ構築に使われていたが、近年では、IntelliJ IDEAやSpket IDEなどにより、IDEにコード補完・編集時のリアルタイム文法チェック・リファクタリングなどの機能が搭載されるようになり、大規模開発が可能となった。また、Ajaxにおける、ブラウザ間の互換性の問題は、JavaScriptライブラリにより吸収することで、大きく解決された。さらに、ExtJSなどの本格的なGUIライブラリの登場により、デスクトップアプリと差がないアプリを作ることが可能となった。また、DWRなどのJavaScriptとサーバ間をつなぐ技術の発達により、クライアント・サーバ間の通信が著しく容易になり、また、JettyなどのアプリケーションサーバがComet利用時のメモリ使用量の削減を実現したため、サーバからクライアントへの情報のPush型の配信が実用的となった。

なおJavaとScriptの間は詰めて表記する。Javaと名前や文法が似ているためしばしば混同されるが、互換性は全くない。Javaと呼ぶ場合はプログラミング言語Javaを指すので注意が必要。名前の由来については誕生を参照。