[JavaScript General] ES と BOM と DOM
用語の整理。
[markdown]
> * [春からはじめるモダンJavaScript / ES2015 – Qiita](http://qiita.com/mizchi/items/3bbb3f466a3b5011b509)
ブラウザJavaScript != EcmaScript
– ES とは ECMAScript の略ですが、ES にはブラウザの仕様は含まれていない。
– それらは Browser Object Model(BOM, navigator や location など) や Document Object Model(DOM, document や HTMLElement など) と呼ばれる。
– よく知られているブラウザJavaScriptは、特定の暗黙のグローバル変数(window) 下で動く JavaScript と表現することもできる。
Universal JavaScript
– これは 「賢い View(Smart UI) を避ける」というドメイン駆動開発(DDD)の面でも有利である。
– モダンなJavaScriptを考えるにあたって、「DOMとロジックの責務が正しく分担されている/分割できる」というのを1つの指標としても考えても良い。
– このことから、ほとんどの jQuery Plugin はレガシーだと言ってしまうことができる。
## Browser Object Model
Wiki
> * [Browser Object Model – Wikipedia, the free encyclopedia](https://en.wikipedia.org/wiki/Browser_Object_Model)
>
> The Browser Object Model (BOM) is a browser-specific convention referring to all the objects exposed by the web browser.
> Unlike the Document Object Model, there is no standard for implementation and no strict definition, so browser vendors are free to implement the BOM in any way they wish.
MDN
> * [Using the Browser API – Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/Using_the_Browser_API)
Dotinstall
> * [#21 Browser Object Model (BOM) | 【旧版】JavaScript入門 – プログラミングならドットインストール](http://dotinstall.com/lessons/basic_javascript/421)
## Document Object Model
Wiki
> * [Document Object Model – Wikipedia, the free encyclopedia](https://en.wikipedia.org/wiki/Document_Object_Model)
>
> The Document Object Model (DOM) is a cross-platform and language-independent application programming interface that treats an HTML, XHTML, or XML document as a tree structure wherein each node is an object representing a part of the document.
MDN
> * [Introduction to the DOM – Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction)
Dotinstall
> * [#22 Document Object Model (DOM) | 【旧版】JavaScript入門 – プログラミングならドットインストール](http://dotinstall.com/lessons/basic_javascript/422)
> * [#22 DOMとは何か? | JavaScript入門 – プログラミングならドットインストール](http://dotinstall.com/lessons/basic_javascript_v2/26722)
[/markdown]