Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

MS, Mozilla Clashing Over JavaScript Update

Posted by Zonk on Fri Nov 02, 2007 02:33 PM
from the minor-frustration-of-the-titans dept.
jfruhlinger writes "JavaScript has become a crucial part of Websites built on AJAX underpinnings, which makes the upcoming revision to the ECMAScript standard crucial for the future of the Web. But in today's browser environment, no one vendor can impose an update path — which may set things up for a nasty conflict. A fight is being fought on blogs between Mozilla Chief Technology Officer (and creator of JavaScript) Brendan Eich, who wants to the new ECMAScript standard to be a radical upgrade, and Chris Wilson, architect of MS's IE team, who would rather keep JavaScript as is and put new functionality into a brand-new language."
+ -
story

Related Stories

[+] Technology: ECMAScript 4.0 Is Dead 168 comments
TopSpin writes "Brendan Eich, creator of the JavaScript programming language, has announced that ECMA Technical Committee 39 has abandoned the proposed ECMAScript 4.0 language specification in favor of a more limited specification dubbed 'Harmony,' or ECMAScript 3.1. A split has existed among the members of this committee, including Adobe and Microsoft, regarding the future of what most of us know as JavaScript. Adobe had been promulgating their ActionScript 3 language as the next ECMAScript 4.0 proposal. As some point out, the split that has prevented this may be the result of Microsoft's interests. What does the future hold for Mozilla's Tamarin Project, based on Adobe's open source ActionScript virtual machine?"
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • About Silverlight? (Score:5, Insightful)

    by Kelson (129150) * on Friday November 02 2007, @02:42PM (#21215507) Homepage Journal
    Opera's Haarvard suggests that it's about Silverlight [opera.com], and Microsoft trying to close the web. Mozilla, Opera and others are pushing to extend open web technologies, but Microsoft is saying, wait, the web doesn't need to be extended at all! Well, except with Silverlight and WPF...
    • by Wylfing (144940) <brian@@@wylfing...net> on Friday November 02 2007, @03:18PM (#21216065) Homepage Journal

      Microsoft is saying, wait, the web doesn't need to be extended at all! Well, except with Silverlight and WPF

      Those are actually Brendan Eich's words. The extended commentary from which that comes is over here [mozilla.org].

      MS do indeed want to close the internet, and the name of the game is "patent encumberance." It's going to be too hard to lock up JavaScript, so they don't want to play with that anymore. They need to have everyone investing in a new MS-proprietary, patent-encumbered language.

        • by Rysc (136391) * <sorpigal@gmail.com> on Friday November 02 2007, @05:48PM (#21218089) Homepage Journal

          No Microsoft is not pushing Sliverlight and WPF here. OR saying scripting does not need to be extended. They are saying there needs something better than javascript
          It's true that this is not what Microsoft is actually saying, but you can be sure that's what they mean and want.

          Frankly anyone that thinks the present javascript is worthwhile keeping just has not programmed enough in it
          I have done a ton of work in javascript for the last decade or so, and you are very wrong. Javascript has always had its pains, but the pains are not inherent in the language and (very importantly!) these pains are rapidly going away. Throwing JS out now back before Mozilla 1.0 might have been reasonable, but by now JS support in all browsers is to a point where throwing out JS would be *stupid*.

          JS as a language is not fundamentally broken!
      • by Wylfing (144940) <brian@@@wylfing...net> on Friday November 02 2007, @03:29PM (#21216231) Homepage Journal

        And you are precisely echoing all of the lies that Brendan discredited in his post. There is absolutely nothing about ES4 that will break ES3. Nothing. Yet you (probably quite knowingly) propagate the falsehood that it will.

      • by DragonWriter (970822) on Friday November 02 2007, @04:27PM (#21217097)

        Silverlight is about competing with adobe flash, which by the way is way ahead of microsoft at the moment for the robust web app space, so why did you choose to bash Microsoft and not adobe?


        Because the story being discussed here isn't about Adobe lobbying a standards body in an effort to hold back adding new functionality to an open standard that could provide an alternative to closed add-on technologies like Silverlight and Flash.

        If it was, people would be bashing them for trying to push the dominance of their proprietary solution by holding back standard, non-proprietary technology in the exact same way that Microsoft is being criticized here.

        Microsoft wasn't criticized for having Silverlight, they were criticized for the manner in which they were perceived to be promoting Silverlight.

        Mozilla, opera and other pushing to extend open web technologies?


        Yes, they are.

        Please .... how does a fight between what version 2 of something is named have anything to do with extending open technologies?


        That's not what the dispute is over. The dispute is over whether Release 4 of ECMAScript should:
        1) Include major new functionality, or
        2) Include only minor new functionality, with major changes outside of the scope of the standard and left for other languages (either proprietary or part of different standards efforts.)

        The first position favors substantial extensions to non-proprietary, freely-implementable standards for the web. The second does not.

        Microsoft is saying we have a standard, we have products that are written to that standard, and it will be expensive to supercede that standard with a replacement.


        A new version of a standard doesn't impose costs; no one is obligated to support the new version. ECMAScript Releases 1-3 won't stop working when a specification for ECMAScript Release 4 is released.

        OTOH, more features in the standard means more that can be done within the scope of the standard and without non-standard, proprietary alternative technology.

        They have no objections to something new, just dont break the old.


        New standards, even ones that aren't backward compatible, don't break old standards. ECMAScript 3 implementations don't break just because there is an ECMAScript 4 standard.
          • by Aewyn (836766) on Friday November 02 2007, @04:27PM (#21217093)
            // TODO: Add 898 lines
            function addOneWeek(startDate) {
                var oneWeekInMilliseconds = 1000*60*60*24*7;
                return new Date(startDate.getTime() + oneWeekInMilliseconds);
            }
      • by Bitsy Boffin (110334) on Friday November 02 2007, @08:09PM (#21219717) Homepage
        Javascript is a beautiful ulimately flexible language, implementations of it (esp Microsoft's) may suck, but the language itself is very good. Learn to use it properly, prototypes, closures, higher order functions... and you will soon learn what a remarkable language for scripting it is.
  • Multithreading! (Score:5, Interesting)

    by Anonymous Coward on Friday November 02 2007, @02:43PM (#21215517)
    If they're serious about turning the browser into an application platform, there needs to be a multithreaded language with full DOM access, whether that is Javascript or something else. An application where the UI stalls the processing or the other way around is just not acceptable. Since Javascript multithreading has been rejected before, because it's supposedly too difficult for the typical script author, I suspect that Microsoft may have the right instinct here to go with a separate language for "pros", keeping Javascript simple for things like mouse rollovers and other eye candy.
      • Re:Multithreading! (Score:5, Interesting)

        by _xeno_ (155264) on Friday November 02 2007, @03:19PM (#21216101) Homepage Journal

        Surely you could solve that particular issue by running Firefox-itself code in one thread, and on-page-javascript-or-whatever-script in another thread (or perhaps one thread per .js, or per site, or per tab, or whatever). You wouldn't need to actually let the script writer work in multiple threads, would you?

        Yes, you would. The basic reason is that while, conceptually, you're right that you could use your solution to prevent the browser from locking up, you'd still have to worry about the page locking up.

        JavaScript code is generally only executed during events. These events include relatively minor things like scrolling, clicking, typing, or basically any form of interaction with the page. Now you could make the page code "smart" and avoid locking the page if there are no JavaScript event handlers interested in the current event, but you'd still potentially have issues where the page would essentially "freeze" until whatever long-running task completed. Since JavaScript events also fire when the page is unloaded, such a "freeze" could also prevent the user from navigating away from the page.

        This leaves us with a potentially responsive browser UI, but a tab that can't be used until its task completes. This is still better than the Firefox situation (and, due to the way Firefox is designed, something that isn't going to change in Firefox for a long while), but still undesirable.

        To allow the page to remain responsive while the page is doing some long-running task, you'd have to allow multiple threads so that the event handlers could run.

        This is, in a way, the problem that "asynchronous" part of AJAX solves. It doesn't allow another thread to be run via script, but it does allow the page to send the task back to the server to execute, allowing the page to remain responsive while whatever long-running task completes.

        I think a similar solution could work via JavaScript: instead of sending it off to the server, allow a script to be executed asynchronously. It would have no access to any information not sent to it when it was started (as otherwise the thread synchronization issues would remain), but it could run a task and then return a result.

        There can be some argument over whether JavaScript should ever be used for a "long-running task" but the reality is that more and more web applications are finding that it makes sense to allow certain tasks to run on the client instead of burdening the servers. Most clients have the memory and CPU to spare, and it makes sense to use those resources instead of making the bottle-neck be the server.

        Unfortunately the current solutions cause the page to become non-responsive while JavaScript executes and, in the case of poorly designed browsers, cause the entire browser to be non-responsive.

  • by cmowire (254489) on Friday November 02 2007, @02:43PM (#21215527) Homepage
    By the time that a good chunk of all browsers actually support ECMA 4, it's going to be a "nice to have" feature that nobody's going to be too keen on.

    The road forward, in true hacker fashion, is probably to write translators so that part of your PHP, Ruby, Perl, Java, or C# code magically runs on the client, treating ECMA 3 as a vague intermediate language.

    ECMA 3 can be the x86 assembly language of teh intarweb. No CPU actually executes real x86 instructions anymore, they translate it into internal RISC/VLIW-ish operations. Very few programmers write much of any raw x86 instructions anymore.

    Of course, this may or may not be handy for the other ECMAScript implementations like LiveScript.
    • Well that's what GWT, OpenLazlo et al do already anyway. The thing is you can't get all the features of the underlying language that way. The key is to making the source language so much better than Javascript that my complaint sounds like saying "the problem with C++ is that you can't get all the features of assembly." (And I mean within the source language, not with things like asm blocks.)

      Personally I like Javascript as a language and think it's a shame to see roadblocks to it's development happen because of the nature of the platform it usually runs on. I'd like to see something like GWT where the source language is Javascript instead of Java - that is a Javascript to Javascript compiler where you could add whatever local features you need and have the compiler throw away the fluff and stick in cross-browser compatible shims.
  • by Roadkills-R-Us (122219) on Friday November 02 2007, @02:45PM (#21215559) Homepage
    As a user, I really couldn't care less which way it goes.

    Just don't break things that work now!

    As a developer, I really don't care, either.

    Just don't break things that work now!
  • by Anonymous Conrad (600139) on Friday November 02 2007, @02:47PM (#21215599)
    OK, maybe I'm missing the point here but AFAICS no-one's arguing against the new draft; instead, the argument about whether you accept the new syntax inside <script type="javascript"> tags or not. One side says yes, other says we should keep that for older JS and put the new stuff inside <script type="ecmascript4"> tags or similar so we can tell ahead of time which one we're supposed to be dealing with and make sure we don't break existing web code.

    I don't see anything about closing the web or stomping on the little guy or anything like that. Where's that coming from?
  • by TheNarrator (200498) on Friday November 02 2007, @03:12PM (#21215981)
    I think Microsoft royally screwed up with outlook web access. They added XMLHttpRequest to the browser so outlook web access would work more like a desktop app. They built an application on a technology that did not require full access to the latest version of the win32 api and x86 assembly language and it was off to the races. Most of Google, Yahoo and indeed the entirety of Web 2.0 was built on this mistake. They are desperately trying to put the web back in the original box they intended it to be in which is people without access to the latest version of the full Win32 API, and an X86 processor will be denied access to all online content.
      • by ergo98 (9391) on Friday November 02 2007, @05:40PM (#21218013) Homepage Journal

        but if Microsoft had known that they'd be enabling a general-purpose platform for application delivery -- one that doesn't require Win32, or even a full desktop computer at all -- they'd have found another way or not done it at all

        Firstly, at the time there were a huge range of "safe-for-scripting" ActiveX objects that could be created in IE. This was Microsoft's way of clutching every corporate shop that dared to use one in a death grip, instantly destroying their potential to have the versatility that a web application would normally bring. XmlHttp, found in the MSXML library [yafla.com], was just another safe-for-scripting object. At the time the web curious were already exploring a number of ways to do asynchronous calls, most commonly being hidden IFRAME updates, but there were a myriad of other options, including plenty of third-party XmlHttp type components, and even some Java Applet techniques for doing this.

        This was a hugely growing need, and while Netscape was beaten to the ground and slowly regrouping Microsoft seemed to lead by default.

        The point, I suppose, is that the invention of "AJAX" was absolutely, positively inevitable. Microsoft's influence in those early days is entirely the result of its monopoly, not its technical leadership.
      • by Kandenshi (832555) on Friday November 02 2007, @02:50PM (#21215647)
        I know it's somewhat indicative of a tinfoil hat, but that's basically what I and many others do, using NoScript [mozilla.org].
        If I trust the website enough to run javascript, then I add it to my whitelist. I don't see the need for javascript on most of the pages I go to, and would rather not have my computer running unnecessary code. Seems to my totally uneducated POV that it'd slow my computer down if I have 20 tabs each running javascript stuff, when only 2 of them ACTUALLY need it. My RAM is precious to me. =(
      • by Anonymous Coward on Friday November 02 2007, @03:09PM (#21215957)
        And that is exactly what ECMA 4 does: it leaves ECMA 3 as it is (except for a few really minor and obviously broken things that everyone except for Microsoft agrees on), and then adds some sorely needed extras on top of it which the open web really needs in order to stay competitive with the closed-offerings by the likes of Microsoft.
        All current-day JavaScript will continue to work! Backward compatibility has been the number one goal during the development of ECMAScript 4. But Microsoft is scared - web applications have finally started fulfilling the original promise shown by Netscape, making the OS largely irrelevant. And so Microsoft is throwing up any- and all roadblocks it can think of, stalling for as much time as possible in order to create enough lock-in with WPF e.a. that they'll remain relevant. Understandable, of course - they're a company, trying to survive. But a really bad thing for the open web, and something which must be overcome.
    • by Geof (153857) on Friday November 02 2007, @04:07PM (#21216757) Homepage

      Your criticisms seem to be aimed at HTML and CSS, and at attempts to make up for their failings with Javascript toolkits. What Mozilla is pushing here is significant enhancement to Javascript in order to remedy many of its failings while maintaining backward compatibility. Microsoft, on the other hand, is trying to limit changes to the language. According to Eich, Microsoft is criticizing the ES4 proposal without offering concrete alternatives. Instead, he says, they are developing [burningbird.net] their own language in secret.

      I think Javascript's a pretty good language. Certainly it's not perfect - few languages are. PHP, C++ and Perl spring to mind as being particularly flawed, but they have been indispensable nonetheless. Javascript has a huge installed base of runtimes and many programmers are familiar with it (so there's lots of bad code, which may be why JS has such a bad rep). We know how conservative most developers are about learning new languages (especially ones that don't look like C or BASIC), so there would be a significant cost and risk to trying to switch horses from Javascript to something else. Browser compatibility is another matter altogether - but we know who is causing the trouble there.

      Javascript is practical and flexible; the main problems I have encountered are weak support for OO and larger projects - problems the ES4 effort appears to be trying to address. Microsoft's argument is for making minimal changes in favor of some unknown future language. If they really are working on that language in secret, and are able to complete it while Javascript is mired in controversy, the outcome is unlikely to be good for the rest of us.

        • Re:Wishes (Score:5, Insightful)

          by jddj (1085169) on Saturday November 03 2007, @12:07AM (#21221239)

          Is there a non-elitist reason to not use tables for a layout?

          There are many. Let's try a few:

          • Semantic, linear structure of the page. When one forces a layout into a table, almost invariably the "reading order" of the page gets fouled up. Text content that probably should be readable in top-to-bottom order gets split up into left-to-right cells (in page-load order). This plays havoc with the ability to repurpose the page for mobile devices, pdfs and screen readers, and (perhaps more importantly to the folks signing the checks) makes the page harder for search engines to understand, potentially lowering your page rank. By creating a page that makes semantic sense and using <div> tags and other parts of HTML properly (parts like <h1>, <p>, <ul>, etc.) you help convey to the search engine what the page is about.
          • Ease of updating. When you need to change the layout of a page created in tables, you have to reconfigure all the tabled content, moving some from cell to cell, changing colspans, etc. If instead you've made semantic sense of the content, you can move the content around the page with CSS, never having to touch the HTML. You can even do things like change lists of links from vertical nav trees to horizontal tabs without changes to HTML.
          • Ease of creating printable pages. When you lay out in tables, you may be able to "hide" display of the tables in the print style sheet, but browser problems may push content around the page anyway (have been struggling with this in a poorly-designed page this week). With tableless layout, it's easy to hide the elements on the page you don't want to see in the printout, set size and margins for the elements you do, then do a window.print()
          • Separation of content from presentation. When tables are in use, typically related content is plunked into adjacent cells (image slicing anyone?). When this happens, the presentation (layout) is tangled up with the content. This is difficult to maintain. The developer and the designer have to touch the same page for different reasons. When the page has to be edited for layout, the designer has to know enough about the table code to do things like remove or insert colspans, when in fact there are no columns of tabular data.
          • You get to break out of the grid and use flexible (even liquid) layout. You can move things around, put 'em in front of or in back of other items, never having to worry about running out of cells or keeping colspans straight.
          • When all else fails in trying to make a table layout do something it was never intended to do, designers make "pictures of type" so the layout observes their wishes. This is a huge mistake for searchability and accessibility. The search engines can't read the pictures any better than the blind can.
          • Table-based layouts typically get really, really screwed up when the user resizes the fonts in her browser. Trust me: I'm doing this all the time 'cause I don't want to bother with reading glasses.
          • Layout is not tabular data. It's just not. Tables work great for tabular data, and they have many features to render spreadsheet-like pages with clarity.
          • It's a misuse of a feature of the language. You might think this is elitist, but would you also imply that the suggestion that someone stop using a Crescent wrench as a hammer is elitist? Or might you instead think: "there's a better tool for that job - one that's designed to do it well".
          • It's the right thing to do for the disabled. Not bothering to lay out the page well so the visually impaired can read it could be interpreted as elitism on the part of the sighted.

          Is that good for a starter? I'm about out of time to spend on this...

          I don't think that browser support for tableless layout is perfect. It's awful in older browsers, but getting better all the time.

          In any case, it's the browser's job to render the standard properly, not yours to break the code for the browser. I find the middle-ground is to keep the layout pretty basic to get broadest browser support, and tolerate browser differences. I'd never promise pixel-for-pixel cross-browser support. HTML isn't designed to do that.