Javascript standards...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ian

    Javascript standards...

    Hi there,

    Can anybody tell me where I can find a standards documents like you have in
    c#.

    I am trying to write javascript and would like to know what standards are
    i.e.

    Where to put the javascript function i.e. in Head , Body or Below?

    WHen to use pascal casing i.e. variables etc..

    Any help would be really appreciated

    Thanks

    Ian


  • Lasse Reichstein Nielsen

    #2
    Re: Javascript standards...

    "Ian" <ianinmalaga@ho tmail.com> writes:
    [color=blue]
    > Can anybody tell me where I can find a standards documents like you have in
    > c#.[/color]

    ECMAScript:
    <URL:http://www.mozilla.org/js/language/E262-3.pdf>

    DOM:
    <URL:http://www.w3.org/TR/DOM-Level-2-Core/>
    <URL:http://www.w3.org/TR/DOM-Level-2-HTML/>
    <URL:http://www.w3.org/TR/DOM-Level-2-Events/>
    (there are a few more)
    [color=blue]
    > I am trying to write javascript and would like to know what standards are
    > i.e.
    >
    > Where to put the javascript function i.e. in Head , Body or Below?[/color]

    HTML:
    <URL:http://www.w3.org/TR/html4/>
    (Script elements can be placed in most places inside either the head
    or body elements, and nowhere else).
    [color=blue]
    > WHen to use pascal casing i.e. variables etc..[/color]

    ECMAScript is case sensitive, but there are no restrictions on the
    cases used. Traditions seems to suggests Java-like casing;

    normal variables and functions: camelCase
    constructor functions: CapitalizedCame lCase
    magic constants: ALL_CAPITALS_AN D_UNDERSCORES

    Example:
    ---
    var MAGIC_CONSTANT = 42;
    function Foo(x) {
    this.x = x;
    }
    var foo = new Foo(MAGIC_CONST ANT);
    alert(foo.x);
    ---

    The FAQ for this group is a good start for the practical application
    of all these standards and specifications:
    <URL:http://jibbering.com/faq/>
    Likewise are the browser manufacturers' documentation:

    <URL:http://devedge.netscap e.com/library/manuals/2000/javascript/1.5/reference/>
    <URL:http://www.mozilla.org/docs/dom/domref/>
    <URL:http://msdn.microsoft. com/library/default.asp?url =/library/en-us/script56/html/js56jsoriJScrip t.asp>
    <URL:http://msdn.microsoft. com/library/default.asp?url =/workshop/author/dhtml/dhtml_node_entr y.asp>

    Douglas Crockford has an overview of the language here:
    <URL:http://www.crockford.c om/javascript/survey.html>

    Good luck.
    /L
    --
    Lasse Reichstein Nielsen - lrn@hotpop.com
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    • Ivan Marsh

      #3
      Re: Javascript standards...

      On Wed, 02 Jun 2004 21:31:45 +0000, Ian wrote:
      [color=blue]
      > Hi there,
      >
      > Can anybody tell me where I can find a standards documents like you have
      > in c#.[/color]

      That's a funny question considering Micro$oft "embraced and enhanced"
      javascript which is why there is more than one "standard".

      --
      i.m.
      The USA Patriot Act is the most unpatriotic act in American history.

      Comment

      • Ian

        #4
        Re: Javascript standards...

        Cheers, great stuff!

        Just what I needed... thanks

        Ian
        "Lasse Reichstein Nielsen" <lrn@hotpop.com > wrote in message
        news:u0xtskl9.f sf@hotpop.com.. .[color=blue]
        > "Ian" <ianinmalaga@ho tmail.com> writes:
        >[color=green]
        > > Can anybody tell me where I can find a standards documents like you have[/color][/color]
        in[color=blue][color=green]
        > > c#.[/color]
        >
        > ECMAScript:
        > <URL:http://www.mozilla.org/js/language/E262-3.pdf>
        >
        > DOM:
        > <URL:http://www.w3.org/TR/DOM-Level-2-Core/>
        > <URL:http://www.w3.org/TR/DOM-Level-2-HTML/>
        > <URL:http://www.w3.org/TR/DOM-Level-2-Events/>
        > (there are a few more)
        >[color=green]
        > > I am trying to write javascript and would like to know what standards[/color][/color]
        are[color=blue][color=green]
        > > i.e.
        > >
        > > Where to put the javascript function i.e. in Head , Body or Below?[/color]
        >
        > HTML:
        > <URL:http://www.w3.org/TR/html4/>
        > (Script elements can be placed in most places inside either the head
        > or body elements, and nowhere else).
        >[color=green]
        > > WHen to use pascal casing i.e. variables etc..[/color]
        >
        > ECMAScript is case sensitive, but there are no restrictions on the
        > cases used. Traditions seems to suggests Java-like casing;
        >
        > normal variables and functions: camelCase
        > constructor functions: CapitalizedCame lCase
        > magic constants: ALL_CAPITALS_AN D_UNDERSCORES
        >
        > Example:
        > ---
        > var MAGIC_CONSTANT = 42;
        > function Foo(x) {
        > this.x = x;
        > }
        > var foo = new Foo(MAGIC_CONST ANT);
        > alert(foo.x);
        > ---
        >
        > The FAQ for this group is a good start for the practical application
        > of all these standards and specifications:
        > <URL:http://jibbering.com/faq/>
        > Likewise are the browser manufacturers' documentation:
        >
        >[/color]
        <URL:http://devedge.netscape.com/library/...pt/1.5/referen
        ce/>[color=blue]
        > <URL:http://www.mozilla.org/docs/dom/domref/>
        >[/color]
        <URL:http://msdn.microsoft.com/library/de...y/en-us/script
        56/html/js56jsoriJScrip t.asp>[color=blue]
        >[/color]
        <URL:http://msdn.microsoft.com/library/de...op/author/dhtm
        l/dhtml_node_entr y.asp>[color=blue]
        >
        > Douglas Crockford has an overview of the language here:
        > <URL:http://www.crockford.c om/javascript/survey.html>
        >
        > Good luck.
        > /L
        > --
        > Lasse Reichstein Nielsen - lrn@hotpop.com
        > DHTML Death Colors:[/color]
        <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>[color=blue]
        > 'Faith without judgement merely degrades the spirit divine.'[/color]


        Comment

        • DU

          #5
          Re: Javascript standards...

          Ian wrote:
          [color=blue]
          > Hi there,
          >
          > Can anybody tell me where I can find a standards documents like you have in
          > c#.
          >
          > I am trying to write javascript and would like to know what standards are
          > i.e.
          >
          > Where to put the javascript function i.e. in Head , Body or Below?
          >
          > WHen to use pascal casing i.e. variables etc..
          >
          > Any help would be really appreciated
          >
          > Thanks
          >
          > Ian
          >
          >[/color]

          Get yourself Mozilla (say, Mozilla 1.6)

          Mozilla is the not-for-profit behind the lightning fast Firefox browser. We put people over profit to give everyone more power online.

          Firefox is a free web browser backed by Mozilla, a non-profit dedicated to internet health and privacy.


          then go to



          and add in the sidebar these tabs:

          # JavaScript 1.5 Guide
          # JavaScript 1.5 Reference
          DOM 2 References
          CSS2.1
          HTML 4.01

          and you're ready to script. You'll be able to use the best Javascript
          debugger there is (Venkman) and use Mozilla's DOM inspector: these are
          very powerful tools.

          DU

          Comment

          • DU

            #6
            Re: Javascript standards...

            Lasse Reichstein Nielsen wrote:
            [color=blue]
            > "Ian" <ianinmalaga@ho tmail.com> writes:
            >
            >[color=green]
            >>Can anybody tell me where I can find a standards documents like you have in
            >>c#.[/color]
            >
            >
            > ECMAScript:
            > <URL:http://www.mozilla.org/js/language/E262-3.pdf>
            >
            > DOM:
            > <URL:http://www.w3.org/TR/DOM-Level-2-Core/>
            > <URL:http://www.w3.org/TR/DOM-Level-2-HTML/>
            > <URL:http://www.w3.org/TR/DOM-Level-2-Events/>
            > (there are a few more)
            >
            >[color=green]
            >>I am trying to write javascript and would like to know what standards are
            >>i.e.
            >>
            >>Where to put the javascript function i.e. in Head , Body or Below?[/color]
            >
            >
            > HTML:
            > <URL:http://www.w3.org/TR/html4/>
            > (Script elements can be placed in most places inside either the head
            > or body elements, and nowhere else).
            >
            >[color=green]
            >>WHen to use pascal casing i.e. variables etc..[/color]
            >
            >
            > ECMAScript is case sensitive, but there are no restrictions on the
            > cases used. Traditions seems to suggests Java-like casing;
            >
            > normal variables and functions: camelCase
            > constructor functions: CapitalizedCame lCase
            > magic constants: ALL_CAPITALS_AN D_UNDERSCORES[/color]

            I think chosing meaningful, self-explanatory identifiers is much more
            important than case. Also, prefixing to indicate the type of variable is
            helpful when debugging. E.g.:

            var strWindowName = "ProductDescrip tion";
            var intTableRowsCol lection = document.getEle mentById("idTab le").rows;
            function ModifyTextNode( strIdNode, strNewText)

            are much more useful, clear, explicit, helpful in the short and long run
            than

            prod = "Product"
            rows = document.getEle mentById("table ").rows;
            function newtext(text, text2)
            [color=blue]
            >
            > Example:
            > ---
            > var MAGIC_CONSTANT = 42;[/color]

            "You can create a read-only, named constant with the const keyword."


            DU
            [color=blue]
            > function Foo(x) {
            > this.x = x;
            > }
            > var foo = new Foo(MAGIC_CONST ANT);
            > alert(foo.x);
            > ---
            >
            > The FAQ for this group is a good start for the practical application
            > of all these standards and specifications:
            > <URL:http://jibbering.com/faq/>
            > Likewise are the browser manufacturers' documentation:
            >
            > <URL:http://devedge.netscap e.com/library/manuals/2000/javascript/1.5/reference/>
            > <URL:http://www.mozilla.org/docs/dom/domref/>
            > <URL:http://msdn.microsoft. com/library/default.asp?url =/library/en-us/script56/html/js56jsoriJScrip t.asp>
            > <URL:http://msdn.microsoft. com/library/default.asp?url =/workshop/author/dhtml/dhtml_node_entr y.asp>
            >
            > Douglas Crockford has an overview of the language here:
            > <URL:http://www.crockford.c om/javascript/survey.html>
            >
            > Good luck.
            > /L[/color]

            Comment

            • Lasse Reichstein Nielsen

              #7
              Re: Javascript standards...

              DU <drunclear@hotW IPETHISmail.com > writes:
              [color=blue]
              > I think chosing meaningful, self-explanatory identifiers is much more
              > important than case.[/color]

              Definitly, but one does not preclude the other.
              [color=blue]
              > Also, prefixing to indicate the type of variable
              > is helpful when debugging. E.g.:[/color]

              I'll never get used to that, though. Probably because I'm too used
              to write in a language with declared types.
              [color=blue]
              > "You can create a read-only, named constant with the const keyword."
              > http://devedge.netscape.com/library/...t.html#1012982[/color]

              Great for people using JavaScript 1.5, but who is that?

              It's not part of ECMAScript v3, and probably only works in Gecko based
              browsers (definitly doesn't work in IE 6 or Opera 7.5 - I'm not able
              to check Safari or other KHTML-based browsers).

              /L
              --
              Lasse Reichstein Nielsen - lrn@hotpop.com
              DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
              'Faith without judgement merely degrades the spirit divine.'

              Comment

              • Lee

                #8
                Re: Javascript standards...

                DU said:
                [color=blue]
                >I think chosing meaningful, self-explanatory identifiers is much more
                >important than case. Also, prefixing to indicate the type of variable is
                >helpful when debugging. E.g.:
                >
                >var strWindowName = "ProductDescrip tion";
                >var intTableRowsCol lection = document.getEle mentById("idTab le").rows;
                >function ModifyTextNode( strIdNode, strNewText)[/color]

                Taken to an extreme, prefixing can make it much more difficult to
                read the code. I would suggest to use it when (a) the name doesn't
                otherwise make it obvious, and (b) the variable is used more than a
                few lines away from where it is assigned, and (c) the type matters.
                It's usually more readable to incorporate clues into the name,
                rather than use a prefix, anyway:

                var windowName = "Product Description";
                var today = new Date();
                var todayString = today.getLocale String();
                var thisMonthName = monthName[today.getMonth( )];
                function modifyTextNode( nodeId, newText)

                A variable that claims to be a "Name" or to be "Text" only needs to
                have its type specified if it is NOT a string.

                Similarly a variable named nodeId should be suitable for use as an
                argument to getElementById( ), unless a nodeId is obviously something
                else in the context of the code.

                Comment

                • Grant Wagner

                  #9
                  Re: Javascript standards...

                  Ivan Marsh wrote:
                  [color=blue]
                  > On Wed, 02 Jun 2004 21:31:45 +0000, Ian wrote:
                  >[color=green]
                  > > Hi there,
                  > >
                  > > Can anybody tell me where I can find a standards documents like you have
                  > > in c#.[/color]
                  >
                  > That's a funny question considering Micro$oft "embraced and enhanced"
                  > javascript which is why there is more than one "standard".[/color]

                  No, there is a single standard (<url:
                  http://www.ecma-international.org/pu...s/Ecma-262.htm />). All
                  implementations of ECMAScript vary a little from the standard.

                  As for "embracing and extending", I recently discovered that the RegExp()
                  object as defined in the ECMAScript standards has no "compile()" method, yet
                  practically every implementation of JavaScript (including Opera and Mozilla,
                  which claim to be the most standards compliant browsers) support a "compile()"
                  method on objects created using "new RegExp()". So if Microsoft is being
                  blamed for "embracing and extending" JavaScript, I guess Mozilla and Opera are
                  guilty of this as well.

                  You also might be referring to the DOMs of the various browsers, which do
                  differ, and have since Netscape 4 introduced the proprietary <layer> tag and
                  it's associated entries in the DOM hierarchy (which came before Microsoft
                  added the document.all collection to IE 4). However, the discussion of
                  proprietary DOMs is irrelevant to the discussion of ECMAScript the language.

                  --
                  | Grant Wagner <gwagner@agrico reunited.com>

                  * Client-side Javascript and Netscape 4 DOM Reference available at:
                  *


                  * Internet Explorer DOM Reference available at:
                  *
                  Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.


                  * Netscape 6/7 DOM Reference available at:
                  * http://www.mozilla.org/docs/dom/domref/
                  * Tips for upgrading JavaScript for Netscape 7 / Mozilla
                  * http://www.mozilla.org/docs/web-deve...upgrade_2.html


                  Comment

                  • Ivan Marsh

                    #10
                    Re: Javascript standards...

                    On Fri, 04 Jun 2004 15:20:27 +0000, Grant Wagner wrote:
                    [color=blue]
                    > Ivan Marsh wrote:
                    >[color=green]
                    >> On Wed, 02 Jun 2004 21:31:45 +0000, Ian wrote:
                    >>[color=darkred]
                    >> > Hi there,
                    >> >
                    >> > Can anybody tell me where I can find a standards documents like you
                    >> > have in c#.[/color]
                    >>
                    >> That's a funny question considering Micro$oft "embraced and enhanced"
                    >> javascript which is why there is more than one "standard".[/color]
                    >
                    > No, there is a single standard (<url:
                    > http://www.ecma-international.org/pu...s/Ecma-262.htm
                    > />). All implementations of ECMAScript vary a little from the standard.[/color]

                    Standard is in quotes in my post, indicating that what I was talking about
                    are not true standards but the standards being used.

                    Embrace and enhance is how MS screws up everything it gets it's hands on
                    (tcp/ip, javascript, java, etc...).

                    Javascript pre-dates the ECMA standard and Netscape/Mozilla are
                    responsible for the ECMA standard existing.

                    --
                    i.m.
                    The USA Patriot Act is the most unpatriotic act in American history.

                    Comment

                    • Grant Wagner

                      #11
                      Re: Javascript standards...

                      Ivan Marsh wrote:
                      [color=blue]
                      > On Fri, 04 Jun 2004 15:20:27 +0000, Grant Wagner wrote:
                      >[color=green]
                      > > Ivan Marsh wrote:
                      > >[color=darkred]
                      > >> On Wed, 02 Jun 2004 21:31:45 +0000, Ian wrote:
                      > >>
                      > >> > Hi there,
                      > >> >
                      > >> > Can anybody tell me where I can find a standards documents like you
                      > >> > have in c#.
                      > >>
                      > >> That's a funny question considering Micro$oft "embraced and enhanced"
                      > >> javascript which is why there is more than one "standard".[/color]
                      > >
                      > > No, there is a single standard (<url:
                      > > http://www.ecma-international.org/pu...s/Ecma-262.htm
                      > > />). All implementations of ECMAScript vary a little from the standard.[/color]
                      >
                      > Standard is in quotes in my post, indicating that what I was talking about
                      > are not true standards but the standards being used.[/color]

                      If it's not the true standard, then it's not a standard.
                      [color=blue]
                      > Embrace and enhance is how MS screws up everything it gets it's hands on
                      > (tcp/ip, javascript, java, etc...).[/color]

                      Exactly how has Microsoft "screwed up" tcp/ip, javascript and java? Nevermind,
                      whatever you write will be a combination of mis-information and your bias
                      against Microsoft formed from years of reading slashdot.org.

                      As for ECMAScript, JScript (now JScript.NET) conforms to the ECMA-262 standard
                      as documented by <url:
                      Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.

                      />. If you as a developer are about to use some feature of JScript and are
                      concerned about compatibility with other browsers, you'd want to check that
                      feature against the list presented at <url:
                      Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.

                      />.
                      [color=blue]
                      > Javascript pre-dates the ECMA standard and Netscape/Mozilla are
                      > responsible for the ECMA standard existing.[/color]

                      If this is the case, one would think that Mozilla's implementation of
                      ECMAScript would be 100% compliant, yet Javascript in Mozilla includes
                      RegExp.prototyp e.compile(), something which also pre-dates ECMAScript, but
                      something that is not in ECMA-262. Which brings me back to my original
                      statement: "All implementations of ECMAScript vary a little from the
                      standard."

                      --
                      | Grant Wagner <gwagner@agrico reunited.com>

                      * Client-side Javascript and Netscape 4 DOM Reference available at:
                      *


                      * Internet Explorer DOM Reference available at:
                      *
                      Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.


                      * Netscape 6/7 DOM Reference available at:
                      * http://www.mozilla.org/docs/dom/domref/
                      * Tips for upgrading JavaScript for Netscape 7 / Mozilla
                      * http://www.mozilla.org/docs/web-deve...upgrade_2.html


                      Comment

                      • Ivan Marsh

                        #12
                        Re: Javascript standards...

                        On Fri, 04 Jun 2004 18:14:54 +0000, Grant Wagner wrote:
                        [color=blue]
                        > Ivan Marsh wrote:
                        >[color=green]
                        >> On Fri, 04 Jun 2004 15:20:27 +0000, Grant Wagner wrote:
                        >>[color=darkred]
                        >> > Ivan Marsh wrote:
                        >> >
                        >> >> On Wed, 02 Jun 2004 21:31:45 +0000, Ian wrote:
                        >> >>
                        >> >> > Hi there,
                        >> >> >
                        >> >> > Can anybody tell me where I can find a standards documents like
                        >> >> > you have in c#.
                        >> >>
                        >> >> That's a funny question considering Micro$oft "embraced and
                        >> >> enhanced" javascript which is why there is more than one "standard".
                        >> >
                        >> > No, there is a single standard (<url:
                        >> > http://www.ecma-international.org/pu...s/Ecma-262.htm
                        >> > />). All implementations of ECMAScript vary a little from the
                        >> > standard.[/color]
                        >>
                        >> Standard is in quotes in my post, indicating that what I was talking
                        >> about are not true standards but the standards being used.[/color]
                        >
                        > If it's not the true standard, then it's not a standard.[/color]

                        Technology exists before the certified standards that describe it.

                        It may not be a certified standard by a standards board like ISO IEEE or
                        ECMA but if you create a technology and release documentation describing
                        how others can use it you've created a standard.

                        In cronological order:

                        Windows 3.1

                        Winsock

                        Netscape Browser

                        Javascript

                        Release of javascript language and Netscape DOM specification

                        Win 95 w/internet explorer with incompatible DOM and Javascript

                        Now there is more than one javascript specification to deal with.
                        [color=blue][color=green]
                        >> Embrace and enhance is how MS screws up everything it gets it's hands
                        >> on (tcp/ip, javascript, java, etc...).[/color]
                        >
                        > Exactly how has Microsoft "screwed up" tcp/ip, javascript and java?
                        > Nevermind, whatever you write will be a combination of mis-information
                        > and your bias against Microsoft formed from years of reading
                        > slashdot.org.[/color]

                        Ah... you're just going to call me a liar rather than realize you're
                        wrong?

                        MS uses Embrace and Enhance as a strategy to kill competitive technology.

                        MS's tcp/ip stack is not compliant with the RFC (though I doubt that has
                        anything to do with EandE).

                        Javascript was the same across all browsers until IE was released.

                        Java was a write once run anywhere language until MS wrote their version
                        of Java... or did you miss that whole thing between Sun and MS? or the DOJ
                        trials?
                        [color=blue]
                        > As for ECMAScript, JScript (now JScript.NET) conforms to the ECMA-262
                        > standard as documented by <url:
                        > http://msdn.microsoft.com/library/en...mafeatures.asp
                        > />. If you as a developer are about to use some feature of JScript and
                        > are concerned about compatibility with other browsers, you'd want to
                        > check that feature against the list presented at <url:
                        > http://msdn.microsoft.com/library/en...mafeatures.asp
                        > />.
                        >[color=green]
                        >> Javascript pre-dates the ECMA standard and Netscape/Mozilla are
                        >> responsible for the ECMA standard existing.[/color]
                        >
                        > If this is the case, one would think that Mozilla's implementation of
                        > ECMAScript would be 100% compliant, yet Javascript in Mozilla includes
                        > RegExp.prototyp e.compile(), something which also pre-dates ECMAScript,
                        > but something that is not in ECMA-262.[/color]
                        [color=blue]
                        > Which brings me back to my original statement: "All implementations of
                        > ECMAScript vary a little from the standard."[/color]

                        I never suggested this statement was incorrect... it is however irrelivent
                        to the subject because Netscape/Mozilla's implimentation of the language
                        existed before the ECMA standard.

                        The history of JavaScript (unless you think O'Reily lies too):
                        Build the skills your teams need. Give them the O'Reilly learning platform and equip them with the resources that drive business outcomes.


                        An Excerpt:

                        "ECMAScript : an attempt at standardization

                        The introduction of IE3 and its unfortunate lack of support for the
                        document.images array led Netscape and Sun to standardize the language
                        with help from the European Computer Manufacturers Association (ECMA),
                        giving us yet another name for what had by now become a strange hybrid of
                        powerful and universally supported core functionality and often
                        incompatible object models: ECMAScript. Standardization was begun in
                        conjunction with ECMA in November 1996 and adopted in June 1997 by ECMA
                        and by ISO in April 1998.

                        In the meantime, as ECMAScript was being standardized (but unfortunately
                        neglecting everything but the core language), Netscape and Microsoft
                        introduced the 4.0 browser generation, each browser with its own
                        completely proprietary document object model, and "Dynamic HTML" became
                        the next morass into which JavaScript's good heart was dragged."

                        --
                        i.m.
                        The USA Patriot Act is the most unpatriotic act in American history.

                        Comment

                        • Jim Ley

                          #13
                          Re: Javascript standards...

                          On Fri, 04 Jun 2004 16:17:52 -0500, "Ivan Marsh" <annoyed@you.no w>
                          wrote:[color=blue]
                          >Javascript was the same across all browsers until IE was released.[/color]

                          no it wasn't it was different between version 2 and 3 of Netscape, but
                          the single vendor "same" doesn't really matter much.
                          [color=blue]
                          >I never suggested this statement was incorrect... it is however irrelivent
                          >to the subject because Netscape/Mozilla's implimentation of the language
                          >existed before the ECMA standard.[/color]

                          Mozilla didn't even exist before the standard.
                          [color=blue]
                          >In the meantime, as ECMAScript was being standardized (but unfortunately
                          >neglecting everything but the core language),[/color]

                          nope, quite right too, standardise what's relevant to the language not
                          the wider world.

                          Now I'll agree that DOM standardisation hasn't gone well and the lack
                          of any DOM activity at the W3 now is bad, it's not something we can
                          blame ECMA on.

                          Jim.
                          --
                          comp.lang.javas cript FAQ - http://jibbering.com/faq/

                          Comment

                          • Ivan Marsh

                            #14
                            Re: Javascript standards...

                            On Sun, 06 Jun 2004 20:40:07 +0000, Jim Ley wrote:
                            [color=blue][color=green]
                            >>I never suggested this statement was incorrect... it is however
                            >>irrelivent to the subject because Netscape/Mozilla's implimentation of
                            >>the language existed before the ECMA standard.[/color]
                            >
                            > Mozilla didn't even exist before the standard.[/color]

                            My above statement refers to the organization not the browser.

                            Look at the Netscape 1.0 browser... it reports as Mozilla.

                            --
                            i.m.
                            The USA Patriot Act is the most unpatriotic act in American history.

                            Comment

                            • Grant Wagner

                              #15
                              Re: Javascript standards...

                              Ivan Marsh wrote:
                              [color=blue][color=green]
                              > > Exactly how has Microsoft "screwed up" tcp/ip, javascript and java?
                              > > Nevermind, whatever you write will be a combination of mis-information
                              > > and your bias against Microsoft formed from years of reading
                              > > slashdot.org.[/color]
                              >
                              > Ah... you're just going to call me a liar rather than realize you're
                              > wrong?[/color]

                              I'm not calling you a liar, I'm asking for clarification. The fact that you can't
                              provide any indicates you are simply parroting what others have told you.
                              [color=blue]
                              > MS uses Embrace and Enhance as a strategy to kill competitive technology.[/color]

                              So everything they do must be a variant of embrace and enhance (it's "embrace,
                              extend and extinguish" <url: http://zdnet.com.com/2100-11-512681.html?legacy=zdnn />
                              by the way), and is, if you just look hard enough and apply the concept to enough
                              coincidences. Because Microsoft is The Evil Empire!
                              [color=blue]
                              > MS's tcp/ip stack is not compliant with the RFC (though I doubt that has
                              > anything to do with EandE).[/color]

                              "the RFC"? TCP/IP is a suite of protocols, which RFC(s) do you refer to precisely?
                              RFC 791 Internet Protocol? RFC 793 Transmission Control Protocol? RFC 768 User
                              Datagram Protocol? RFC 792 Internet Control Message Protocol? others? And in
                              _exactly_ what (damaging) ways does Microsoft's suite of protocol(s) vary from the
                              RFC(s)?

                              Besides, variation from "the RFC" isn't embrace and enhance[sic] to extinguish
                              TCP/IP unless it has a damaging affect on the way TCP/IP works on the Internet, or
                              Windows machines in particular. The fact that millions of Windows computers
                              world-wide interact on the Internet without bringing it or themselves to their knees
                              seems to point to the fact that whatever differences Microsoft has included are not
                              fatal to the operation of the Internet or their own interaction with it.

                              As I said, whatever you write will be a combination of mis-information (refering to
                              "the [TCP/IP] RFC") and your bias against Microsoft formed from years of reading
                              slashdot.org ("MS uses Embrace and Enhance as a strategy to kill competitive
                              technology" - which was said - and misquoted by you - by _one_ person 6 years ago).
                              [color=blue]
                              > Javascript was the same across all browsers until IE was released.[/color]

                              Since Java(Live)scrip t only existed in Netscape browsers before IE supported
                              JScript, I guess that's a true enough statement. Once someone else released an
                              implementation of Javascript it could no longer be "the same" because it runs on
                              another user agent. Not including the document.images collection [below] was more a
                              question of the timing of the release of JScript in IE3, rather then any deliberate
                              act to do damage to Java(Live)scrip t. I'm sure if Microsoft had had time, they would
                              have wanted to include all the functionality of the original Java(Live)scrip t, since
                              at that point it became a feature race.
                              [color=blue]
                              > Java was a write once run anywhere language until MS wrote their version
                              > of Java... or did you miss that whole thing between Sun and MS? or the DOJ
                              > trials?[/color]

                              Java compiled with Sun's Java 1.1.x compilers runs on Microsoft's JVM, Java compiled
                              with J++ with Microsoft extensions enabled does not run on other Virtual Machines.
                              Avoid the extensions and the code runs elsewhere. Sun managed to convince the courts
                              that somehow developers compiling Java with extensions to make it run more
                              efficiently on their platform choice (or through ignorance) was damaging to them.

                              There are lots of features that are in ECMAScript now that weren't in the first
                              release of Javascript, there are some that are deprecated and some methods have
                              actually changed how they behave. None of these
                              [color=blue][color=green]
                              > > Which brings me back to my original statement: "All implementations of
                              > > ECMAScript vary a little from the standard."[/color]
                              >
                              > I never suggested this statement was incorrect... it is however irrelivent
                              > to the subject because Netscape/Mozilla's implimentation of the language
                              > existed before the ECMA standard.[/color]

                              And that's my point. If the language that inspired the standard came _before_ the
                              standard, then why doesn't the standard conform to the language which inspired it?
                              [color=blue]
                              > The history of JavaScript (unless you think O'Reily lies too):
                              > http://www.oreillynet.com/pub/a/java...s_history.html
                              >
                              > An Excerpt:
                              >
                              > "ECMAScript : an attempt at standardization
                              >
                              > The introduction of IE3 and its unfortunate lack of support for the
                              > document.images array led Netscape and Sun to standardize the language
                              > with help from the European Computer Manufacturers Association (ECMA),
                              > giving us yet another name for what had by now become a strange hybrid of
                              > powerful and universally supported core functionality and often
                              > incompatible object models: ECMAScript. Standardization was begun in
                              > conjunction with ECMA in November 1996 and adopted in June 1997 by ECMA
                              > and by ISO in April 1998.[/color]

                              document.images is part of the DOM, _not_ the language. That entire paragraph talks
                              about the _object model_ (DOM) of the various browsers. Which is different from the
                              ECMAScript _language_. The document object of which the images[] collection is a
                              member isn't even part of ECMAScript, nor is the Image() object itself. The
                              inclusion or exclusion of these user agent DOM objects and collections does not
                              dictate the level of ECMAScript compliance in the user agent.
                              [color=blue]
                              > In the meantime, as ECMAScript was being standardized (but unfortunately
                              > neglecting everything but the core language), Netscape and Microsoft
                              > introduced the 4.0 browser generation, each browser with its own
                              > completely proprietary document object model, and "Dynamic HTML" became
                              > the next morass into which JavaScript's good heart was dragged."[/color]

                              "...ECMAScr ipt was being standardized (but unfortunately neglecting everything but
                              the core language)..." wow, that's a goofy thing to say. ECMA-262 is the standard
                              for the _language_, it "neglected everything but the core language" because the only
                              thing it was a standard for was the core language. Duh.

                              If you want to complain about user agent DOM standardization , you are talking about
                              the W3C DOM standards (<url: http://www.w3.org/DOM/ />).


                              You seem to be arguing that JScript implementations aren't ECMAScript compliant when
                              what you seem to mean is that the user agent DOM isn't W3C compliant. Once you
                              figure out what the point you're trying to make is, get back to me.

                              --
                              | Grant Wagner <gwagner@agrico reunited.com>

                              Comment

                              Working...