From: FAQ server on
-----------------------------------------------------------------------
FAQ Topic - What are object models?
-----------------------------------------------------------------------

Object models (OMs) are not part of the ECMAScript language; they
are provided by the host to allow javascript (or other scripting
language) to communicate with the host. An object model may allow
javascript to access a file system (Mac, Windows, and Linux are all
scriptable). The most common of all is the Document Object Model (DOM).
Other document types such as SVG also define scriptable DOMs,
mostly as extensions of the W3C Core DOM specification designed for use
with XML documents.


The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/

--

The sendings of these daily posts are proficiently hosted
by http://www.pair.com.

From: Peter Michaux on
On Mar 20, 6:00 pm, "FAQ server" <javascr...(a)dotinternet.be> wrote:
> -----------------------------------------------------------------------
> FAQ Topic - What are object models?
> -----------------------------------------------------------------------
>
> Object models (OMs) are not part of the ECMAScript language; they
> are provided by the host to allow javascript (or other scripting
> language) to communicate with the host. An object model may allow
> javascript to access a file system (Mac, Windows, and Linux are all
> scriptable). The most common of all is the Document Object Model (DOM).
> Other document types such as SVG also define scriptable DOMs,
> mostly as extensions of the W3C Core DOM specification designed for use
> with XML documents.

1) This is not a frequently asked question.

2) Object models are an orthogonal concept to host objects.

3) Completely within ECMAScript, I can create my own set of objects
that models a community of people. So object models are implicit in
ECMAScript.

I think this FAQ entry should be removed.

Peter
From: Garrett Smith on
Peter Michaux wrote:
> On Mar 20, 6:00 pm, "FAQ server" <javascr...(a)dotinternet.be> wrote:
>> -----------------------------------------------------------------------
>> FAQ Topic - What are object models?
>> -----------------------------------------------------------------------
>>
>> Object models (OMs) are not part of the ECMAScript language; they
>> are provided by the host to allow javascript (or other scripting
>> language) to communicate with the host. An object model may allow
>> javascript to access a file system (Mac, Windows, and Linux are all
>> scriptable). The most common of all is the Document Object Model (DOM).
>> Other document types such as SVG also define scriptable DOMs,
>> mostly as extensions of the W3C Core DOM specification designed for use
>> with XML documents.
>
> 1) This is not a frequently asked question.
>

Right.

> 2) Object models are an orthogonal concept to host objects.
>

Sure.

> 3) Completely within ECMAScript, I can create my own set of objects
> that models a community of people. So object models are implicit in
> ECMAScript.
>

The organizing of abstractions is a larger role when developing a more
sophisticated application.

> I think this FAQ entry should be removed.
>

I see value in this entry in that it differentiates between the Host
environment and built-ins.

I also see value in the part of the answer to this question that
emphasizes the "model" in Document Object Model. I see a lot of guys
will try and traverse through the DOM to build their own "model",
usually adding a large amount of additional code and overhead that
otherwise could have been avoided.

If the entry is removed, I would like to see a replacement for it.

Potential alternative question:
"What is a host object?"

A potential alternative answer to the existing question could include a
description of Object Modeling, covering some of the things mentioned,
possibly mentioning "Domain Driven Design".

Thoughts?
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/
From: Peter Michaux on
On Mar 21, 4:02 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
> Peter Michaux wrote:
> > On Mar 20, 6:00 pm, "FAQ server" <javascr...(a)dotinternet.be> wrote:
> >> -----------------------------------------------------------------------
> >> FAQ Topic - What are object models?
> >> -----------------------------------------------------------------------
>
> >> Object models (OMs) are not part of the ECMAScript language; they
> >> are provided by the host to allow javascript (or other scripting
> >> language) to communicate with the host. An object model may allow
> >> javascript to access a file system (Mac, Windows, and Linux are all
> >> scriptable). The most common of all is the Document Object Model (DOM)..
> >> Other document types such as SVG also define scriptable DOMs,
> >> mostly as extensions of the W3C Core DOM specification designed for use
> >> with XML documents.

> > I think this FAQ entry should be removed.

> If the entry is removed, I would like to see a replacement for it.
>
> Potential alternative question:
> "What is a host object?"

That is a way better question and the answer will be much more
valuable.

Peter
From: Garrett Smith on
Peter Michaux wrote:
> On Mar 21, 4:02 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
>> Peter Michaux wrote:
>>> On Mar 20, 6:00 pm, "FAQ server" <javascr...(a)dotinternet.be> wrote:
>>>> -----------------------------------------------------------------------
>>>> FAQ Topic - What are object models?
>>>> -----------------------------------------------------------------------
>>>> Object models (OMs) are not part of the ECMAScript language; they
>>>> are provided by the host to allow javascript (or other scripting
>>>> language) to communicate with the host. An object model may allow
>>>> javascript to access a file system (Mac, Windows, and Linux are all
>>>> scriptable). The most common of all is the Document Object Model (DOM).
>>>> Other document types such as SVG also define scriptable DOMs,
>>>> mostly as extensions of the W3C Core DOM specification designed for use
>>>> with XML documents.
>
>>> I think this FAQ entry should be removed.
>
>> If the entry is removed, I would like to see a replacement for it.
>>
>> Potential alternative question:
>> "What is a host object?"
>
> That is a way better question and the answer will be much more
> valuable.
>

| A host object is an object supplied by the host environment to
| complete the execution environment of ECMAScript.
|
| Examples of Host objects: `document`, `XMLHttpRequest`, and `alert`.
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/