Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming

The JavaScript Juggernaut Rolls On 505

JThaddeus writes "An article in TechWorld Australia summarizes the latest opinions on JavaScript from ThoughtWorks: 'There is no end in sight to the rise of JavaScript... "I think JavaScript has been seen as a serious language for the last two or three years; I think now increasingly we're seeing JavaScript as a platform," said Sam Newman, ThoughtWorks' Global Innovation Lead.' The article touches on new additions to JavaScript tools, techniques, and languages built on JavaScript. As the fuller report (PDF) says, 'The ecosystem around JavaScript as a serious application platform continues to evolve. Many interesting new tools for testing, building, and managing dependencies in both server- and client-side JavaScript applications have emerged recently.'"
This discussion has been archived. No new comments can be posted.

The JavaScript Juggernaut Rolls On

Comments Filter:
  • by lesincompetent ( 2836253 ) on Saturday February 01, 2014 @12:42PM (#46128579)
    Great... more single-core-hogging fun ahead...
    • single-core-hogging

      I don't see how that needs to be the case. Everything except IE pre-10 supports Web Workers. Firefox is moving toward the process-per-tab model popularized by Chrome, and the refactoring project is codenamed Electrolysis.

      • Maybe he meant that it's ridiculous to begin with that a simple JS application can hog an entire core.
      • yet, any god damn thread that hogs a CPU still locks the entire god damn UI of Firefox because it's not multi-thread capable. Fix the fucking UI and other bugs that sill haven't been fixed insted of trying to keep up with Googles insane numbering.

      • Comment removed (Score:5, Insightful)

        by account_deleted ( 4530225 ) on Saturday February 01, 2014 @05:03PM (#46130069)
        Comment removed based on user account deletion
        • Re:Web Workers (Score:4, Insightful)

          by WaywardGeek ( 1480513 ) on Sunday February 02, 2014 @12:47AM (#46132073) Journal

          Heck, you're right and didn't even have to go into how f-ed up JavaScript is as a language... "dynamic scoping"... really??? That idea sucked in Lisp and I thought we got past it in the 60's after that cock-up. And now we're supposed to take this bastard child serisouly?

        • To be fair, that isn't really the fault of JavaScript in and of itself, it's more of a failing of browser security policies.

          If a same-domain-only policy was enforced similarly to as with frames, that would remove a *lot* of the issues you're taking about. Of course, that would introduce quite a number of problems, but I think it would solve more (like, for example, sites don't take ten fucking minutes to load a single page because it's reliant upon a thousand different ad servers, tracking systems... seriou

  • Peak "platform" (Score:5, Insightful)

    by PCM2 ( 4486 ) on Saturday February 01, 2014 @12:45PM (#46128591) Homepage

    Is the word "platform" officially over? My fucking toaster is a bread-browning platform.

  • by Anonymous Coward on Saturday February 01, 2014 @12:48PM (#46128605)

    Why don't browsers come with a generic scripting engine (in addition to, or replacing, the JavaScript virtual machine) that runs some sort of intermediate language a la .NET CIL, or LLVM IR, etc.?

    Then we could use pretty much any scripting language we wanted with the content.

    • by tepples ( 727027 ) <tepplesNO@SPAMgmail.com> on Saturday February 01, 2014 @01:09PM (#46128705) Homepage Journal
      The last time that was tried, it was called Java applets, and Oracle's incompetence at keeping its virtual machine secure led to browsers blocking Java applets by default.
      • But did that really have anything to do with it being a byte code interpreter, as opposed to a lousy implementation of one? Or perhaps applets having access to library functions that were too difficult to make secure?

        In other words, is a byte code interpreter necessarily less secure than say a JavaScript interpreter? I honestly don't know, and would be interested if anyone can explain this.

        • by jbolden ( 176878 )

          It isn't the byte code interpreter that's the problem. It is running in a low level state. Let's take a simple example division by zero. If you send a division by zero to an x86 processor something has to catch that exception or the entire system crashes. So either:

          a) You have to have a wrapping layer which prevents virtual instructions from causing exceptions in the kernel or OS (Javascript) which is slow
          b) You have to have a complex system where things move up and down abstractions layers freely (C+

    • by qpqp ( 1969898 ) on Saturday February 01, 2014 @01:12PM (#46128725)

      Why don't browsers come with a generic scripting engine

      They do, it's called JavaScript.

      LLVM IR? Here you go [badassjs.com]
      Your other request inverted, compile CIL to JS: jsil.org [jsil.org]

      • Re: (Score:2, Insightful)

        by Anonymous Coward

        It really says something about JavaScript that the "hottest" technologies are ingenious ways to avoid actually CODING in JavaScript!

    • by jbolden ( 176878 )

      Why don't browsers come with a generic scripting engine (in addition to, or replacing, the JavaScript virtual machine) that runs some sort of intermediate language a la .NET CIL, or LLVM IR, etc.?

      You mean like: Java applets, Active-X, flash or quicktime?

  • Replusive (Score:4, Funny)

    by gweihir ( 88907 ) on Saturday February 01, 2014 @12:57PM (#46128649)

    Why do the worst technologies that are just barely able to solve the problem always make it? Is the developer community collectively really this stupid? I fear it is...

    • Re:Replusive (Score:5, Insightful)

      by Nkwe ( 604125 ) on Saturday February 01, 2014 @01:03PM (#46128667)

      Why do the worst technologies that are just barely able to solve the problem always make it? Is the developer community collectively really this stupid? I fear it is...

      Because technologies that just barely solve a problem allow people who can just barely do the job to barely solve the problem. People that can barely do the job are less expensive than people who do the job right. Unfortunate enough people are willing to live with "just barely".

      • a/k/a the Race to the Bottom

      • I am not a java guy (I have the basics, but I still don't 'get' java like some fans do). I asked a guy who works at a hardware company (that does some java accel stuff) what the big draw was. his reply - pertaining to server-java code in business, at least - was that it could tolerate bad programming and still 'run ok enough' for business use. lots of cheap *very bad* programmers in the world and java works well for them. malloc and no free - wow! you can be as stupid as you want and your app will stil

    • Worse is better (Score:5, Insightful)

      by tepples ( 727027 ) <tepplesNO@SPAMgmail.com> on Saturday February 01, 2014 @01:11PM (#46128719) Homepage Journal
      Read the essay "Worse is better" [jwz.org] and you might understand more about what causes this
    • Re:Replusive (Score:5, Interesting)

      by hibiki_r ( 649814 ) on Saturday February 01, 2014 @01:17PM (#46128763)

      They don't always make it: Many do not make it at all. Survivor bias and all that.

      JavaScript thrived because the alternatives were arguably far worse. Java applets were terrible. ActiveX a platform specific disaster. Flash is heavy. JavaScript allowed you to do the very minor things most web developers wanted at the time without having to turn your website into a plugin that disregarded base web technologies.

      Yes, the language design is pretty silly. The function declaration syntax is silly. It tries to look like a member of the Algol tree, but its internals behave more like Lisp. The automatic type conversion system is the source of many jokes. But it still beat it competition at the time, because it was built into the browser, it talked directly to the page's DOM, and the competition did not. Today we'd have little trouble designing a better language than JavaScript for what we currently do with it, but our best bet to get something like that working is to build a language that compiles to JavaScript and then hoping browsers start building VMs for that language directly, skipping the JavaScript step. Still, not bloody likely.

      • [ECMAScript] tries to look like a member of the Algol tree, but its internals behave more like Lisp.

        In other words, it implements the original plan for "M-expressions" in Lisp.

    • Re:Replusive (Score:4, Insightful)

      by Skinny Rav ( 181822 ) on Saturday February 01, 2014 @01:27PM (#46128821)

      Good enough is perfect.

      You can endlessly polish your elegant solutions for decades (see Hurd) while the rest of the world happily uses "technologies that are just barely able to solve the problem".

    • by leptons ( 891340 )
      If that is how you think about Javascript, then you have just illustrated your own stupidity. Or maybe it's fear that you are displaying?

      Javascript is far from "the worst technologies", and your quip about being "barely able to solve the problem" is pretty ignorant.

      I'll get off your lawn now.
    • Re:Replusive (Score:5, Interesting)

      by hey! ( 33014 ) on Saturday February 01, 2014 @01:32PM (#46128857) Homepage Journal

      Because it's easy to mistake one's personal biases for sound judgment about what is "good".

      I won't sit here and defend every design decision in javascript, but it's a lot more sophisticated than meets the eye. I think of it more like Lisp than Java; it encourages (among skilled programmers) a functional programming style, which turns out to be both under-used as a programming paradigm and very nicely fitted to the kind of event-driven tasks people use javascript for.

      If you aren't writing higher order functions in javascript (functions that take functions as values or return them as values) you aren't fluent in javascript and aren't qualified to pass judgment on it.

      • Why is it that everytime I see a truly insightful post, its always the day after my mod points expire?
    • Re:Replusive (Score:4, Insightful)

      by jbolden ( 176878 ) on Saturday February 01, 2014 @01:53PM (#46128987) Homepage

      Because "worst language" is generally a compromise between competing ideas and interests of various stakeholders. Compromise is rarely pretty.

    • Write once - deploy everywhere.

      Name one other language that is as well supported and as broadly implemented as JavaScript?

      With technologies like Node.js - it can run on both the client and the server.

      Sure, there are inconsistencies in implementation - but the bulk of functionality is supported in every implementation.

      • Name one other language that is as well supported and as broadly implemented as JavaScript?

        C is ubiquitous.

    • Why do the worst technologies that are just barely able to solve the problem always make it?

      They are the first to reach critical mass and they get the job done.

    • Re: (Score:2, Interesting)

      by StripedCow ( 776465 )

      You are modded funny, but if this really is a joke, then there certainly is some melancholic undertone to it.

      The web is being developed for "the average" developer that just wants to get things done. This is a pity. Because if the web were developed for the advanced developer (read: computer scientist), those developers could lift the web to a higher level, and there would be much more traction.

      We just have to wait until Javascript gets sufficiently powerful to function as an intermediate language.
      From that

      • if the web were developed for the advanced developer (read: computer scientist), the "web" as we know it would be confined to a few geek niche markets and the rest of us would be using some Microsoft- or Adobe-pushed proprietary technology instead.

        FTFY.

  • jscript (Score:5, Interesting)

    by Horshu ( 2754893 ) on Saturday February 01, 2014 @01:03PM (#46128669)
    I just started on a web project that is heavily javascript (even though it's an ASP.Net app). It feels like I stepped back in time 10 years. I'd have code not execute. Why? Some error somewhere in the code that was ignored. I had a typo on a property set somewhere else. No error. Why? Because javascript created a new property with the typo and set *that*. And every change requires me to run the app to see if it works, because I don't have a compiler to check the basics out ahead of time. And then, because I'm debugging an app in one window, when I'd open a new one to read the news, I'd hit other, non-ignored errors on those pages (advertisements) because 90% of commercial pages these days have error-laden javascript because people rarely check for error conditions. Horrible language.
    • Re:jscript (Score:5, Informative)

      by Anonymous Coward on Saturday February 01, 2014 @01:14PM (#46128739)

      JavaScript is a horrible language because you haven't heard of things like jslint and your team doesn't develop with TDD using one of the numerous testing frameworks that exist for JavaScript?

    • Re: (Score:3, Informative)

      by timmyd ( 108567 )

      You might want to look at TypeScript if you're already using Visual Studio. It infers types, type checks your code, is open source, and supports writing plain JavaScript. When using Visual Studio, you can do the things you're used to doing like "go to definition" and "find all references". If you decide to annotate your definitions with types, it can do type checking and catch errors which is really useful when you need to refactor a lot of code. The video at the bottom of http://www.typescriptlang.org/ [typescriptlang.org] is

    • Try getting a good IDE, like PyCharm (which does javascript as well). It gives you pretty good static checks on things like var name and property name typos. Not 100% of course since that's undecidable.
    • Re: (Score:2, Insightful)

      Sounds like you are not using the correct tools and environment, which makes debugging harder. And using that same setup to read news with a coding environment is just stupid. I don't read news with my development database or web server, so why would I risk infecting my development environment from known malware vectors of even legit advertising?
      You conclude with "horrible language", but your comments support "horrible programmers" all the way around.
      I'm making no defense here, only pointing out that your o

  • I has a sad (Score:5, Funny)

    by Snotnose ( 212196 ) on Saturday February 01, 2014 @01:05PM (#46128673)
    In my 35 years of professional programming, getting good at dozens of languages, I've only run across 2 I've actively disliked. Javascript is one of them (tcl was the other). JS is a crap language that IMHO can't be fixed. If they ever add an honest garbage collector to the base language then most programs will delete themselves upon execution.
    • In my 35 years of professional programming, getting good at dozens of languages, I've only run across 2 I've actively disliked. Javascript is one of them (tcl was the other). JS is a crap language that IMHO can't be fixed. If they ever add an honest garbage collector to the base language then most programs will delete themselves upon execution.

      Lol. And the garbage collector would then send out an email to every web designer who says "I know how to code in Java" when they mean Javascript and clean up that confusion once and for all.

      I've been forcing myself to get good at writing JS lately (if only because Node looks like it'll make all my other skills irrelevant in the web development market). It.. just.. feels.. wrong. Nothing in the language lends itself to building architectured solutions. Maybe the testing tools have caught up with other la

    • Re: (Score:2, Insightful)

      by narcc ( 412956 )

      So... What's wrong with the language? Or were you just repeating the meme?

  • by Foresto ( 127767 ) on Saturday February 01, 2014 @01:06PM (#46128677) Homepage

    ...a programming language (still) doesn't have to be good in order to see widespread use.

  • by Animats ( 122034 ) on Saturday February 01, 2014 @01:10PM (#46128715) Homepage

    Arguably, it should have been Python, which is a better language. But Python has a problem. Python's little tin god, Guido von Rossum, is in love with his own implementation, CPython. CPython is a naive interpreter. (A "naive interpreter" is one which does the specified operations in the specified order, with little optimization across operations.) In CPython, everything is a dictionary and a lot of time is spent doing lookups. This allows everything to be dynamic. In Python, one thread can patch objects in another thread while both are running. Objects can gain or lose elements on the fly. Even running code can be "monkey-patched".

    The price paid for that excessive dynamism is that a Python compiler is hard to write, and an optimizing Python compiler can't optiimize much. Google tried in-house to make Python faster, and their "Unladed Swallow" failed humililatingly. (A different group at Google then developed Go, aimed at the same problem of producing something good for server-side processing.) The PyPy crowd has tried, hard, to make an optimizing Python compiler, and with an incredible amount of complexity under the hood, has made considerable progress, but not enough that PyPy is used much in production.

    Pascal went down for a similar reason. Wirth was in love with his elegant recursive-descent compiler. But it didn't optimize, couldn't handle separate compilation, and had no way to handle errors other than aborting. Python seems to be headed for similar irrelevance. It hasn't even been able to replace Perl, which ought to be as marginal as "awk" by now.

    • Javascript has the same dynamism as Python, why is Javascript still much faster?

      • by dkf ( 304284 )

        Javascript has the same dynamism as Python, why is Javascript still much faster?

        I suspect it is because it is easier to identify a consistent low-level type interpretation — including clearly delineated points where you need to throw the code away and recompile — with Javascript than with Python. That's what you need to do a decent compiler.

    • IMHO, Python is a complicated mess compared to Javascript.
      And a complicated mess is only warranted if at least it adds type checking.

    • by jbolden ( 176878 )

      Interesting points. I agree that Python is missing the window regarding Perl. What are your thoughts on Ruby's approach?

    • It hasn't even been able to replace Perl

      Python has definitely replaced Perl where I work. It's also very quickly catching up to R (statistical/quantitative analysis), but from what I hear there is still a network effect keeping R on top for bleeding-edge research.

  • I'm kind of surprised that there is not one good comment about the benefits of javascript up above this yet. I mean you can off load sooo much data to the client cpu. With the latest in webstorage and the sqlite port to JS I can actually create a friggen database server running on the client. WebRTC and WebSockets are seriously about the change everything in the next 1-2 years....I'm curious how many of the above posts are done by folks who actually do web development? It is pretty much indispensable th
    • by jeffb (2.718) ( 1189693 ) on Saturday February 01, 2014 @02:11PM (#46129125)

      Yes, and thank you for dropping my laptop's battery life from 5 hours to 2 hours.

      Tell me, do you work at Gawker?

      • by iONiUM ( 530420 )

        All the features in JS that the parent is talking about are very important. But they're important and good for web applications, not web sites. Everyone here seems to assume that all people do with HTML/CSS/JS is write web sites, but that's no longer the case. Application which were traditionally written in WinForms/WPF/C++/Mobile apps are starting to get offloaded to web, which means we need those features in JS. I mean, why do you think the canvas tag and others were introduced?

        The problem is advertisers/

  • by Kremmy ( 793693 ) on Saturday February 01, 2014 @01:18PM (#46128773)
    Platform is the wrong word. Something like node.js might be considered a platform, but not JavaScript itself. JavaScript is flexible, C-like, has first class dictionaries and JSON makes them super simple to serialize. It's one of those languages whose flexibility can actually be a hindrance because you have end up having to get pretty deep to find the structure ... maybe it is a platform.
  • by Anonymous Coward on Saturday February 01, 2014 @01:28PM (#46128829)

    My beef with JS is that it is a regression from the time of PASCAL or Ada (or should I say ALGOL ?) where good programs are nicely structured by means of proper data structures.
    This means:
    1.) Reliability is unecessarily low. You never know how many feet an object in variable "monkey" might have. Usually two and sometimes just one, zero or 312.
    2.) Security: A lack of type-safety regularly results in insecure programs. Plus, it is quite difficult to reason about program safety in absence of strong typing.
    3.) Hard to optimize: Strongly typed languages result in programs which can be quite easily optimized for execution efficiency. Compare that to JS, where the optimizer has to "infer" "typical runtime type" and then optimize for that "dynamic" type constellation. Of course, exception code must handle the "differently typed corner cases", too.
    That implies: Bloated optimizer/JIT compiler plus all the nice zero-day exploits which result from this. Donning my tinfoil hat I would say JS is a godsend for the TLAs.

    In summary: JS is a regression from the state of the art of 1970s. "IT" is actually forgetting the great achievements in Software Engineering that resulted in Algol. With JavaScript, computing has gone even further down the path of sloppiness and anti-reliability. Let's face it: 99% of people are in this profession for the love of money, not for the love of constructing reliable and correct systems.

    Dipl.-Ing.(BA) Informationstechnik Frank Gerlach
    Gäufelden
    Germany

    As a counter-concept, look at this invention of mine:http://sourceforge.net/p/sappeurcompiler/code-0/HEAD/tree/trunk/doc/manual.pdf?format=raw

    • by jbolden ( 176878 )

      If you are going to argue for a serious counter proposal you may want to get an account.

      Regardless the battle between typed and untyped languages on the web was lost during the CGI days when Perl replaced C. Too much of the data coming in is untyped. http://happstack.com/docs/cras... [happstack.com]

      As for Saupper reading the manual you don't seem to be considering the problem domain at all just creating an alternative strongly typed language with some different features than C++ or Java.

  • by mark-t ( 151149 ) <markt.nerdflat@com> on Saturday February 01, 2014 @01:29PM (#46128839) Journal

    One thing I personally like about Javascript is that it covers all three of the currently most popular programming paradigms.

    You want an imperative style of development? Javascript can do that, check.

    You want an object-oriented style of development? Javascript can do that, check.

    You want a functional style of development? Javascript can do that too, check.

    Some would argue that by covering so many different paradigms, it ends up covering none of them as well as languages that are designed for a specific paradigm from the ground up, and I wouldn't really refute this point... but it easily does all three of them well enough to still be profoundly productive when developing in any of them, and this means that a programmer is relatively free to pick the paradigm that best models the original problem when designing a solution. This, in my experience, results in shorter development cycles, and frequently much less buggy code.

    • by anchovy_chekov ( 1935296 ) on Saturday February 01, 2014 @01:54PM (#46128989)
      Why pick one when you can pick all three in the same application? :)

      No, you're absolutely right - being able to choose a mode of programming is neat and Java does lend itself to doing neat things. But it still feels like a language that someone quickly hacked together. And the freedom to pick a paradigm means your fellow coders get to pick whatever happens to be in their clue bucket for the day. At least with a language that focuses on imperative or functional coding you can be reasonably sure that the guy sitting next to you has a similar view of reality as you do. "Multi-paradigm" is a bit like saying "post modern", with all the positive and negative connotations. I prefer my languages neo-classical :)
  • Try this in your favorite console: [ 10 , 1, 5].sort()
    You cringe you lose.
    • by leptons ( 891340 )
      The default sort coerces the array items into strings before sorting. If you want to sort integers, use the sort function like this:

      [ 10 , 1, 5].sort(function(a,b){
      if(a>b){return 1};
      if(a<b){return -1};
      return 0
      })


      The sort method in javascript gets it done, but you have to know how it works. Maybe you just don't really know javascript if you cry about this.
      • This is an incredibly non-intuitive way to do things. Sorting an array of numbers shouldn't require jumping through special hoops. This is one of the many reasons why non-typed languages suck.

  • It's sad we're still using a single client side language instead of having the option of running bytecode in the browser. Obscurated JS is just as difficult to read as bytecode, and the browser can also have an automatic bytecode to text "viewer".

    Browers should get behind pNaCL [wikipedia.org] or something similar.

BLISS is ignorance.

Working...