Slashdot Mirror


Java Vs. Node.js: Epic Battle For Dev Mindshare

snydeq writes While it may have been unthinkable 20 years ago, Java and JavaScript are now locked in a battle of sorts for control of the programming world. InfoWorld's Peter Wayner examines where the old-school compiler-driven world of Java hold its ground and where the speed and flexibility of Node.js gives JavaScript on the server the nod. "In the history of computing, 1995 was a crazy time. First Java appeared, then close on its heels came JavaScript. The names made them seem like conjoined twins newly detached, but they couldn't be more different. One of them compiled and statically typed; the other interpreted and dynamically typed. That's only the beginning of the technical differences between these two wildly distinct languages that have since shifted onto a collision course of sorts, thanks to Node.js."

319 comments

  1. Ummmm.... by Anonymous Coward · · Score: 1, Insightful

    Java = back end

    JavaScript = front end

    Need both to do useful things, no?

    1. Re:Ummmm.... by Loconut1389 · · Score: 5, Interesting

      Node.js is specifically for using javascript on the backend and has no real application on the front end- of course Javascript itself does though.
      Java has servlets, servers, web applets, and desktop applications.

      Both technologies can do both sides. Java is of course much more feature rich with more low-level operations.

      I don't think it's really a true apples to apples comparison - they both have their place. Some people like writing end-to-end java, some people like writing end-to-end javascript. But at this point in time, java on the web is kind of dwindling because it is a sledgehammer when all you need is a regular hammer in most cases and javascript end to end is on the rise but there's probably a plateau somewhere because javascript is only so performant and has some limitations. Most of us though I think use the more honed tools for the right jobs even if it means we can't use the same language end-to-end.

    2. Re:Ummmm.... by master_kaos · · Score: 4, Informative

      The summary doesn't explain node.js , but node.js is a server side javascript solution
      So now you can code both backend and frontend in javascript

    3. Re:Ummmm.... by Anonymous Coward · · Score: 0

      So it's a complete shit sandwich now?

    4. Re:Ummmm.... by Anonymous Coward · · Score: 0

      Just like you could since the day LiveScript, I mean JavaScript was first released. All hail the new thing from 1996.

    5. Re:Ummmm.... by 93+Escort+Wagon · · Score: 1

      And I can remember putting together ASP pages using JScript to run on IIS 4, more than a decade ago. Everything old is new again, I guess.

      --
      #DeleteChrome
    6. Re:Ummmm.... by Anonymous Coward · · Score: 0

      nodekit should be spinning in its grave right now. I guess it's a zombie of sort. Like Atom Shell.

    7. Re:Ummmm.... by NotInHere · · Score: 3, Insightful

      Modern web sites shouldn't rely on Java plugins. There is only one native scripting language for the web, and that's js.

    8. Re:Ummmm.... by Dutch+Gun · · Score: 3, Interesting

      I read "sledgehammer" as "security nightmare". It's sort of sad when something completely eclipses Adobe Flash for sheer number and seriousness of security issues. As of a year ago, Java accounted for over 90% of all recent web-based exploits. It's a real problem, because so many enterprise applications rely on old and insecure versions of the Java runtime. It may be that security issues are what actually ends up completely killing Java on the client - besides the simple fact that the trend is simply moving away from plugins because of their inconvenience and proprietary nature.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    9. Re:Ummmm.... by TWX · · Score: 2

      Yes.

      It doesn't help that a lot of the people going crazy for node.js are also want to offload the work the meet dependencies on the admin/superuser, and yet still want to do a rapid-release-cycle schedule. They can't even meet their own internal dependencies right.

      I was working with an educational classroom management project. They theoretically use Debian or Ubuntu, but require so many third-party repositories that it's impossible to just install and have it work. They also rely on specific versions of some of these third-party modules, such that one has to be mindful of the version of Debian or Ubuntu one uses for a starting point (ie, 14-anything won't work) and one has to be careful with these repositories as they themselves will install wrong versions of things (including node.js itself). Then there's the dependencies relying on MySQL, while the package that one actually is tryng to use requiring PostgreSQL, so there ends up being a whole lot of garbage to do something that shouldn't be all that complicated.

      My point is, node.js might itself be fine, but when the software that relies on it is so badly broken as this, it does not come across as a professional product. The amateurish approach to the software using it taints it. Every time I see github or node.js or anything with "ppa:" I now assume that it's crap.

      --
      Do not look into laser with remaining eye.
    10. Re:Ummmm.... by Loconut1389 · · Score: 1

      Very true. I sort of skipped over the security aspects to avoid any fights ;)

      Java is pretty powerful, but that same power leads to both unnecessary weight and risks.

      Although I'm not much of a Java fan- if someone told me to pick between javascript and java to live with forever and nothing else, I'd have to pick java though, but that's just it- trying to fit pegs in the wrong shape hole. Either way you don't get a good fit and I feel like in either case you're kind of just "trying to make it work for you" when you really should be using something else.

    11. Re:Ummmm.... by Anonymous Coward · · Score: 0

      Look for ES7 for a lot of additional low level operations.

    12. Re:Ummmm.... by Em+Adespoton · · Score: 1

      Java has both Swing and AWT... and JavaScript has Chrome (and for that matter, the other Chrome along with every other current browser). You can easily make a GUI in JavaScript -- people have even made complete OS emulators in JavaScript.

      Oh, but it requires extra software to actually display the GUI you say?

      What did you think Swing and AWT were???

    13. Re:Ummmm.... by znrt · · Score: 4, Interesting

      this is not about applets, which have been dead for years already. it's about javascript as back-end platform.

      but TFA (without reading it) is pure nonsense. back-end js (= node.js/io.js) is very interesting but far from competing with java. java's installed base is simply too big to even speak of that, and the paradigm shift is also considerable: node.js is based on monothreading and non-blocking io, a completely different model. it's also very new technology just emerging. but still a very interesting architecture. it's also much more fun and exciting. :)

      i guess we have about 4-5 years of fun ahead until node gets it's share of certifications and "experts" and best practice bullshit, and until someone comes up with some moronic idea like java's generics (yes, 1.5 already signalled java's decadence and oracle had nothing to do with it (imagine!)) and everything starts to rot and turns to yet another boring, stupid, ugly cobol, sorry, i meant java. industry never had a heart. but we irredent coders do!

    14. Re:Ummmm.... by robi5 · · Score: 4, Insightful

      The summary is not about node.js vs. the browser, but Java vs. Javascript.

      The main problem with Java (other than the other major problems others listed) is that it's not Javascript:

      1. you cannot realistically avoid Javascript on the client side
      2. the client side is only getting richer in functionality (look up something like dc.js, crossfilter.js, d3.js, Google apps, mapping, all web apps...)
      3. there is benefit to using one language instead of two, if the feature set is comparable: no context switch for programmers...
      4. ... and you can use common data validation (on the client: reject/highlight bad user input without a server trip; on the server: 'never trust the client' principle, infosec)
      5. ... and common aggregation analytics (allow your user to sort, filter, aggregate data, product descriptions, events whatever) between client and server
      6. ... common domain-specific logic, common utilities libraries, DRY principle, no duplicated testing of logic, common development toolchain, we could go on

      So the 'they both have their place' isn't quite true for a very large fraction of deployments which currently use Java on the server (and naturally, JS on the client).

      Javascript is not 'only so performant', and, as someone else below assumed, JS isn't fast 'because of concurrency'. Most JS is run on V8 or similarly advanced engine, and in my experience the resulting code is about as fast (or slow) as Java execution (single threaded) even if we ignore the most often cited benefit of node.js, which is non-blocking IO. As JS itself is evolving, with typed arrays and the possibility of programming it without generating garbage, WebGL, Web workers, and low level numeric and bit logic functions coming up in about a year, so it'll only get faster. It's unlikely Java will ever have a performance lead on JS ever again.

      Using the same language end-to-end is a more powerful argument than 'the right tool for the job' argument, especially if Java's current lead in some specific server side areas (e.g. finance/reliability/type safety aspects, or machine learning) aren't inherently a consequence of the language, just a consequence of a head start in those areas.

      So in my opinion there is a strengthening incentive for using one language end to end at the expense of Java.

    15. Re:Ummmm.... by grcumb · · Score: 1

      The summary doesn't explain node.js , but node.js is a server side javascript solution So now you can code both backend and frontend in javascript

      On the face of it, that's a pretty useful thing. There's a pretty big fly in that ointment, though, because the whole node.js development environment is still quite young. It's improving by leaps and bounds, and happily, people are learning from others's experience and mistakes. NPM, Grunt and a few other tools make packaging and deploying Node applications easier day by day.

      So while developers—and sysadmins especially—have every right to gripe about Node as it stands, it's clearly in the ascendant. JavaScript as a language is increasingly useful as well. I happen to hate how laden it is with syntactical salt and pepper, but I can live with it the same way I learned to live with Perl: I apply a little discipline and a lot of white space. The reward is a relatively workable mix of functional, OO and procedural logic. JavaScript is increasingly becoming the awkward, weird-looking kid who's actually kinda cool.

      My feeling is that within a few years, most new web apps will have a significant Node component on the back end, and Angular (or similar) component on the front end. By that time, I expect we'll be saying, 'If you don't know JavaScript, Node, Bower, Grunt and NPM, you're probably not a web developer.'

      And Java can go fuck itself. :-)

      --
      Crumb's Corollary: Never bring a knife to a bun fight.
    16. Re:Ummmm.... by Dutch+Gun · · Score: 3, Insightful

      I have nothing against Java either, but I think making it web-facing has been something of a disaster from a security standpoint. And let's face it, security isn't a high-priority feature up until you're breached, and then it becomes a critical feature. If you disable the Java web plugin on the client, the language itself really has a lot going for it. If it didn't, so many programmers wouldn't still be using it today - according to some rankings, it's the most popular language right after C, and just before PHP and Javascript.

      Fortunately, given the fact that we have dozens of reasonably popular languages to choose from, and even more obscure ones, we don't have to pick one language to do everything. In fact, it's downright silly to think that one language ever could do it all. The reason we have so many languages to begin with is because there are so many diverse programming challenges and environments in the modern world, and every language has specific strengths and weaknesses.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    17. Re:Ummmm.... by znrt · · Score: 1

      My point is, node.js might itself be fine, but when the software that relies on it is so badly broken as this,

      very true for the "npm" constellation, and possibly for the particular projects/products you have experienced. but this just reflects that it's a new platform and a hyperactive ecosystem. sure it has it's fair share of hipster crap, but just keep looking, there's quite solid stuff too. and there is a lot you can do with pure node.

      besides, running java applications on linux has sufferd the very same problems for years (hell, it still does sometimes!), even when java was more mature back then than node is now. and you sure will remember what a complete dependency nightmare java was before maven was adopted.

      The amateurish approach to the software using it taints it.

      well, i'd say just avoid that software and ... it's my impression that you are overestimating what "professional" means nowadays. :-)

    18. Re:Ummmm.... by Anonymous Coward · · Score: 3, Interesting

      Your reasoning is invalid.
      With Java, I can use Spring + JSF2.2 with a toolkit such as PrimeFaces.
      This lets me develop completely in one language (Java) while the components render in HTML5+Javascript. These components can even apply java validators to the client side (auto converted into JS).
      The real value of Java is it strong typed nature and strict language, which makes things like static checks, refactoring, autocompletion a breeze. Furthermore, there exist free Java libraries for just about anything.
      I like Javascript, but I wouldn't want to write a complex enterprise application in it...

    19. Re: Ummmm.... by Anonymous Coward · · Score: 1

      WRONG. PHP can do everything.

    20. Re:Ummmm.... by x0ra · · Score: 1

      A Javascript GUI is called HTML5+CSS and run in every browsers.

    21. Re:Ummmm.... by NotInHere · · Score: 1

      Of course applets are dead, but Loconut1389 has mentioned them.

    22. Re: Ummmm.... by Anonymous Coward · · Score: 0

      Java on the backend is about as secure as you can get. Letting Java run in your browser, however, is just as insecure as letting any other untrusted code run on your browser.

    23. Re:Ummmm.... by Eythian · · Score: 2

      You could use GWT which is Java compiled to JS, then you're not touching JS directly (except by treating it as an assembly language.)

      It's not native, true. But it's as native as C is to a regular OS environment.

    24. Re:Ummmm.... by Anonymous Coward · · Score: 0

      I would buy into same language end-to-end if it is not JavaScript.

      JavaScript is bad enough in the browser; dragging it into the server will only make things worse

      JavaScript was never designed as a server-side language, or a language that promotes maintainablity. While this may be ok in a small app, writing a sizable project in JavaScript is insanity. It is certainly possible, but the project will have lots of hard-to-find bugs, and will be brittle. Open source code for some of the popular js libraries mentioned, and realize they are not written in a highly maintainable way. Generally Java libraries are better quality, and there is already a ton of them; js libraries appear fast, and get out of fashion even faster, not a great foundation! I will happily code a demo in JavaScript, but nothing long term

      If you want same language end-to-end, my vote is Scala + Scala.js, when it matures. Or Dart, once it grows its server side. Use the right language for the task for now

    25. Re:Ummmm.... by Eponymous+Coward · · Score: 4, Insightful

      I think you would have to be nuts to build something on a Google technology. I thought about it because GWT is very cool, but with my luck I would roll out version 1.0 and Google would cancel that project and donate the code to the Apache orphanage.

    26. Re:Ummmm.... by Eythian · · Score: 1

      Heh, I used it for a project about 6 or 7 years ago. As far as I know, it's still around.

    27. Re: Ummmm.... by Dutch+Gun · · Score: 1

      Java on the backend is about as secure as you can get. Letting Java run in your browser, however, is just as insecure as letting any other untrusted code run on your browser.

      Yep, I didn't make that distinction clear. There's nothing wrong with Java on the server. Actually, there's nothing wrong with Java on the client either, as long as it's not in the browser plugin.

      I'll disagree with your assertion that Java in the browser is "just as insecure" as any other untrusted code run on your browser, though. By nearly any metric, it's much less secure than Javascript, or even ActionScript (Flash), which itself had a pretty long history of nasty security issues.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    28. Re:Ummmm.... by devent · · Score: 1

      You can't tell me that when I need 30% of CPU to run HTML5 video, or the same CPU utilization to run some stupid JavaScript counter that JavaScript is on par with Java. Optimal Java runs only 3 times slower as C code, but JavaScript still hogs down my CPU. Web apps are still just a nice gimmick, I would really hate my life if I had to use a web app replacement for my work or in my free time. And yes, that includes "advanced" sites like Facebook. HTML is simply not designed to be a web app, and neither was the web or JavaScript.

      --
      http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
    29. Re:Ummmm.... by MacDork · · Score: 1
      There are counter points to just about everything you've said.
      1. 1. Really? You don't know how to do html/css without javascript? Your SEO must be shit, m8.
      2. 2. All those 'rich' libraries are great until they don't work on IE8 or Chrome 37.0.20341. I especially love when stuff that worked fine years ago is broken today because browser updates changed the internal perfomance characteristics of the javascript vm. Simply put, doing too much on the client puts you at the mercy of client configuration changes which you have no control over.
      3. 3. Libraries, that was your argument in #2 wasn't it? Compare libraries available to Java vs Javascript on the server side. Best tool for the job, right? Sounds like you found yourself a golden hammer.
      4. 4. Can you really? How do you replicate the declaritive html5 form validation on the server? And is it really a good idea sharing your validation code, bugs and all, with the client? Sounds like a major security problem to me.
      5. 5. Let's see how your sorting goes on a table with a million rows client side.. if you're batshit crazy enough to even try that. Most of what you mentioned should and generally does get written in SQL, not JS.
      6. 6. lol, now that's just bait

      Performance... you're funny. Tell me about your performance when your server falls over with memory problems and you don't have anything like visualvm to figure out why. Don't get me wrong, Java sucks in its own special ways, but I'd never choose Javascript as my primary language.

    30. Re: Ummmm.... by Anonymous Coward · · Score: 0

      Yeah, I agree. Browsers provide a nice sandbox for JavaScript, but browsers have zero control over what a JVM can do. Java in the browser is akin to downloading untrusted executables and running them. Nothing wrong with running signed Java code though.

    31. Re:Ummmm.... by Gr8Apes · · Score: 1

      ...Optimal Java runs only 3 times slower as C code...

      Where on earth do you get this info? Java, depending upon the usage, can run faster than equivalent C code. If you're talking about micro-benchmarks, then I'd agree. Generally speaking, I don't write micro-benchmark type code. I agree with the rest of your sentiments however.

      --
      The cesspool just got a check and balance.
    32. Re:Ummmm.... by Gr8Apes · · Score: 1

      Having been down the path of using JS on the server, I can unequivocally state "hell no". Debugging that crap is worse than debugging on a browser, where at least the toolset and use cases are somewhat limited. Try handling JS requests running against shared data. Oops, multi-threaded what? Node.js does not have a benefit with non-blocking IO, as that's been around in Java since Java6, and is now in its 3rd generation. It's unlikely JS will ever catch Java in performance, security, maintainability, nor just ease of use.

      What's truly funny about your 1 sided viewpoint is that it's purely based on the browser. JS failed on mobile, completely, because it sucks so badly. The browser has been evolving to reduce or eliminate the need for JS as much as possible. (Have you even looked at HTML5?) New frameworks and "wrapping languages" keep popping up purporting to "fix JS", there's a hint, it's not because JS is great. So far everything has failed with the possible exception of jQuery, which actually has lasted and remained somewhat useful, primarily because it's a toolset that reduces the JS disaster to something manageable.

      --
      The cesspool just got a check and balance.
    33. Re:Ummmm.... by Cruxus · · Score: 1

      Generics a bad thing, really? As a developer who was stuck using 1.4.2 when Java SE 6 was already available, I longed for generics.

      --
      On vit, on code et puis on meurt.
    34. Re:Ummmm.... by MacDork · · Score: 1

      Java on the client has been dead for a very long time already. When the FBI wants to pwn you, they use Javascript security flaws. about:config javascript.enabled=false

    35. Re:Ummmm.... by narcc · · Score: 0

      JS failed on mobile

      The browser has been evolving to reduce or eliminate the need for JS as much as possible.

      When did either of those things happen? Wishful thinking?

      So far everything has failed with the possible exception of jQuery

      Oh, that failed a long time ago. Why people keep using it is beyond me. At least people learned to stop using it on mobile.

    36. Re:Ummmm.... by melmut · · Score: 1

      > Since each supposed "security update" actually deprecates features and adds new ones, Not true. It's been backwards compatible since the beginning. Some very low-level tools can break on major jvm versions (mainly byte-code manipulation tools, which are common for example in servers), but it's mainly a question of upgrading them at the same time. Your code from 15 year ago will still work in 99% of cases, the remaining 1% being basically your fault.

    37. Re: Ummmm.... by pspahn · · Score: 1

      error_reporting(-1);

      Not anymore.

      --
      Someone flopped a steamer in the gene pool.
    38. Re: Ummmm.... by melmut · · Score: 1

      Java in the browser (applets) is a problem, as any untrusted code with that level of access. Java-generated pages isn't (JSP, JSF...), and can even be more secure out of the box. When we speak of Java web applications, most people mean java-generated pages on the browser. Applets are mostly gone, as they should.

    39. Re:Ummmm.... by pspahn · · Score: 1

      Just out of curiosity, what did you think of Gliffy? Do you think it works as a web app?

      --
      Someone flopped a steamer in the gene pool.
    40. Re:Ummmm.... by hatchet · · Score: 1

      There are also JS compilers for C#. Most updated is Saltarelle, which is based on outdated Script#.

      These compilers basically treat javascript as machine code. And the big benefits are Type safety and strong typing (including strong typed ajax calls).

    41. Re: Ummmm.... by valmont · · Score: 1

      Agreed. What gets forgotten in the debate is that Java is a reference implementation of all true OOP constructs: Interface Abstract Class Class Which when applied judiciously, allow u to do things like inversion of control, dependency injection and test driven development in a strongly-typed environment, and this strongly-typed nature, when properly embraced, makes it easier to write software which you can refactor as often as you desire with orders of magnitude less risk than with "fsck-all-typed" languages like ruby or JavaScript. So, if your application does little more than pushing data into and reading data from some storage engine, then okay, JavaScript is an okay choice. If your application is growing into having significant business logic, then JavaScript will turn into thousands of lines of spaghetti untraceable closure hell , whereby each refactoring attempt will almost certainly have catastrophic consequences in production down some obscure execution path in some anonymous callback function you couldn't be bothered unit testing because how the fsck do you write a unit test against that anonymous function? There's not a concept of a Class in JavaScript. Sure you can mimmick inheritance patterns with prototypes with albeit some unintended consequences (hasOwnProperry) and encapsulated properties by having your closures reference variables from their enclosing context etc, but those techniques are what i call "expressively contrived" Strongly-typed OOP languages have very-well established tried and true patterns for writing test-driven code Ruby while not strongly typed, at least has a concept of Class/methods/inheritance/polymorphism . Problem with Ruby is as i am writing things TDD in it, the first half of my tests are there to ensure that my methods behave correctly when i pass them arguments of the wrong types, and my methods are littered with lines of code ensuring that my arguments have the expected properties. Totally retarded. And Ruby doesn't know anything about an Interface, but that's okay because it's got "fsck-all-typing" so it's not like you would even try to enforce modicums of contracts. Anyway, as applications grow in complexity, building things TDD in strongly-typed OOP languages leads to more fun, and frequent refactoring which makes ur code more stable instead of more brittle. I've written a crap ton of JS code. Java code too. And PHP. And a minimal amount of Ruby: I've appreciated their strengths. And drawbacks. Feel free to learn the same thing I have the hard way: this panacea mentality to stacks is just one big circle jerk. If you think JS, in its current form, is the only true way to build web applications, then by all means, keep that head firmly planted in the sand while the rest of the World out innovates you with a blend of languages and platforms best-suited for their use-cases.

    42. Re:Ummmm.... by tomkanka · · Score: 3, Informative

      GWT is not maintained by Google anymore. From http://www.gwtproject.org/ "GWT is used by many products at Google, including Google AdWords and Google Wallet. It's open source, completely free, and used by thousands of enthusiastic developers around the world."

    43. Re: Ummmm.... by shutdown+-p+now · · Score: 1

      "True OOP" does not require abstract classes and interfaces as distinct entities. In fact, it doesn't even require classes in general. Prototype-based is still OOP, and structural typing can substitute for interfaces just fine.

    44. Re:Ummmm.... by shutdown+-p+now · · Score: 1

      If you really want types in JavaScript, there are half a dozen popular solutions to that problem - and since they ultimately end up as JS anyway, you can use them on client and server both, just like vanilla JS. TypeScript is one obvious example.

      I also very much doubt that you can write any arbitrarily complex app without a single line of JS. At some point, you'll run into a limitation of your component library, and you'll be forced to roll your own or extend an existing one - and they still have to produce JS to run on the client.

    45. Re:Ummmm.... by stridebird · · Score: 1

      Very true, I remember those days too. ASP was always seen as welded to VBScript but it could be coded in JScript too, and the code looked a lot more readable and proper too. I can't remember any round-tripping of code, it wasn't really on the cards. We are talking about the dawn of the DOM at this point here. getElementById() was just below the horizon and IE4 was the only game in town. One feature of ASP/IIS I liked was the Application object, allowing data sharing on an application level. PHP has never had that really. IIS was replaced by apache in 2002 in my career and became irrelevant in web development. It's been at least 5 years since I last met a dev with an IIS/ASP gig.

    46. Re:Ummmm.... by Electricity+Likes+Me · · Score: 1

      I really don't know what sysadmins can be complaining about with node. npm install and you pull in all the dependencies. Without needing superuser privileges, or performing system-wide installations. Node.js apps play very nicely together in my experience.

    47. Re:Ummmm.... by devent · · Score: 1

      Yes, I have it from various micro-benchmarks sites. I myself didn't wrote or did any of those benchmarks, because it's useless anyway. Java is fast for my needs, and there are various high performance libraries in Java, like http://code.google.com/p/effic...

      --
      http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
    48. Re:Ummmm.... by Gr8Apes · · Score: 1

      JS failed on mobile....The browser has been evolving to reduce or eliminate the need for JS as much as possible.

      When did either of those things happen? Wishful thinking?

      You are serious? Your reading comprehension is that contemptible? Show me the wonderful set of JS apps for mobile. Anything in the top 100 for any of the 4 top smartphone OSes (yep, I'll even let you go down to Blackberry).

      HTML5 - huge reduction in JS needs.

      Oh, that[JS] failed a long time ago. Why people keep using it is beyond me. At least people learned to stop using it on mobile.

      Because there's nothing better? At least CoffeeScript has fallen by the wayside.

      --
      The cesspool just got a check and balance.
    49. Re:Ummmm.... by devent · · Score: 1

      I'm using Linux with Firefox 35.0 and if I just drag one shape over the diagram the CPU goes to over 20%. For typing text into a shape the CPU goes up to 10%. Even f I just hover my mouse cursor over the shapes the CPU goes up to over 10%. Comparing that to VisualParadigm (Java) where the CPU stays at about 10% for dragging shapes and stays at between 0% and 1% in idle. Sorry but JavaScript is at least still 15 years to be on par with Java or other languages, if ever JavaScript reaches the same performance of Java, which is very doubtful.

      In my opinion, the WC3 must release a DOM bytecode specification and drop JavaScript as part of the standard. That way, anyone is free to use any language for the Web and we can have binary bytecode embedded in the HTML pages, which additional type and runtime information. How about the WC3 just adopt the JVM bytecode? We already have a JavaScript script engine in Java.

      http://en.wikipedia.org/wiki/J...

      --
      http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
    50. Re:Ummmm.... by Daniel+Hoffmann · · Score: 1

      I think the main advantage of node vs java is that the single threading model is MUCH more simple, anyone who ever wrote a considerable size Java application knows that threads always bite you in the ass. This makes developers life easier, but you need to architecture your application in a different way. If performance is not critical you can get away with this, if performance is critical node can scale horizontally very well. Horizontal-scaling a single server Java application usually requires redesigning the whole thing, while node applications due to the single-thread mechanics incentive you to write stateless code that makes scaling horizontally a matter of plugging more servers and adding a load balancer (which you also have to do in Java).

      In short if you have your application completely specified from the start and knows it will never ever change its specification Java would probably be a better choice, type safety really is useful for megaton projects with lots of little parts that have fixed requirements and you can design the threading model from the start to satisfy your requirements. If you are writing an application that evolves constantly node is a better option because it can adapt itself more easily to changing requirements, untyped languages are very good for this.

    51. Re:Ummmm.... by jandersen · · Score: 1

      ...java on the web is kind of dwindling ...

      Not really - Oracle who owns Java, are investing massively in Java tools. In fact, I would say that Java is finally beginning to take off as the mainstream programming language, because the hardware is finally cheap and powerful enough. Just to illustrate how seriously the big players take Java, consider this excerpt from Wikipedia's article about IBM System Z:

      Support for zAAP processors. These specialty processors allow IBM JVM processing cycles to be executed on the configured zAAPs with no anticipated modifications to the Java application(s). This means that deployment and integration of new Java technology-based workloads can happen on the very same platform as heritage applications and core business databases in a highly cost-effective manner

      Yes, mainframes have specialized Java processors as one of their many options. Believe me, they don't do this for fun. Another things is, Java on the web is no longer about applets; see J2EE - this is about Java application servers, and the number of standards alone that sorround Java is an indication that this is a massive industry. It isn't about to go away, on the contrary.

    52. Re:Ummmm.... by RabidReindeer · · Score: 1

      Java = back end

      JavaScript = front end

      Need both to do useful things, no?

      Actually, I believe that JavaScript started out as a backend concept and ended up on the front end.

      Conversely, when Java first arrived, it was touted as a browser/os-independent way of making smart front ends.

      Ironic, no?

    53. Re:Ummmm.... by DickBreath · · Score: 1

      To get the best of both worlds, use each tool where it works best.
      1. Use Java Applets in the browser to get Java's famously good start up times and the kind of Security that comes with complex interactions between JavaScript and a Java Applet that has elevated permissions
      2. Use interpreted JavaScript on the server (not Node.js)

      Use Windows as the Server OS, in order to get the kind of security, robustness and stability you've come to expect from Microsoft
      Use Linux on the Desktop to get it's legendary ease of use*


      (* however Linux ease of use is great in the last few years)
      (I hope I do not need to add a humor tag)

      --

      I'll see your senator, and I'll raise you two judges.
    54. Re:Ummmm.... by Shortguy881 · · Score: 1

      I am a hardcore java developer. I work on a lot of heavy back end web services that have a lot of threading and data manipulation over millions and millions of rows. The idea of doing that in javascript makes me sick.

      Node.js seems to be more about giving front end developers the idea that they can program server side, which is even worse. The concepts and practices of a front end developer should never be allowed on server side code. Node.js is cute for small websites with minimal server side code, but for an enterprise solution, it still falls very short.

      --
      Brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants.
    55. Re:Ummmm.... by Anonymous Coward · · Score: 0

      There are many great tools for the job. Node is pretty great and I program it for fortune 1000 sites as preference but doesn't mean I don't integrate it with other python / java / whatever the hell else that is great that already has been tested and does an amazing job etc. Come one. Step out of the one size fits all mode. It don't. Walmart did this very thing where they integrated Node.js as its API layer communications layer that spoke to legacy software happened to be Java but they didn't want to rewrite the whole thing just for kicks.

    56. Re:Ummmm.... by narcc · · Score: 1

      You are serious? Your reading comprehension is that contemptible? Show me the wonderful set of JS apps for mobile.

      There are tons of 'em. You've just never noticed that they were written in JS! I've seen everything from fast-paced 3D games to utilities -- not just on mobile, but on low-end mobile phones running FirefoxOS.

      On BlackBerry and other platforms, you'll find quite a few as well, they're just incredibly difficult to spot, being indistinguishable from native apps.

      See, you're confused by the problems phonegap users encountered by using jquery. Once they learned that lesson, and dropped that awful library, things improved dramatically.

    57. Re:Ummmm.... by tealdev · · Score: 1

      Node is a very rapidly expanding ecosystem. So it does not have the kind of maturity and stability admins are used to dealing with. Along with that, Debian package release cycles are too slow to keep up with this kind of change. Canonical has a more rapid release culture, which is why you are seeing the custom ppa's. But of course, they are not being integrated up and down the OS version tree.

      The better approach is actually to use npm (Node Package Manager), to handle dependencies that are not from stable projects. That keeps your glue layers up to date much better. (Though you still need to have a good idea where semantic versioning works, or where you are better off locking down a module to a specific version. That may be more of a Dev concern though.)

      Also, some stable projects are better off being installed from source/directly from the project's site. Because Debian(and Canonical?) sometimes does ... unusual ... things when they build packages.

      Yes. That makes maintenance harder because you don't have everything under the Debian package management system.

      But it is the reality of dealing with some kinds of projects. Debian/Canonical are opinionated, often in a different way than the creators of a particular software. Sometimes, the software needs to follow its own logic for it to be completely effective.

      This is part of the Admin's job ... herding cats (software, Os', organisational constituencies).

    58. Re:Ummmm.... by datavirtue · · Score: 1

      "JavaScript is increasingly becoming the awkward, weird-looking kid who's actually kinda cool."

      Hipster? I think you nailed it.

      --
      I object to power without constructive purpose. --Spock
    59. Re:Ummmm.... by GrantRobertson · · Score: 1

      this is not about applets, which have been dead for years already.

      OK, please count this as a dumb question and not a troll question: Why, exactly ARE applets dead, and in what context? Are they dead simply because they never caught on an are simply unpopular? Are they dead because IF a user does not update their JVM then a malicious web-app can do very bad things? Is it dead because, regardless of which version of the JVM, the web-app itself is vulnerable to malformed data and can be used as an attack vector? But then is that vulnerability any worse than what could be created through sloppy JS code? Would applets be OK in a limited environment? I have worked at a company that used Oracle databases and used Java web-apps to access said databases. It seemed to work just fine for them (though they could have done a lot better with their UX).

      I'm asking because I am thinking about getting back into programming but I only have so much time and energy. I don't think I can just "learn every language out there" like many hot-shot developers say one should do. I may end up doing some professional development but I am not looking to be the cream of the crop. I am more interested in finding my own small niche and settling in there. I know the world will change around me. I am fine with that for now.

    60. Re:Ummmm.... by znrt · · Score: 1

      you can, just don't expect it to be widely adopted. plus your niche shouldn't have security and usability concerns.

      also, be aware that applet support isn't likely to last much longer. several plugins aren't supported anymore on the desktop, and there aren't any at all for mobile devices or tablets. since java 1.7ish even running signed privileged applets on supported browsers on desktop is a pain. in short: maintaining applet support is problematic and nobody seems to bother anymore, specially since there is no benefit: js can now handle most of what applets did in the browser in the past, right out of the box and better.

      there still are a few very specific usecases for applets like, for example, to access smartcard readers from a webapp. but even then, applet maintenance and deployment is hardly optimal and you'd probably will end up ditching the whole idea and lookig for a workaround.

      and of course you don't have to learn "every language out there" if you don't want. however, if you want to do stuff for the web today (that's what applets were for) you simply won't get away without learning js. it's not optional.

    61. Re:Ummmm.... by rdnetto · · Score: 1

      Generics, as done in some languages, are excellent. Java is not one of those languages, primarily due to how it handles type erasure. Requiring the programmer to use an explicitly boxed type (Integer instead of int) is also rather clumsy, as is the lack of inference for type parameters.

      IMO, C#'s implementation of generics is considerably better.

      --
      Most human behaviour can be explained in terms of identity.
    62. Re:Ummmm.... by Cruxus · · Score: 1

      Maybe so, but Java's generics are still far better than having Java without generics.

      --
      On vit, on code et puis on meurt.
  2. Fight! by Anonymous Coward · · Score: 5, Funny

    Hipster Crap vs Crap. Fight!

    1. Re:Fight! by Anonymous Coward · · Score: 0

      when we gonna get python.js?

    2. Re:Fight! by nitehawk214 · · Score: 1

      Sometime after node.py

      --
      I'm a good cook. I'm a fantastic eater. - Steven Brust
    3. Re: Fight! by Anonymous Coward · · Score: 0

      Already have Jython (Python on a JVM).

    4. Re:Fight! by tepples · · Score: 1

      when we gonna get python.js?

      Now, apparently:

      pyjs contains a Python-to-JavaScript compiler, an AJAX framework and a Widget Set API.

    5. Re:Fight! by Tablizer · · Score: 1

      Non-blocking white-spaces?

  3. Crippleee Fiiiight! by Anonymous Coward · · Score: 2, Funny

    That's all I can think.

  4. Ajax and WebSocket by Anonymous Coward · · Score: 0

    Are probably better than javascript/node.js (MEAN stack?), and, imho, just as easy to implement, if not easier. I think the "battle" is java enterprise usefullness versus whipped up but very nice javascript/node.js. Those that make nice websites prefer to do so in javascript/node.js but I don't know why how any enterprise problems can be properly solved with that technology.

    1. Re:Ajax and WebSocket by avandesande · · Score: 1

      The compelling argument is having your code base in a single language. SPA applications don't require much from the service layer anyway....

      --
      love is just extroverted narcissism
  5. Oxymoron by Anonymous Coward · · Score: 1

    >speed
    >JavaScript

    These two do not belong in the same sentence. JavaScript makes your 8-core i7 run like a 486.

    1. Re:Oxymoron by Anonymous Coward · · Score: 0

      You should upgrade from IE2. A lot of the newer browsers are quite nice.

    2. Re:Oxymoron by Anonymous Coward · · Score: 0

      No can do. I'm an ActiveX developer.

    3. Re:Oxymoron by MillionthMonkey · · Score: 3, Informative

      You're not supposed to do any heavy back-end work with node itself; it can handle simple database interactions and streaming etc. but anything that requires serious computation is supposed to be forked off to a separate process. Unfortunately it encourages misuse by providing a toehold for JavaScript programmers to start worming their way deeper into server processing.

    4. Re:Oxymoron by Anonymous Coward · · Score: 0

      >speed >JavaScript These two do not belong in the same sentence. JavaScript makes your 8-core i7 run like a 486.

      This is the problem with these comment systems, we cant tell if you're being sarcastic or you just dont know what youre talking about.

  6. Battle for mindshare, or for page hits? by QuietLagoon · · Score: 5, Insightful
    Is there a real battle going on? Or is the battle in the head of some writers who are creating an ersatz battle in order boost their page hit count?

    .
    Computer media are usually pretty dull, so there's nothing like a supposed battle to up the interest.

    1. Re:Battle for mindshare, or for page hits? by Kevin+Stevens · · Score: 2

      There is in my company. Seriously. A very very big e-commerce player. With all the politics and careers at stake that you would expect.

    2. Re:Battle for mindshare, or for page hits? by Jane+Q.+Public · · Score: 2

      There is in my company. Seriously. A very very big e-commerce player. With all the politics and careers at stake that you would expect.

      Well, I don't want to get into flame wars. But A LOT of developers I know gave Node.js a serious shot, then said "Never again."

      Your mileage may vary. I'm just describing what others around me are saying. I never personally considered jumping on the Node.js bandwagon. It seemed like a pretty strange idea. I was willing to wait for the judgment of "First Responders" to give it a go. I tried to keep an open mind, and just wait and see.

      What I've been hearing back hasn't been so good. I'm honestly getting the idea Node.js was just a fad that will enjoy 15 min. of fame then fade into the background just about as fast as it popped up.

    3. Re:Battle for mindshare, or for page hits? by robi5 · · Score: 1

      You clearly seem to be in one of the camps but your post has contained no substance whatsoever other than conveying unsupported second hand sentiment (again with no specifics) and no direct experience.

    4. Re:Battle for mindshare, or for page hits? by Anonymous Coward · · Score: 0

      Javascript is more a religion than a language. There's not so much a battle as a crusade.

    5. Re:Battle for mindshare, or for page hits? by Jane+Q.+Public · · Score: 3, Interesting

      You clearly seem to be in one of the camps but your post has contained no substance whatsoever other than conveying unsupported second hand sentiment (again with no specifics) and no direct experience.

      Your ASSUMPTIONS are unwarranted. I held off on taking the plunge into Node.js because I was already busy elsewhere, and suspected it was a fad. But I know people who have. I have simply reported what they have said to me. I was willing to adopt it, if it proved out.

      You can doubt that however much you like, but you have absolutely zero evidence on which to base your comment. Except, apparently, your own twist on what you think I implied. I stated myself, quite clearly, that I did not have personal experience with it and was only reporting what I'd heard from others.

      And based on the same lack of evidence, I could just as easily suspect that you're a shill for Node.js who is trying to downplay perceived criticism.

    6. Re:Battle for mindshare, or for page hits? by phantomfive · · Score: 1
      The Penny Arcade guy made a really good observation today that I agree with:

      We must, as conscious beings, observe when we are told things that are strategically lathed not to inform us but to make us fight with one another.

      --
      "First they came for the slanderers and i said nothing."
    7. Re:Battle for mindshare, or for page hits? by narcc · · Score: 1

      Or, you know, you could also look at the countless examples of successful large-scale deployments node.js has enjoyed in its relatively short life, not just passing-comments from random co-workers, if you're going to form a hasty, poorly-informed, opinion. It's still not a great way to evaluate a technology, but it sure beats a couple passing comments!

      I looked at node.js on the server myself, and decided that it wasn't well-suited to our needs. That doesn't mean it's horrible or useless, just that it's not better than what we have now for our specific needs. There are a lot of big-names out there with smart people making technical decisions who disagree with your unnamed colleagues off-hand assessments, which have found a lot of success using node.js. I can only assume it's because node.js was better for their needs than whatever it was they were using before. Perhaps your developer friends just suck at evaluating new tools?

    8. Re:Battle for mindshare, or for page hits? by Anonymous Coward · · Score: 0

      How does something of no value, and then something with some empty rhetoric defending nothing get modded up?

    9. Re:Battle for mindshare, or for page hits? by Anonymous Coward · · Score: 0

      The problem I always have with node.js is "What's the point?".

      It's been built up and sold as this fantastical new way of doing things, but it's ultimately just a Javascript engine wrapped around IOCP.

      You can build applications in various Java frameworks and even .NET frameworks like WCF to work exactly like node.js by restricting the way threading works and using an event programming model - everything node.js does is basically a tiny subset of the sort of things WCF can do.

      About the only benefit node.js can offer is that you can share code between the server and the client, but to me even that's mitigated by the fact that most .NET and Java frameworks nowadays automatically bind to and from JSON for you, so you can build all your objects server side, pass them client side and never touch any kind of conversion or mapping. They turn up on the client exactly as you'd expect to be manipulated by Javascript, a dynamic language designed for exactly that reason. I can think of very few cases where I'd expect my client and server code to be the same because client and server serve different inherent purposes anyway.

      node.js simply strikes me as nothing more than a way for client side Javascript devs to be given an easy option to develop for the server without leaving their comfort zone. To any pre-existing server side developer using languages and technologies like C#, Java, and C++ there's literally no point to node.js, it's a tiny subset of what they already have with all the disadvantages of a dynamic language such as inherent increase in bugs (compilers catch entire classes of bugs that dynamic languages can allow to slip through to production).

      node.js is great for giving those client side Javascript devs their introduction to the server whilst allowing them to remain in their comfort zone, and should be commended for that. But this idea that it's somehow relevant to server side developers with existing knowledge and experience? It's a joke. To them it's a massive step back with some hefty disadvantages that grossly overshadow the very tiny advantages it offers.

      Why would I pidgeonhole myself into the node.js world when I can use an actual well designed language like C#, with a best in class IDE on a framework that gives me everything node does and then some more flexibility on top and where compilation will ensure a much higher inherent code quality than node.js can offer? I can develop better software faster with more flexibility and better performance.

      node.js does what it does and does it well, but let's not even begin to pretend it's a competitor to Java, .NET, C++ et. al. It's just a tiny fragment of what they already offer.

    10. Re:Battle for mindshare, or for page hits? by Electricity+Likes+Me · · Score: 1

      Browserify lets me write a server, import modules with npm, then require() them in my clientside Javascript and have everything be automatically pulled in by npm. It means I can move logic client to server side trivially. node.js is a huge benefit to rapid web app development. I don't know that I'd implement heavy business logic in it, but when you're building a web app the client and server are fairly intimately tied together.

      That's a level of seamless you just can't get from any other combination.

    11. Re:Battle for mindshare, or for page hits? by Anne+Thwacks · · Score: 1
      I just punched someone for using javascript.

      Float like PHP, sting like Perl?

      --
      Sent from my ASR33 using ASCII
    12. Re:Battle for mindshare, or for page hits? by Anonymous Coward · · Score: 0

      What criticism tho? All I see is "my peepz say it suxxors so it's gotta be so".

    13. Re:Battle for mindshare, or for page hits? by jwhitener · · Score: 1

      I think one of the problems is that node works very well for certain types of apps, but it isn't as useful (or sensible) for other types of apps. For instance, I attended a conference where a University developer described how they created an event, messaging, and api system layer over their services using node. It seemed really well suited to that task. Lost of concurrency, etc..

      So maybe the developers you associate with are doing work that doesn't benefit from the features that node offers. It is really hard to talk about how useful a new platform is without keeping the task comparison equal.

  7. No overlap for mindshare by EmperorOfCanada · · Score: 4, Interesting

    Node.js and Java couldn't be much more different in the types of programmers/clients that each attracts. A typical Java client would be a somewhat stodgy to extremely stodgy company where the programmers are completely wild and out of control because they don't wear ties with their dressshirts. These same programmers either work in large pools of programmers for the company or are doing contract work for a large stodgy consulting company.

    A Node.js programmer might not own a dress shirt and works for a company that mightn't have ever printed an org-chart. The only stodgy companies using node.js would be where they completely outsourced their web infrastructure to a young hungry up and coming development company that has another decade or two before it becomes fully decrepit and stodgy.

    There is no competition for mindshare between these two. Maybe, just maybe, there are a tiny few companies right in the middle of these two extremes that would go one way or the other but in all probablity these middle companies are using PHP, Ruby, or Something Microsoft.

    But the reality is that Java is competing with Microsoft's C# and maybe other JVM languages such as Scala. Whereas Node.js is competing with PHP, Ruby, Python.

    All I could say to product/project manager at a fortune 500 company who wanted to switch their system from Java to Node.js is "Good Luck." And the same with someone who proposed Java at a young startup that had a successful Node.js codebase. In the later I could maybe see a switch to Python but the first would and will potentially not be switching from Java for the next decade or three.

    1. Re:No overlap for mindshare by Anonymous Coward · · Score: 1

      What the hell is a stodgy?

    2. Re:No overlap for mindshare by Anonymous Coward · · Score: 1

      The reason that "stodgy" companies use statically typed languages is that their code base is usually very large and they've been able to maintain it for years. Have you ever worked on a nodejs codebase or any dynamic language code base that's > 100,000 lines of code? Usually what ends up happening in large dynamic projects is that the project is rewritten in a static language, in the case of Twitter, or the releases get slower and slower and the bugs grow and grow or they federate the thing out into many different little silos that talk to each other with services so that each project's codebase remains understandable by a small team and they may even spin off components so the open source community can maintain them.

    3. Re:No overlap for mindshare by Sowelu · · Score: 2

      stodgy
      [stoj-ee]
      adjective, stodgier, stodgiest.
      1. heavy, dull, or uninteresting; tediously commonplace; boring: a stodgy Victorian novel.
      2. of a thick, semisolid consistency; heavy, as food.
      3. stocky; thick-set.
      4. old-fashioned; unduly formal and traditional: a stodgy old gentleman.
      5. dull; graceless; inelegant: a stodgy business suit.

    4. Re:No overlap for mindshare by kenj123 · · Score: 2

      I think node.js has Microsoft scared. .net is setup to allow mostly server side code spit out bland, minimal html and work on any browser. but browsers are becoming standardized so javascript acting on the DOM is portable across browsers. node.js on the server, javascript and html on the client has the potential to make .net irrelevant. I'm surprised node.js didn't come along awhile ago, but it would have been useless without html 5 and cross browser support for javascript.

    5. Re:No overlap for mindshare by Anonymous Coward · · Score: 0

      >And the same with someone who proposed Java at a young startup that had a successful Node.js codebase.

      Until it comes time for new guys to work on the js code. Then you're lack of static typing and anything resembling a sane object heirarchy means you end up rewriting it any. It's like perl, except with a higher percentage of morons. Cooperative multitasking!

    6. Re:No overlap for mindshare by Anonymous Coward · · Score: 0

      Microsoft fully supports Node.js. See e.g. this and this.

      The rest of what you said is just nonsense. Children born when the first browsers that had DHTML and allowed generation/manipulation of the DOM with javascript appeared are now graduating high school. Yes there were compatibility issues, but it definitely wasn't Node.js that solved that problem.

      Node.js is just the latest virtual machine tied to a specific language. It has about the same potential to make .NET irrelevant as it has to make Java irrelevant: none.

    7. Re:No overlap for mindshare by EmperorOfCanada · · Score: 1

      Thank you for this excellent answer. I was prepared to defend my position but never to define stodgy. I once commented that certain languages were esoteric and had to define that once though.

    8. Re:No overlap for mindshare by Anonymous Coward · · Score: 0

      Their code base is large because they use Java.

    9. Re:No overlap for mindshare by naris · · Score: 1

      Your definitions are off, let me fix them for you:
      A typical Java client is one that needs to have their applications work correctly.
      A Node.js programmer works for a company that is OK if their applications don't work as long as they are flashy.

    10. Re:No overlap for mindshare by kenj123 · · Score: 1

      I was aware of ms 'support' for node.js. I tried to use it about a year ago and it was buggy enough that I decided I couldn't trust it for anything associated with a paycheck. I think MS is 'embracing' it because they are scared of it and don't know what else to do. If node does gain in popularity, MS will just be one of many vendors for it and the profit margins they are used to will no longer be there. And I'm still waiting for MS to support JSON in MSSQL (just had to get that off my chest). As for your comment about DHTML and DOM being 20 yrs old, JQuery came out in 2007-2008 because of the failures to fix browser compatibility problems. And I never said node had anything to do with fixing browser compatibility, its just Node is not worth much without it. I think the whole stack, javascript + html5 browser, node.js server has great potential for CS education. they just need to improve some of the object oriented capabilities in javascript.

    11. Re:No overlap for mindshare by Anonymous Coward · · Score: 0

      The fact that you think prototype OO is the same as the completely misses the point of OO system of Java shows that you are a brain-damaged Java moron.

    12. Re:No overlap for mindshare by Anonymous Coward · · Score: 0

      Well, except for JavaScript and HTML DOM manipulation being slow and bloated, you mean. Also hard to maintain, prone to breaking due to an inherent lack of type safety, and so on.

    13. Re:No overlap for mindshare by phantomfive · · Score: 1

      I don't know about that. My current company has gone from Java to node and is now moving back to Java. Since it's just middleware, and we have several different products, it's no big deal to move around.

      --
      "First they came for the slanderers and i said nothing."
    14. Re:No overlap for mindshare by narcc · · Score: 1

      Also hard to maintain, prone to breaking due to an inherent lack of type safety, and so on.

      This is true, if all of your developers are high-school students.

    15. Re:No overlap for mindshare by narcc · · Score: 1

      A Node.js programmer works for a company that is OK if their applications don't work as long as they are flashy.

      Like the guys at Pay Pal, Dow Jones, and the New York Times?

      Sure.

    16. Re:No overlap for mindshare by Lennie · · Score: 1

      Actually, you might be surprised but something else has been going on for years.

      Let's have a look at what a company like Wallmart is doing. They replaced part of their infrastructure with node.js.

      If you look at what they are doing is: they are replacing not the backend systems, they are replacing the user-facing/HTML-generating/CSS-generating/AJAX-talking/JSON-generating/whatever-it-does parts of the system with node.js. So node.js talks to the backend systems on one side and the browser on the other side.

      Wallmart even have open source projects releasing and collaborating on the code they use:
      http://hapijs.com/

      Let's take an other example. They already made that transition earlier than Wallmart. Can I say they are also a house hold name ? Because that would be Paypal:
      http://www.youtube.com/watch?v...

      So now they can do frequent changes to the user-facing websites in hours, maybe even minutes. Instead of the 6 week update cycle they had with Java.

      These are just examples of companies, but you can see what they are doing and hopefully you can also imagine why that makes sense.

      Because now the webdevelopers deal with everything that talks to the client (browser) and the other teams create webservices. It's a good seperation of concerns.

      Just in case you need a diagram, here is an article about it:

      http://www.nczonline.net/blog/...

      Then a couple of years later, this old concept of Service Oriented Architecture and the Unix-philosophy of single purpose programs was starting to be applied to this new 'cloud thing'.

      They call it microservices now:

      https://www.youtube.com/watch?...

      You might have heared what Netflix has been doing in that space.

      So the result is:

      Languages are now competing which each other because you are building microservices and the protocols are pretty much standardized (HTTP, JSON, REST).

      This means, languages get used for what they are best suited for.

      And if they don't fit. You just rewrite that microservice in an other language. These code-bases are very small. And the processes itself are usually stateless.

      All the data is stored in the data-store.

      This means you can do this 'webscale' thing with your stateless microservice, because you can start as many of them as you need. All you need to do is put a bunch
      of loadbalancers in front which disperse the requests over these other service specific processes.

      Most of the time these microservices are just a single process, a daemon. Some use Docker or other containers to deploy them. Microsoft is now building the same for Windows.

      Sometimes they include a webserver like nginx.

      The same is happening to databases, NoSQL and SQL like.

      You need to create a microservice that handles login ? You give it a seperate datastore, maybe you think LDAP is a good idea, who knows.

      You need to build a microservice which handles checkout ? You give it a seperate datastore too.

      You need to build a microservice which stores the session-information, yep, that too is a seperate microservice, it might be using .

      And remember: that one microservice is the only service talking to that data-store.

      Funny you should mention: project-manager.

      You know, it turns out, smart people don't need any management. They can manage themselves. Management really doesn't add much value. The more complex the problems get, it's best to let the poeple working on the problem decice how to work on the problem.

      Here is an example of bank, yes bank, which got rid of all the project managers:

      https://www.youtube.com/watch?...

      Some people might call all these things: devops, agile, cloud, software-defined-whatever and whatever else, but I think you might get the idea of what is going on.

      --
      New things are always on the horizon
    17. Re:No overlap for mindshare by EmperorOfCanada · · Score: 1

      Very interesting. Probably one of the best replies I have ever had on /. I do have one comment on project managers. Smart people don't need to be managed which is why one of the best developers (often in the position of manager) told me that a great project manager is there simply to deflect and isolate his team from the company. This is why I especially mentioned project managers in the same breath as stodgy companies. I have friends who work for stodgy companies and they pretty much need manager approval for every semicolon. Whereas I have friends who work for companies where they use the bulk of Beck's original XP and are amazingly productive with exactly zero people with a title manager.

      Your comments now have me ready to take a solid look at node.js.

    18. Re:No overlap for mindshare by Lennie · · Score: 1

      But I guess I was late with my comment, but I didn't get any extra points for it. ;-)

      You know, I don't always have time to keep an eye on what is going on the industry and lots of information/knowledge is spread around all over the place. But it only takes a few months to figure this stuff out. ;-)

      As I mentioned above, it's not so much about the language you use it's about applying it to the right task.

      node.js might or might not apply to what you need.

      You see some companies do:
      Node.js here because we got a good templating system, Go for this new part and Erlang for that other part because a really good open source system X already exists for that and Java for that other part because of open source library Y.

      So it's very much about seperation of concerns and using the best tool (read: language and existing other libraries or databases) for the task.

      The other part is:
      Deploying different services seperately (don't let deployment/update of one service depend on the deployment of an other). That is why different services don't share their databases. So they can be updated seperately.

      In larger companies, like Netflix, they put a seperate team on every microservice. They are completely self-organising, like a little startup or something like that. They choose the best tools for the microservice they are supposed to build and develop further.

      --
      New things are always on the horizon
    19. Re:No overlap for mindshare by jemmyw · · Score: 1

      Your post makes a lot of sense, but anecdotally is incorrect. I work for a large software company with a lot of Java developers. I know that many of them are entrenched, but it also seems that the majority (of the ones I've spoken to, pinch of salt) have tried out both Ruby and Node.js. The preference has been Node.js, and the term "right tool for the job" has even been used. i.e. Java backends with various small frontend services running on Node.

      There is no battle though, that's just headline eyeball grabbing. I personally prefer working on Ruby projects, but nodejs is fine for some things.

    20. Re:No overlap for mindshare by EmperorOfCanada · · Score: 1

      Yes, my toolset is usually Python and C++ but I have a large codebase with PHP and it is just too easy to keep adding PHP to it. My dream though would be to go to Python for a huge amount of stuff but it just doesn't cut it with much of what I do as well as C++ does.

      I would hate to work for a company with too many languages or too few. I suspect that if productivity were to measured by the number of languages in general use that there would be some magic number; much like having two monitors is more productive than one. (I still want to try 3).

    21. Re:No overlap for mindshare by Lennie · · Score: 1

      I would think the number of languages magic number can be slightly higher if you have more development teams/microservices.

      What I do know Amazon has a maximum size per development team/microservice: 2 pizza's
      https://blog.bufferapp.com/sma...

      I read some companies have a policy that the people developing the microservice should also develop the client library for that microservice.

      So in that case if you add more languages to an organization, you'll add a lot more overhead (every team would have to have at least one member that knows each language used in the origination, or at least the language of the other team which wants to talk to the microservice).

      --
      New things are always on the horizon
    22. Re:No overlap for mindshare by dbraden · · Score: 1

      I don't have any points to give, so I'll just comment that I thought it was an interesting post, as well.

  8. Some misconceptions by Just+Some+Guy · · Score: 4, Insightful

    1) Languages aren't compiled or interpreted: implementations are. Java has had a decent optimizing compiler for a long time, but JVM 1.0 wasn't exactly a speed daemon. JavaScript was a dog for a long time, but modern engines like V8 compile it to native machine code.

    2) Node.js isn't fast. It's concurrent. You can handle many thousands of simultaneous requests, as long as none of them are working particularly hard.

    3) Exactly what collision course are we talking about? I can't imagine many situations I'd consider Node.js for that I ever would have though about Java for in the first place. If anything, I see Node.js as more of a competitor to Python for building scalable backend services.

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:Some misconceptions by farble1670 · · Score: 3, Interesting

      2) Node.js isn't fast. It's concurrent.

      hmmm. i thought the thing about Node.js is that it *isn't* concurrent, it's event driven. there's one thread for your code, although connections are queued asynchronously. so ... many connections, but one thread servicing them all?
      http://blog.mixu.net/2011/02/0...

    2. Re:Some misconceptions by clifwlkr · · Score: 2

      And Java can be concurrent as well. It depends on the framework you are using to run it. Tomcat is thread bound, but things like akka and vert.x are not. In fact I suggest you look at the vert.x site to examine the speed increases you get on multi-core java with vert.x vs. node.js. Plus vert.x is a polyglot so you can also do Scala if it makes more sense. It is all about using asynchronous programming techniques which you HAVE to do in JavaScript, since it is single threaded, and you can do with Java. node.js is more about using cheaper web developers to put together a back end that barely functions. The node.js code I have seen is so unmaintainable with massive promise structures that will make your head hurt. If you truly need to scale to those kinds of levels you can do it even better with Java and the correct runtime environment.

    3. Re:Some misconceptions by IamTheRealMike · · Score: 5, Interesting

      2) Node.js isn't fast. It's concurrent. You can handle many thousands of simultaneous requests, as long as none of them are working particularly hard.

      That makes it sound like some Node.js specific trick. If you define concurrent to mean "has callbacks and non-blocking IO" then basically any language can be described as concurrent, so this doesn't tell us much. Nothing stops you writing Java in a fully non-blocking single threaded style if you want to mimic Node programming, and in Java 8 the syntax for doing so is actually lighter weight than JavaScript.

      But mostly people don't do that, because it's a pain in the ass. Node.js doesn't rely entirely on non-blocking operations with tons of nested callbacks because this is such a brilliant way of programming. Node relies on this because it's based on V8, a virtual machine designed exclusively for web browsers and browsers are not thread safe. Indeed one of the reasons V8 is able to get pretty impressive speed for such a dynamically typed language is because it just throws multi-threading out the window entirely. Writing a high performance VM is hard. Writing a high performance thread safe VM is much, much harder. Luckily the V8 guys can ignore it because a thread-safe JavaScript runtime is useless for browsers, and they never anticipated that anyone would love JS so much they'd actually use even if they didn't have to. So, it resurrects the Visual Basic model of concurrency from the 1990's.

      The JavaScript world meanwhile has developed a kind of Stockholm syndrome in which obvious weaknesses are spun around to become strengths. No type safety? No threading? Blocking on even a disk seek trashes your performance? You're just doing programming wrong, see, and Node's lack of features is in fact some kind of Zen minimalist wisdom designed to guide you to the light.

      This sort of thinking is very common in the world of programming languages because making a good one with all the features of the really big platforms (like the JVM) is really, really hard work, meaning compromises have to be made. Then because you are limited to interop with libraries written in C (again unless you build on .NET or the JVM), those language users realise their only chance for non-crap libraries is to convince the world to join them and rewrite everything in their language - hence the quasi-religious preaching of "simplicity is strength, our way is the high way" etc. The Go world seems to have this problem cubed.

    4. Re:Some misconceptions by Just+Some+Guy · · Score: 4, Informative

      Node.js is mostly event driven, but it's concurrent in the sense that it can be servicing many thousands of simultaneous requests by doing the parts that aren't currently blocked. It's not quite single threaded, though, as the blocking parts are handled in their own threads.

      --
      Dewey, what part of this looks like authorities should be involved?
    5. Re:Some misconceptions by phantomfive · · Score: 1

      1) Languages aren't compiled or interpreted: implementations are. Java has had a decent optimizing compiler for a long time, but JVM 1.0 wasn't exactly a speed daemon. JavaScript was a dog for a long time, but modern engines like V8 compile it to native machine code.

      With optimizing Javascript, it's hard to get around the speed problem that every variable access involves a hash-table lookup.

      --
      "First they came for the slanderers and i said nothing."
    6. Re:Some misconceptions by Just+Some+Guy · · Score: 4, Informative

      Disclaimer: I'm not remotely a Node.js fanboy. I've used it and and chances are good that you've interacted with some of my code today, but it's definitely not my preference.

      I said that "Node.js is concurrent" because 1) the summary claims it's fast, and 2) Node.js fans who don't fully understand it seem to think it's magically fast. No, it's not particularly fast: it's just able to handle a lot of requests at once. Those are orthogonal.

      --
      Dewey, what part of this looks like authorities should be involved?
    7. Re:Some misconceptions by pabloa98 · · Score: 1

      Node.js is not concurrent. I/O is "concurrent" because the task is flushed and replaced with other event. But that does not mean Node.js is a concurrent technology.

    8. Re:Some misconceptions by sribe · · Score: 1

      Node.js isn't fast. It's concurrent.

      For an extremely limited notion of "concurrent". Also, extremely outdated, even though an awful lot of people who are ignorant of computing history have convinced themselves that it's totally new & revolutionary. (I've been asynchronous reactive programming for nearly 15 years, and the way node does it is just awful.)

    9. Re:Some misconceptions by brantondaveperson · · Score: 1

      Languages aren't compiled or interpreted: implementations are.

      Though true, there are some languages that lend themselves to compilation more than others. Anything with an 'eval' statement, for instance, doesn't lend itself to compilation.

      Node.js isn't fast. It's concurrent.

      It should be though. If V8 compiles the javascript to machine code, why isn't it fast? I know it isn't, because it's an order of magnitude slower than the equivalent code written in C, and I think a fifth of the speed of code written in Go (from memory...). What's the deal?

    10. Re:Some misconceptions by sribe · · Score: 2

      The JavaScript world meanwhile has developed a kind of Stockholm syndrome...

      Yep. Go to any support forum for node and point out what a pain in the ass it is in node to actually handle all paths, including errors, correctly, and just watch the comments rain down reaming you for not understanding event-driven programming. When I started looking at newer backends that might handle reactive stuff better than RoR, all the info seemed to point to Node.js. When I actually started learning it, I was horrified.

    11. Re:Some misconceptions by Anonymous Coward · · Score: 0

      No type safety?

      So dynamically-typed languages are bad?

      No threading?

      The event-driven model works quite well in this case. In the case where it doesn't you wouldn't be using node. You do realize that there is not one tool that is best for every single job don't you?

      Blocking on even a disk seek trashes your performance?

      Who and how is spinning that into being a strength?

      You're just doing programming wrong

      No its that most people will choose the most appropriate tool for the job, whereas the cavemen will continue to use a hammer for everything and mutter about "kids these days with their new-fangled event-driven this and dynamically-typed that".

    12. Re:Some misconceptions by Anonymous Coward · · Score: 0

      Nothing stops you writing Java in a fully non-blocking single threaded style if you want to mimic Node programming, and in Java 8 the syntax for doing so is actually lighter weight than JavaScript.

      But mostly people don't do that, because it's a pain in the ass.

      Not entirely true. Most people don't program Java that way because it's a pain in the ass IN JAVA!

      Now how can that be? Java has got lots of great support for non-blocking HTTP lately. Servlet 3.1 allows for it. Undertow, Play, Vertx.io projects promote it etc.

      I'll tell you why: Because building an application/service that FULLY uses non-blocking I/O in Java is hard! Almost all HTTP-request handlers need to do more than answer "Hello World!". They need to use DBs, external caches, message queues and so on to do their work. And while you can argue that Java/JVM might have the best library support in the world those libraries are not all written to support non-blocking I/O, thus often forcing you to spawn separate threads to "wait for sockets" somewhere in the call-chain before the request handler is ready.

      Now Node.js does not even have an blocking socket alternative! Thus almost ALL Node.js drivers, DB-connectors, Message Queue Clients and etc. are written in a non-blocking fashion. There simply is no other alternative: Single thread/process and that's it!

      No other language has a comparable set of libraries as Node.js that all support the non-blocking paradigm, and that's why Node.js is so successful at it!

    13. Re:Some misconceptions by Anonymous Coward · · Score: 0

      Yes, the key is that Node.JS for lack of an existing paradigm and lack of threading capability, implemented something that *looks* like threads and gets maybe 85% of the benefit 95% of the time at a fraction of the cost.

      Meanwhile other languages have such a paradigm grafted on by an extension module, to varying degrees of 'seamlessness'. Those graft-ons end up delivering pretty much all the so-called 'performance' benefits without too horrible of syntax, along with the drawbacks (unable to deal with computationally intensive stuff and certain IO operations can ruin your day) . So Node.JS benefits for slightly more 'native' syntax to do the same thing, but the benefit is dubious.

    14. Re:Some misconceptions by Anonymous Coward · · Score: 0

      good luck making a compiling (to native) implementation on any language that is completely reflective.

    15. Re:Some misconceptions by Anonymous Coward · · Score: 0

      non blocking is simply a superior model, and all that fancy threading work is largely garbage.

      And I say this as a java and C programming; there is nothing threads do better than forks and non blocking io

    16. Re:Some misconceptions by narcc · · Score: 1

      just watch the comments rain down reaming you for not understanding event-driven programming

      Well, it's true. Most people don't understand event-driven programming -- many node advocates included.

      Remember when you first discovered lisp and learned about functional programming? It's a lot like that, it just appears easier on the surface, misleading many middle-of-the-road developers in to thinking they've got it all figured out after a quick tutorial.

    17. Re:Some misconceptions by sribe · · Score: 1

      It's a lot like that, it just appears easier on the surface, misleading many middle-of-the-road developers in to thinking they've got it all figured out after a quick tutorial.

      Good point. And I think those are the ones defending node, not the ones criticizing it ;-)

      (FYI, I've been working with event-driven asynchronous programming daily since 2001. I do think I've got it mostly figure out...)

    18. Re:Some misconceptions by disambiguated · · Score: 1

      Languages aren't compiled or interpreted: implementations are.

      That's true in theory, utterly false in practice. Major design choices hinge on whether the language is intended to be interpreted or compiled. Interpreting languages that are intended to be compiled can be done but it usually amounts to compiling in the background and doesn't work out well. Compiling languages that are intended to be interpreted typically results in an order of magnitude slower performance compared to a language designed to be compiled. The information needed to optimize the compiled code just isn't there so the compiler cannot eliminate type checks, type coercions, bounds checks, overflow checks, etc. Typically all function calls are virtual and many memory accesses are doublely indirect.

      Node.js isn't fast. It's concurrent. You can handle many thousands of simultaneous requests, as long as none of them are working particularly hard.

      That's not what concurrent means in this context. The word you're looking for is "asynchronous". All of the javascript code you write will execute on a single thread in Node.js. Some APIs are asynchronous with a callback. That style of programming is much older than me and I'm a greybeard. Asynchronous code is great if you need the performance and can deal with the complexity but it shouldn't be the only option. And seriously, Javascript? for performance? really?

      Server-side web programming can have a lot of in-flight requests being handled simultaneously, and not much need for synchronization because the requests are relatively independent (and the heavy lifting of dealing with race conditions is being handled by the database, operating system, file system and other libraries not written in javascript.) Real concurrent programming has much more data passing between threads of execution and the Node.js design of one single-threaded process per core is going to really suck for that.

      Look at this stackoverflow question about Node.js and multi-core processors (scroll down to the more up to date anwser.)

      "Node.js is one-thread-per-process. This is a very deliberate design decision and eliminates the need to deal with locking semantics. If you don't agree with this, you probably don't yet realize just how insanely hard it is to debug multi-threaded code."

      That made me actually laugh out loud. Threads were invented because they are easier than asynchronous programming. Asynchronous programming has it's own pitfalls. Writing asychronous libraries is hard, most programmers don't have much experience with it, and many available libraries can't be used because they're not asynchronous. It's all or nothing: one blocking call (or just one long running call) and every in-flight request in that process is stalled and you have one core doing nothing. The node.js people will tell you that if you're writing long running code in javascript, you're probably doing something wrong, completely contradicting the supposed advantage of being able to do client and server code in the same language.

      It's an intentional design decision all right, but not for that reason. The fact is that javascript engines like V8 were designed from day one to run in browsers and are inherently single threaded. Now that they've escaped the browser they're trying to make their single threaded nature out to be a feature. They're hyping asynchronous single threaded code because that's the only option. The browser implementers have zero interest in adding multi-threaded javascript support. Adding threaded javascript to browsers would be very difficult to say the least and rich source of new bugs, and the browsers just don't need it. Adding threading to just the server would fracture the language and remove the only advantage Node.js has. So instead Node.js tries to spin the lack of threads as a feature.

      The performance "g

    19. Re:Some misconceptions by Anonymous Coward · · Score: 0

      Actually some of what you wrote is a misconception about Node Js and V8.

      Node js IS multithreaded, just not the part that executes the javascript portion, it uses a threadpool provided by libuv for all async IO for example.
      You can even write multithreaded javascript with Web Workers, you just have to communicate with them through messages, which isn't all that bad.
      The callback hell can be partially solved using async libraries (q/async) and promises.

      I'm a recent node developer (doing mostly networking and C++ plugins), the "concurrent" stuff is cool for me as the code that the VM actually executes is little, and the heavy lifting done in the threadpool is efficient for me, the context switching between the VM and the C++ code is relatively fast, google invested a lot of time converting the javascript code to CPU byte code and it works in x86/64/arm, which makes it a good choice for cross platform support.

      In the end, the reason Node js runs relatively fast is the lack of bloat coming from frameworks such as asp.net and jsp, but the drawbacks are that everything already built into the frameworks like session management, authentication, template support is missing and when you add all of these features to node, it either becomes as slow as the rest of the frameworks and sometimes more complicated to maintain.

    20. Re:Some misconceptions by shutdown+-p+now · · Score: 1

      The funny part is that event-driven (or should I rather say callback-oriented) programming doesn't have to be complicated. Look at how easy it is in C# with async/await, where you can just take your regular code and sprinkle await over it to explicitly mark the points of async transfer of control - and it all just magically works, even when control transfer occurs e.g. across loop boundaries, or in an exception handling block.

    21. Re:Some misconceptions by IamTheRealMike · · Score: 1

      Yes, async/await is pretty good. The primary problem with writing totally async callback driven code is the mess it makes of the readability. Rewriting code that looks blocking to be totally non-blocking with a smart compiler is a good way to resolve that weakness. Then you just have the issue of old APIs and libraries that aren't non-blocking capable. Microsoft has done a good job of trying to drive async/await through their whole standard library. Java not so much.

    22. Re:Some misconceptions by Jamie+Lokier · · Score: 1

      With optimizing Javascript, it's hard to get around the speed problem that every variable access involves a hash-table lookup.

      This is not true, the faster Javascript environments use type analysis to optimise away hash table lookups.

    23. Re:Some misconceptions by Daniel+Hoffmann · · Score: 1

      The right term is "scales horizontally easily", but the parent post had the right idea. You can run multiple node processes in the same machine to use their multicore processors in order to handle more requests as well as run node processes across a huge cluster of machines. The event-driven architecture makes you design your application in a stateless manner so scaling it across multiple processes/processor-cores/machines is easy.

      By stateless manner I mean that your application stores any state data in a database that can also "easily scale horizontally" like mongo. Your traditional Java application stores a ton of state (just check Apache Tomcat session replication for an example), sure it is much faster in a single node, but once you need to synchronize all that data across multiple nodes not only your performance degrades, but your developers start to go crazy trying to get all the frameworks and their own code to play nice.

      You can design stateless Java applications, but it is not very common in my experience, Java frameworks usually go the route of trading information between nodes which makes horizontal scaling hard and reliability down (it is hard to eliminate all of the single point of failures).

    24. Re:Some misconceptions by jwhitener · · Score: 1

      One of the tasks that node handles well is something like an API system, or event/messaging/texting system.

  9. node is going away. by nimbius · · Score: 1

    https://iojs.org/ IO.js is the current fork of node.js, but controversial as it may be to say this java has been a trainwreck for a decade or more. Running a full size java weblet, bean, or whatever the hell its called requires tomcat, which requires mod_jk if you want it to scale past a webserver written in, well, Java. this stateless proxying between a java process, tomcat, apache/nginx, and the load balancer/user is a hellish nightmare to debug. tomcat caches DNS entries which means the whole service has to restart to avoid insanity during renumbering, and if its tied into mod_jk tomcat generally will not gracefully stop or restart. jk workers, true, can be pointed to a load balancer but load balanced tomcat? now youre writing lockers and working out 4j unified logging either in catalina or perhaps as a syslog service. And what about connectors? if underlying database calls for some reason in connectionfactory cant be made, connectors will not start and a cryptic glob of errors is excreted into catalina for review by qualified madmen.

    --
    Good people go to bed earlier.
    1. Re:node is going away. by new_01 · · Score: 4, Insightful

      God I swear the Java world is overrun with this kind of stuff. It requires you to fully jump into their world instead of just using a piece of it happily and moving on with your day. You have to go install the kitchen sink IDE, server, and whatever else. It's a career path just learning all of the lingo.

    2. Re:node is going away. by Anonymous Coward · · Score: 0

      Java:

      Write many times, run sometimes.. Maybe. Yeah. Don't plan on updating that JRE anytime soon.

    3. Re:node is going away. by IamTheRealMike · · Score: 1

      Sounds like you don't enjoy Tomcat much. Me neither, though it has a lot of features. But running a Java web app doesn't require Tomcat. There's a whole market of servlet containers out there, and some of them are embeddable resulting in standalone servers if you don't like the "run the app in a big web server" model.

      For example, a popular embedded servlet engine is Jetty, which has pretty good performance, easily handling hundreds of thousands of requests per second for a simple plaintext file, and seems to have better scalability than the others as concurrency ramps up.

    4. Re:node is going away. by mrops · · Score: 1

      Being a Java Developer, I am biased. Java lets you do things, large projects, deliver goods that need to be delivered. Tons of developers and extremely good set of third party libraries. Complete technology stacks from the likes of Apache and Spring.

      Tomcat is one such solution, Java has such a large open source momentum behind it that I can't imagine the problems you are describing are show stoppers, else someone would have fixed them.

      Last I checked, Maven had 860,000 artifacts, hard for a language to become so large if it has glaring holes. Hard for people to submit that much open source code and not fix the issues you describe.

      I guess I am one of a million qualified madmen you talk off, 9 out of 10 times a stack trace tells me what the issue is, so don't blame java because you don't know how to read a error log.

    5. Re:node is going away. by radish · · Score: 1

      Of course you don't need tomcat to write a web service in Java. I don't even remember the last time I used tomcat - typically I spin up a simple JVM process with an in-process http server (I like simplehttp, there are plenty of others) and take it from there. The nice thing about that approach is your process isn't tied to http as a protocol - want something else? Just add another in-process server for JMS or whatever. Where I work we front plain jvm processes with haproxy (apache is a dog, and even nginx is overkill for simple proxying) and can get hit rates up to 100k/s per node depending on the workload.

      The whole container model (e.g. tomcat, weblogic, etc) is heavy and while it does confer some benefits, if performance is a concern you shouldn't even consider it. In my previous enterprise life a hit rate of 5/s was considered high so honestly I could have used anything :)

      The nice thing about using the jvm for this kind of thing is it's stable, tested and well understood. Not something I can say about the latest branch of a fork of something originally built for a browser.

      --

      ---- Den ene knappen er powerknapp, den andre er Bender voice knapp "Bite My Shiny Metal Ass"

    6. Re:node is going away. by Anonymous Coward · · Score: 0

      Mod jk is really useless nowadays. A properly tuned tomcat+lib apr or tomcat 8+nio2 can scale better than a typical apache install.
      I can serve 200 requests/s, each of those request making a round trip to LDAP and a database on a single virtual core. And my 90% service time stays under 50ms. I could probably serve more but my target was 55/s and my workstation NIC was saturated so my test stopped at 200.... As for load balancing a tomcat syslog4j and memcached are your friends

    7. Re:node is going away. by Anonymous Coward · · Score: 0

      Hard for a language to become so large if it had glaring holes? Are You mad? Have You ever heard the word "COBOL", probably uttered with contempt by people who actually had to use it?

    8. Re:node is going away. by jwhitener · · Score: 1

      And the node world isn't? Gulp/Grunt/Gulp/express/etc... There is a whole big ecosystem of node stuff. It can get just as messy as Java. Its ease of use comes down to how well you understand it, mainly experience, just like any big platform with tons of options and plugins/libraries.

  10. Executive Summary by netsavior · · Score: 4, Insightful

    Node.js - I don't want to pay my programmers
    Java - I don't want to pay microsoft

    1. Re:Executive Summary by Anonymous Coward · · Score: 0

      You clearly haven't tried to hire Node.js developers recently... they all seem to want to get paid!

    2. Re:Executive Summary by Minwee · · Score: 2

      Do any of them program?

    3. Re:Executive Summary by netsavior · · Score: 2

      Most companies seem to think Node.js developers are comfortable getting paid just barely enough for beard-wax, pabst blue ribbon, and double decker bicycles.

      Whereas Java developers expect to get paid market wages so they can live in houses and buy cars, that sort of thing.

    4. Re:Executive Summary by teeeRav · · Score: 1

      I'd be happy to pay for beard wax and Pabst - anyone?

    5. Re:Executive Summary by jmkaza · · Score: 1

      That's why I'm fighting to keep node.js out of my organization... Management might start getting ideas. I am NOT switching back to PBR!

    6. Re:Executive Summary by Kevin+Stevens · · Score: 1

      Not sure why you think that? The Very Large Company I work for pays myself and my team very well to do node.js. Maybe they are rare in that they pay based on the type of work they do (building highly scalable services) instead of just by the technology they work in.

    7. Re:Executive Summary by goose-incarnated · · Score: 1

      You clearly haven't tried to hire Node.js developers recently... they all seem to want to get paid!

      He said programmers, not wannabe hipsters.

      --
      I'm a minority race. Save your vitriol for white people.
    8. Re:Executive Summary by Anonymous Coward · · Score: 0

      Chances are if you think you're building highly scalable services and think you're well paid, but are using node.js then you're probably not, because it's wholly the wrong tool for the job.

      You've either found a highly gullible employer who isn't very good at what they do, or you don't know what highly scalable and good pay actually is.

    9. Re:Executive Summary by Anonymous Coward · · Score: 0

      We wouldn't even drink PBR as piss poor college students, and it was literally $8 for a case. We opted to spend the $11 for a 30 rack of Natty Light because fuck PBR.

  11. Node.js is server side by perpenso · · Score: 2

    Java = back end
    JavaScript = front end
    Need both to do useful things, no?

    Node.js is an event driven framework for build web/network apps. It doesn't run in the browser, it is the server fulfilling browser requests. It just happens to use the javascript language.
    http://nodejs.org/

    1. Re:Node.js is server side by TWX · · Score: 2

      How about using PHP or Perl for the backend, and using no scripting at all for the frontend, so that it doesn't bloody well matter what browser one uses?

      With the introduction of stylesheets there's really no reason to do scripting on the client anymore. All formatting can be done with the stylesheet and the server can process what it needs.

      --
      Do not look into laser with remaining eye.
    2. Re:Node.js is server side by Urkki · · Score: 1

      Node.js is the server. Perl and PHP are rarely used as servers. Python's Twisted stuff resembles Node.js in many ways, I believe. Not domain expert, I'm sure someone corrects me shortly.

    3. Re: Node.js is server side by Anonymous Coward · · Score: 0

      The Web would be missing a lot of 2.0-ish functionality if it only had websites that worked like that. What about AJAX calls?

    4. Re:Node.js is server side by nitehawk214 · · Score: 1

      There is a wave between fat-client and thin-client that will be everlasting cycle. I got out of sync, though and forgot on which swing of the cycle we are on. I am pretty sure that XSLT was a few cycles ago, though. :)

      --
      I'm a good cook. I'm a fantastic eater. - Steven Brust
    5. Re:Node.js is server side by ShanghaiBill · · Score: 1

      With the introduction of stylesheets there's really no reason to do scripting on the client anymore.

      Please explain how to implement a 3D FPS game, or other interactive animation, using only static HTML and stylesheets.

    6. Re:Node.js is server side by Anonymous Coward · · Score: 0

      Wrong. For anything other than static webpages you need client side programming (or as you call it, 'scripting'). Otherwise the user gets to enjoy latencies and high bandwidth use due to constant page reloads. Take a look at d3.js or crossfilter for example.

    7. Re:Node.js is server side by Marginal+Coward · · Score: 1

      Not knowing anything about Node.js except various blurbs and hype I've read, here's something I don't understand about this so-called "epic battle": assuming Java generally has better run-time performance than Javascript, couldn't Node.js become "Node.java" and then the battle would be won by Java? Specifically, the good things I've read about Node.js seem to revolve around its architecture rather than the language it happens to be written in.

    8. Re:Node.js is server side by Em+Adespoton · · Score: 1

      I worked on the code for Medusa back in the 90's. I believe this eventually found its way into Plesk via Zope (which had Medusa at its core). There's lots of stuff out there using Python as a server; it's also trivial to create any sort of server (but especially an HTTP/HTML server) with a Perl interpreter. The modules are all sitting on CPAN.

    9. Re:Node.js is server side by robi5 · · Score: 1

      Interestingly, one of the most important but forgotten part about node.js hides in plain sight - it is that it's a NODE.

      More traditional architectures have a strong separation of client vs. server. But node.js is already showing some of what it means that it's a node:
      - you can write your code once and run it anywhere :-) be it client, server, middleware etc.
      - your server may not be just one server: maybe it's a network of servers (nodes), e.g. with functional separation, domaln object separation or partitioning separation
      - you already use node.js on the client side (the developer toolchain contains dozens of node.js based tools, like grunt)
      - some client/server lines are blurred; e.g. the use of phantom.js for testing or server side static page prerendering
      - the Internet of things is a buzzword, but it's coming

      So this highlights the strength of node.js and JS in general: while people with a traditional mindset say node.js is just a server which just happens to use Javascript, the implications are a lot more profound. Check out something like meteor.js to see how it allows a reimagination of data flows.

    10. Re:Node.js is server side by robi5 · · Score: 1

      Why PHP or Perl on the backend, if you already need to use JS on the client, AND you can as well use it on the server?

      For it is obvious that the modern web experience requires more and more dynamism, with fluid interactions, and this necessitates JS more and more (though with high bandwidth, low latency and high reliability may come dumber terminals which just receive video streams, but that's another 10-15 years).

    11. Re:Node.js is server side by TWX · · Score: 1

      Please explain how a web browser is the optimal medium through which to play a 3d first person shooter.

      --
      Do not look into laser with remaining eye.
    12. Re:Node.js is server side by robi5 · · Score: 0

      > assuming Java generally has better run-time performance than Javascript

      Java has no speed benefit of any impact over Javascript (e.g. V8). What you propose (node.java) actually exists (e.g. Ratpack); node.js elements such as non-blocking I/O were basically taken, and implemented in Java. Even with this there's no compelling argument for Java, and the developer mindshare and most action is in node.js land. These societal factors easily outweigh the few technical positives of Java.

      Java is most commonly used as a simple, synchronous web server, so statistically speaking, JS has the lead over Java (because node.js is non-blocking).

    13. Re:Node.js is server side by Anonymous Coward · · Score: 0

      Far too mainstream. Use C++.

    14. Re: Node.js is server side by CockMonster · · Score: 1

      From what I know of it, it's a wrapper over libuv

    15. Re:Node.js is server side by swillden · · Score: 1

      Please explain how a web browser is the optimal medium through which to play a 3d first person shooter.

      Optimal? Obviously not. But... it is in fact adequate these days, for an increasing set of games. And the web makes for fantastically low-friction deployment.

      OTOH, A mobile web browser is not adequate except for the most trivial games, and a bad idea for most of them.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    16. Re:Node.js is server side by Dynedain · · Score: 1

      Nope.

      Angular is an event driven framework for web/network apps. Node.JS is an executable that lets you run javascript on the server just like you can any other scripting language (PHP, Perl, etc...)

      It is popular because it allows for single-language client/server webapps, which nothing other thean Flash/Flex has been able to do with wide support.

      It also is extremely powerful in doing development-side preprocessing for client-side delivery. No need to learn Java in order to automate some JS/HTML/CSS tasks.

      --
      I'm out of my mind right now, but feel free to leave a message.....
    17. Re:Node.js is server side by Anonymous Coward · · Score: 0

      How about ... using no scripting at all for the frontend, so that it doesn't bloody well matter what browser one uses?

      I can think of at least three reasons:
      * Lots of interactions that are now taken for granted are not possible with CSS alone,
      * Lots of interactions that are not taken for granted but add real value to your page are not possible with CSS alone,
      * And possibly the least well-understood reason: round trips to the server to update a page's changed state are time consuming and disruptive.

    18. Re:Node.js is server side by ShanghaiBill · · Score: 1

      Please explain how a web browser is the optimal medium through which to play a 3d first person shooter.

      It is optimal if your mom will let you use her computer, but won't let you install any software.

    19. Re:Node.js is server side by digitalchinky · · Score: 2

      I'm not sure about games, though I build web based medical imaging systems for a living these days, along with a whole slew of related information systems. DICOM objects are decoded fully in the browser and render on canvas almost as fast as they do in native applications - this includes features like window level, stack scrolling, X, localizer lines, multiple viewports, and a myriad of other computationally expensive features. Managing memory is the most chalenging aspect by far.

      It's all written in native javascript, for what I do the frameworks are all too slow. So why web based when native performance is better and there are a thousand pre-built libraries and applications that are very nearly plug and play?

      In simplistic terms, it's what people want, all they have to do is open a web browser and they have the latest version.

    20. Re:Node.js is server side by Marginal+Coward · · Score: 1

      I've always thought that dynamically typed languages like Javascript are inherently slower compared to statically typed languages like Java, when running the same algorithms. Is that not true in the specific case of Javascript and Java? In other words does the V8 Javascript engine have some sort of special sauce that counteracts the overhead inherent in dynamic typing?

    21. Re:Node.js is server side by narcc · · Score: 1

      In simplistic terms, it's what people want, all they have to do is open a web browser and they have the latest version.

      That's really the #1 reason applications have been trending toward the web for nearly a decade: Easy deployment.

    22. Re:Node.js is server side by Anne+Thwacks · · Score: 1
      It is optimal if your mom will let you use her computer, but won't let you install any software.

      Which probably accunts for the 99% of 3d first person shooter users (since they are under the age of 11).

      --
      Sent from my ASR33 using ASCII
    23. Re:Node.js is server side by Anonymous Coward · · Score: 0

      Yawn, I'm off... - this is your users frustrated from page reloads and fucking off somewhere else. You need JS in the browser. It' done.

  12. Ya, no. by fahrbot-bot · · Score: 1

    While it may have been unthinkable 20 years ago, Java and JavaScript are now locked in a battle of sorts for control of the programming world.

    Hyperbolic much? Ya, no. It's still unthinkable.

    --
    It must have been something you assimilated. . . .
  13. Amateurs vs. amateurs.... by gweihir · · Score: 0

    That is a "battle" nobody with real skills cares about. "Dominance" at the low end, at best. But in keeping with the theme of incompetence, Java is actually mostly back-end these days, while JavaScript is decidedly browser-only, so the whole comparison is nonsense.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    1. Re:Amateurs vs. amateurs.... by jdschulteis · · Score: 1, Informative

      Java is actually mostly back-end these days, while JavaScript is decidedly browser-only, so the whole comparison is nonsense.

      Have you not heard of Node.js? It is server-side JavaScript, built around Google's V8 execution engine.

    2. Re:Amateurs vs. amateurs.... by Anonymous Coward · · Score: 1

      Java is actually mostly back-end these days, while JavaScript is decidedly browser-only, so the whole comparison is nonsense.

      I'm not big fan of Javascript or Node.js, but you have absolutely no idea what Node.js even is, do you?

    3. Re:Amateurs vs. amateurs.... by gweihir · · Score: 1

      I have heard of it. But using it makes things even worse and nobody with even barely acceptable engineering skills will consider using such a broken technology.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    4. Re:Amateurs vs. amateurs.... by gweihir · · Score: 1

      I do. But putting JavaScript on server-side is so utterly demented, even discussing it is redundant.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    5. Re:Amateurs vs. amateurs.... by frank_adrian314159 · · Score: 1

      Why? Your protestations to the contrary, why not?

      --
      That is all.
    6. Re:Amateurs vs. amateurs.... by gweihir · · Score: 1

      Nothing I can explain in a short /. posting. There are both problems with the language itself, its maturity and the mind-set it was written with, as with the typical JavaScript developer.

      On the other hand, people are also putting PHP on server-side, so maybe nobody cares about security, reliability and performance these days and I am just out-of-touch.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  14. Can someone explain node's supposed speed by MobyDisk · · Score: 1

    Node is fast supposedly because it uses low-overhead single-threaded asynchronous calls, instead of threading. So if that is such a fast paradigm, why don't we build a low-overhead single-threaded asynchronous Java or Python or C# engine? Eg: Node.java, Node.cs, and Node.py?

    People love to praise the speed of Node.js. The data comes in and the answers come out like lightning. Node.js doesn't mess around with setting up separate threads with all of the locking headaches. There's no overhead to slow down anything. You write simple code and Node.js takes the right step as quickly as possible.

    1. Re:Can someone explain node's supposed speed by Anonymous Coward · · Score: 0

      You mean like Nginx?

    2. Re:Can someone explain node's supposed speed by IamTheRealMike · · Score: 5, Interesting

      Node is slower than a modern typed VM like the Java on the JVM or C# on .NET. Let's get that out of the way right now - Java is faster than Javascript. The reason is that Javascript source lacks a lot of info needed to efficiently map it to machine code, so V8 and other fast JSVM's all have to rely heavily on speculation. That's a fancy way of saying they guess what the code might do, compile that, and then recompile it again if it turns out they were wrong (or if the code actually changes itself at runtime which is not uncommon for dynamic languages).

      Now to be clear, Java itself is actually a kind of hybrid static/dynamic language. For example all code is lazy linked and you can generate and load new code at runtime as well, if you want. All method calls are virtual by default etc. The JVM requires tons of complexity and machinery to make all that work with acceptable performance ... but it's still able to do a better job than with Javascript because the code contains more static type info up front.

      So why do people think Node is fast? A couple of reasons. Partly it's because the sorts of people who are attracted to Node are the sorts of people who were previously using languages like Python, Ruby and PHP. Compared to the interpreters for those languages, V8 and thus Node really is very fast. Python/Ruby/etc don't speculate or produce machine code at all (though their JVM versions do). So, for people who code in the dynamic languages space, Node is a big step up.

      Secondly, Node apps have a nasty habit of being built on NoSQL-ish database layers like MongoDB. These databases were being developed and getting hip around the same time that Node was becoming popular, so there are asynchronous database drivers for them. "Nasty" because they seem to be very frequently applied in cases where they aren't appropriate. BTW I say that as a former professional BigTable administrator, so I'm not a n00b when it comes to NoSQL databases.

      In contrast most of the people developing Java/.NET web apps are usually developing business apps of various kinds and have older code bases, so they are using MySQL, PostgreSQL, Oracle, etc ..... more traditional relational databases which have only blocking drivers. That means for any web app that does database work i.e. all of them, the Java web servers will spend most of their time waiting around for the database. Whilst doing so they are holding thread stacks in memory. Thread stacks generally have to be sized at creation time for the worst case scenario, which means they tend to be large. 1mb stacks are not unheard of. Node, in contrast, requires asynchronous code at all times because V8 is not thread safe. It doesn't give you any choice in the matter. A callback closure held on the heap tends to require much less memory than a thread stack, thus, you can suspend many more computations at once when programming in this style.

      If you can suspend a lot more computations simultaneously for the same amount of RAM, then you can force more traffic through a single server before it runs out of memory and falls over. And though people tend to talk about tens of thousands or hundreds of thousands of threads not scaling, actually since a bunch of major upgrades many years ago (NPTL, constant time scheduler etc) Linux has been actually able to handle bazillions of threads. The problem is that requires a very unusual programming style to achieve due to the tiny stacks, and Java/.NET aren't really designed with it in mind, so in practice nobody makes servers that work this way.

      All this is a long winded way of saying that the programming style Node forces you into is genuinely more memory efficient than the thread-per-request style, and if you can fit more requests into memory at once then it will appear that a single server can "go faster" .... even if technically the code executes slower.

      But here's the catch. Is it worth it? You've been able to do asynchronous programming for a

    3. Re:Can someone explain node's supposed speed by jdschulteis · · Score: 2

      Node is fast supposedly because it uses low-overhead single-threaded asynchronous calls, instead of threading. So if that is such a fast paradigm, why don't we build a low-overhead single-threaded asynchronous Java or Python or C# engine? Eg: Node.java, Node.cs, and Node.py?

      There is no reason not to build a single-threaded, asynchronous web server in the language of your choice. I'd be surprised if there aren't a bunch of them out there by now.

      Node has the advantage of using the same language for both client and server side code. Since JavaScript is the de facto standard for in-browser code, any other language pretty much requires a translation step.

      Node also has a robust community and a lot of framework and library packages.

    4. Re:Can someone explain node's supposed speed by DCstewieG · · Score: 2

      http://vertx.io/

      Vert.x is a lightweight, high performance application platform for the JVM that's designed for modern mobile, web, and enterprise applications.

      Write your application components in Java, JavaScript, CoffeeScript, Ruby, Python or Groovy...

    5. Re:Can someone explain node's supposed speed by robi5 · · Score: 1

      > Node is slower than a modern typed VM like the Java on the JVM or C# on .NET. Let's get that out of the way right now - Java is faster than Javascript. The reason is that Javascript source lacks a lot of info needed to efficiently map it to machine code, so V8 and other fast JSVM's all have to rely heavily on speculation. That's a fancy way of saying they guess what the code might do, compile that, and then recompile it again if it turns out they were wrong (or if the code actually changes itself at runtime which is not uncommon for dynamic languages).

      I don't think it follows. Both Java and JS use JVM and both need to compromise some performance in the name of safety. Code fragments that are used once won't be optimized and it won't matter. CPU heavy lifting occurs if you operate on larger memory blocks (typically loops or nested loops). One common example is matrix multiplication. If you worked at Google, you may be familiar with how a Javascript array can hold unboxed integers or floats, if the programmer followed common sense and didn't destroy this optimisation by also storing strings in the array (of course you can use typed arrays too in JS...). If the JIT knows the bounds of the array and the element type, why would a Java MMULT be inherently faster than a JS MMULT?

      By the way, even if the JIT cannot guarantee e.g. the type of something: the overhead does not occur because the JIT has to deoptimize something. With well written code, the programmer avoids the circumstances that would lead to such deoptimization. Instead, the overhead occurs because the JIT cannot guarantee it in all circumstances, and by extension, when it is unsure, it is obliged to check first. These instructions are typically low level bit tests and the like, and they add instructions, but they don't typically involve extra memory lookups or some other complex thing that would slow down a modern multiscalar CPU. But again, most performance-critical time would be spent in tigth loops running on typed arrays, where memory alignment, cache hits etc. play a more important role than the language, and neither JS nor Java has the type of control over memory allocation or memory arithmetic that C has.

    6. Re:Can someone explain node's supposed speed by Anonymous Coward · · Score: 0

      Those "callback messes" are actually quite easy to read if you dont suck so much. Simple blocking programs are cute for elementary school children, but when its time to make real work get done you have to grow out of it.

      why dont you drop a pair, get over your deficiences, and learn to deal with asynchronous programming.

      Asynch is the future, not sweatshops full of blocking java monkeys.

    7. Re:Can someone explain node's supposed speed by phantomfive · · Score: 1

      Last time I checked, my Linux box was giving C threads 8MB of RAM on the stack by default. You can change that (and if you want to use lots of threads, you should change that).

      The JVM uses much, much smaller stacks. Small enough that even typical recursive algorithms don't work.

      --
      "First they came for the slanderers and i said nothing."
    8. Re:Can someone explain node's supposed speed by Tablizer · · Score: 1

      Asynch is the future

      Is there a Vegas slot for that prediction?

      640k threads should be enough for anybody :-)

    9. Re:Can someone explain node's supposed speed by shutdown+-p+now · · Score: 1

      We have it in C#, actually. The language has async/await specifically to enable this model (and still write code that looks much more natural then explicit Node-style callbacks), and the newish frameworks, like ASP.NET MVC or Windows XAML, are async through and through.

    10. Re:Can someone explain node's supposed speed by IamTheRealMike · · Score: 1

      8mb! Wow, I didn't realise anyone was going that high. That's a lot.

      I didn't know what the JVM used but just looked it up - seems it used to vary haphazardly between platforms but when they moved to 64 bit they standardised on 1mb by default. Still pretty big. I remember when the Linux kernel guys moved to 4k stacks. It broke a whole lot of drivers. 4k is pretty aggressive but still a lot larger than a compactly serialised closure.

    11. Re:Can someone explain node's supposed speed by Anonymous Coward · · Score: 0

      It doesn't, it gives them 8MB address space. Linux will map this into the physical memory only when the pages get accessed. So it's a single page (4kb by default) per thread unless the thread stack grows beyond this.

      On a 64-bit architecture, address space is not a scarce resource, so number of threads is a nonissue.

    12. Re:Can someone explain node's supposed speed by phantomfive · · Score: 1

      Nice point.

      --
      "First they came for the slanderers and i said nothing."
    13. Re:Can someone explain node's supposed speed by phantomfive · · Score: 1

      Someone pointed out to me that the Linux kernel doesn't give the processes 8 MB of RAM, it gives them 8MB of address space for the stack. It doesn't actually give them physical RAM until it is needed, so unless more is needed each process will get one page (4k) for the stack.

      On a 32 bit machine, it doesn't make much difference, but on a 64 bit machine, address space is not a scarce resource so for practical purposes the stack is only 4k. Still bigger than a serialised closure.

      --
      "First they came for the slanderers and i said nothing."
    14. Re:Can someone explain node's supposed speed by MobyDisk · · Score: 1

      One clarification: Threads get 1MB of "virtual" stack memory, not physical stack memory. This minor oversimplification leads developers to conclude that threads are orders of magnitude more expensive than they actually are.

    15. Re:Can someone explain node's supposed speed by coofercat · · Score: 1

      Just to add, that the event driven thing makes a difference where you're doing lots of small transactions - in that case, you can support thousands of incoming requests with just one process using a relatively small amount of RAM. You can really make it fly by locking it to a CPU core and giving it real-time priority. If you expand that out to all but one of your system's cores, then assuming you have the ram, one box can serve nearly everyone on the planet, just so long as no one asks for anything too complicated. That's a pretty specialised use-case, which very few of us really need to think about.

      However, as you say, almost no one really needs to squeeze the last few percent of performance out of any web app they're running. Your boss might complain about the cost of another server, but it's easily manageable in the grand scheme of things. That being the case, having a slightly inefficient stack, and some occasional cross-core IPC, in exchange for keeping your systems pretty close to vanilla, and keeping your code, testing and deployments super-simple makes a lot of sense.

    16. Re:Can someone explain node's supposed speed by Anonymous Coward · · Score: 0

      So Windows 3.0 using its cooperative multitasking should be faster than Windows NT with its preemptive multitasking.

    17. Re:Can someone explain node's supposed speed by Anonymous Coward · · Score: 0

      You lost it right about here:

      Both Java and JS use JVM

    18. Re:Can someone explain node's supposed speed by ultranova · · Score: 1

      On a 32 bit machine, it doesn't make much difference, but on a 64 bit machine, address space is not a scarce resource so for practical purposes the stack is only 4k. Still bigger than a serialised closure.

      Threads are closures. The question the developer is faced with is: use manual closures with all the work that involves, or use closures with hardware support for resuming them (threads) with the inflexibility of data structure alignment and uncertainty of just when and in what order the closures are resumed.

      Of course, a cooperative multithreading library might be the best of both worlds.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    19. Re:Can someone explain node's supposed speed by phantomfive · · Score: 1

      Of course, a cooperative multithreading library might be the best of both worlds.

      Some other people think so too

      I don't really understand what definition you are using to consider threads closures, though.

      --
      "First they came for the slanderers and i said nothing."
    20. Re:Can someone explain node's supposed speed by ultranova · · Score: 1

      I don't really understand what definition you are using to consider threads closures, though.

      The standard one: a function with associated environment. An OS scheduler resuming a thread means it's basically resuming a closure representing that thread. When the thread ceases running - for example by calling "yield()", or having an interrupt occur - the system creates a new closure composed of a pointer to the next instruction (essentially treating it as a lambda function) and associated environment (the thread stack) and puts it into the run list (or appropriate waiting list).

      Here is a cooperative multithreading monad I made in Haskell which utilizes exactly this pattern. And here is some test code.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    21. Re:Can someone explain node's supposed speed by phantomfive · · Score: 1

      I don't think that's a normal way to think of closures. Closures are orthogonal to the threading model.

      It is an interesting way to look at operating system design, however.

      --
      "First they came for the slanderers and i said nothing."
  15. Hyperbole by Anonymous Coward · · Score: 0

    With so much on the Net and 99.999999999999999999999% of it total shit, hyperbole is the ONLY way to get through the noise.

    And considering that most "articles" on the Net are written by mentally challenged people, the Internet will be totally written by retards in order to drive advertising for complete crap that is sold on the Internet.

    Let's face it, the Internet has jumped the shark, is completely worthless, and is populated by the lowest forms of humanity on Earth.

    You and I are the exceptions, of course.

    Well, at least I didn't lower myself and actually register for an account - what kind of moron falls for that bullshit.

  16. Java won a long time ago by magical+liopleurodon · · Score: 1

    We know this by all the people who refer to Javascript as Java. You know who you are (#businesspeople).

    When the reverse starts happening, I'll change my mind.

  17. JavaScript Stockholm syndrome by handy_vandal · · Score: 1

    The JavaScript world meanwhile has developed a kind of Stockholm syndrome in which obvious weaknesses are spun around to become strengths.

    Damn, this is both +Funny and +Insightful. Wish I had mod points, and the ability to assign two of them to your post.

    --
    -kgj
  18. Web 2.0 faggotry by Anonymous Coward · · Score: 0

    Neither is needed in a non-Facebook, non Web-2.0, non-sizzle-over-steak Web.

    1. Re:Web 2.0 faggotry by Anonymous Coward · · Score: 0

      Its funny how even with the glacial pace of the evolution of the web you still have people who cant keep up. Go hang on your BBS and IRC and just ignore everything else, sorry we took away your geocities and altavista.

  19. That's where Vaadin enters the picture by magi · · Score: 1

    Instead of writing JS both on client and server, the Node.js approach, you can write Java on both - that's how Vaadin Framework approaches web applications, by using GWT Java-to-JavaScript compiler for the client-side part. And usually you don't need to write ANY client code, and all client-server communications are completely invisible. You're just writing a UI in Java and can forget most of the client-side peculiarities.

    Vaadin is also pretty flexible and allows mixing the approaches to a great extent, allowing JavaScript client-side widgets and other JS integration. You're also free to use other languages than Java for many client-server tasks, such as for REST services.

    Not to mention that you can just as well use Scala and such for the server-side.

    1. Re:That's where Vaadin enters the picture by Anonymous Coward · · Score: 0

      Except then you have a chatty frontend that sends mouse events back to the backend to process. At least that is how it worked the last time I used Vaadin.

    2. Re:That's where Vaadin enters the picture by robi5 · · Score: 1

      One can find an interesting niche project for anything... but probably the analogous meteor.js (as in Javascript) has a larger community. It may be to do with social reasons; the JS world could remain nimble while the Java world has matured, consolidated, slowed down and lost its coolness as well as edge. By now, those Java folks who were more ambitious, are testing Clojure, Scala or RxJava.

    3. Re:That's where Vaadin enters the picture by magi · · Score: 1

      You are right, there is usually more chattiness than in apps where more application logic is handled on the client-side. While there's apps where you absolutely want to minimize that, it's not really a problem in many or even most cases, and many apps have bigger considerations. One big problem in pure client-side coding is that you'll expose more application logic to the client-side, where anyone can snoop it, and need to be more careful with security issues.

      You can also do client-side coding much to the extent that you need in Vaadin apps, by implementing complex components or entire views in GWT or JavaScript code, and then just syncronizing the changes as you like. That's actually what you need to do if you want to enable offline mode in Vaadin TouchKit apps.

      I wouldn't quite say mouse events, as that includes low-level events such as mouse move events. Vaadin usually sends somewhat higher-level events, such as clicks on button components (not all buttons) and selection changes. You can lessen those by setting components as non-immediate. Sure, there's one case in drag-and-drop handling where even mouse move events can be sent.

  20. Massive over generalization much? by JustNiz · · Score: 4, Insightful

    >> Java and JavaScript are now locked in a battle of sorts for control of the programming world.

    Whatever. Wake me up when you can write a (good) device driver in either then I'll take your claim a little more seriously.

    I realise that the internet is a massive source of employment, but believe it or not, its not the only thing out there. There are acutally a few of us software developers left that do not do web stuff (and actually like it that way).

    1. Re:Massive over generalization much? by Anonymous Coward · · Score: 0

      And just like farming we're going to keep thinning out the bottom to keep piling on the top. Corn-to-commodities is no different from drivers-to-webpages.

      Except in a few years there'll be no driver programmers left and we'll just have a bunch of calculator apps that don't work on most hardware. That or the only working app left is TeaCooker, and it'll run in a container on a virtual machine in an emulator. We'll probably all starve long before that happens though.

    2. Re:Massive over generalization much? by w_dragon · · Score: 2

      Most of the Internet also runs on C and C++. Networking firmware, web servers, browsers, hell node.js is written in C++. I don't see any shortage of demand for people who work in a language that doesn't need a VM to run.

    3. Re:Massive over generalization much? by Eythian · · Score: 1

      Device driver writing is pretty niche. Wake me up when you can write a good web application in C.

    4. Re:Massive over generalization much? by Tablizer · · Score: 1

      I can, but it would take me 3 times as long. Needless to say, different languages fit different needs differently.

    5. Re:Massive over generalization much? by Anonymous Coward · · Score: 0

      Google, Facebook and Amazon.com all have major parts in C++.

    6. Re:Massive over generalization much? by Anonymous Coward · · Score: 0

      Apache. Done.

  21. We just had another vapid piece about this by Anonymous Coward · · Score: 0

    The same meaningless "head-to-head", the same completely mistaken fake contrasts, same shit, same site, different day.

    Oh wait, that was "PHP vs. Node.js". Then this is completely different, of course. Carry on.

  22. This is not a mindshare battle...at all by MillerHighLife21 · · Score: 5, Insightful

    Javascript, despite it's popularity, is a terrible language. It's popularity is due to one thing, it is embedded in the browser. If you could just pick your own language to embed in the browser, you'd never hear of it. The entire level of popularity from Node.js has come from 3 things:

    1. Frontend (read, client side, not "PHP") developers who get the idea in their head that they already know javascript so wouldn't it be great to use it on the server too so they don't have to learn another language
    2. Non-blocking I/O, which is admittedly very worthwhile on the server side...however, Java still blows it out of the water for concurrency and Go is currently doing everything that Node does here, but better.
    3. AJAX development, making JSON popular, leading to JSON based NoSQL databases like Mongo (which is great at what it does) and then uses Javascript for processing in the database too because of JSON

    There's a 4th reason that gets tossed around that I've never seen actually validated with the idea of "reusing code on the backend and the front-end" but I've never seen a case where that was actually a good idea since it involves exposing so much logic.

    On the frontend, yes, Javascript everything...because you have no other option. That's like saying black was beating green for mind share with the Model T Ford.

    On the backend, you have Java, Go, .NET, Ruby, Python, PHP, Clojure, Groovy, Erlang, Perl, Scala...all of these languages exist with different benefits and different trade offs.

    If anything, a huge piece of Go's skyrocketing popularity is people wanting the non-blocking I/O perk of Node for certain use cases without all of the pain that comes from dealing with Javascript.

    --
    "Don't teach a man to fish, feed yourself. He's a grown man. Fishing's not that hard." - Ron Swanson
    1. Re:This is not a mindshare battle...at all by robi5 · · Score: 1

      > Javascript, despite it's popularity, is a terrible language. It's popularity is due to one thing, it is embedded in the browser.

      A devil's advocate may answer that if JS were that terrible, it and the browser and the web (or Web 2) wouldn't have taken off. But this also offers no proof or reason.
      Admittedly there's lots of dislikeable parts of JS, but we probably agree that for whatever reason it happens to be one of the most popular languages ever.

      > There's a 4th reason that gets tossed around that I've never seen actually validated with the idea of "reusing code on the backend and the front-end" but I've never seen a case where that was actually a good idea since it involves exposing so much logic.

      I don't understand 'so much logic'. You need to validate user input in the browser (with 'logic') to avoid server round trips for common errors; but you also must validate data on the server side, because you can't trust the incoming POST/PUTdata (it may come from a malicious agent). Why would you program the validation twice? The same goes for aggregations, filtering, sorting, utilities etc. - not to mention prerendering the page on the server side for faster initial load or some other purpose (SEO optimization).

      > On the frontend, yes, Javascript everything...because you have no other option. That's like saying black was beating green for mind share with the Model T Ford.

      > On the backend, you have Java, Go, .NET, Ruby, Python, PHP, Clojure, Groovy, Erlang, Perl, Scala...all of these languages exist with different benefits and different trade offs.

      So instead of a zillion competing options with various tradeoffs, just pick the language you already use anyway (JS), which also has various tradeoffs, with the big plus that you don't introduce a language chasm along arbitrary technical boundaries such as some length of wire between a data center and the user.

    2. Re:This is not a mindshare battle...at all by MillerHighLife21 · · Score: 2

      > I don't understand 'so much logic'. You need to validate user input in the browser (with 'logic') to avoid server round trips for common errors; but you also must validate data on the server side, because you can't trust the incoming POST/PUTdata (it may come from a malicious agent). Why would you program the validation twice? The same goes for aggregations, filtering, sorting, utilities etc. - not to mention prerendering the page on the server side for faster initial load or some other purpose (SEO optimization).

      Validation has to be done on the server side no matter what. In the browser, you can also validate and if the server round trip is unbearable you can AJAX validate. At best you're only able to do some validations in the browser without hitting the server since you can't easily check for uniqueness in the database or rules other than "meets these general form requirements".

      Aggregations come from data, in the database. Unless you're hitting API's on the server side to pre-render then you've got one set of logic accessing a database and one set accessing the API's. Otherwise you're just hitting a bunch of APIs from the browser meaning the data access logic is on the back and the API access/AJAX logic is on the front.

      Filtering allows you to filter based on what's on the page, so again, unless your entire database is in the browser or you're hitting an API on the backend instead of a database so that you can use the same API on the front-end, it's separate logic. Sorting...what's already in the client vs data in the database.

      Which leaves pre-rendering for single page apps on the server side for SEO purposes so you can use the same rendering logic on the client side. That just about the only legit use case and that can be worked around simply enough by just allowing whatever server side language is rendering the template to inject placeholders for the client to be able to reuse.

      > So instead of a zillion competing options with various tradeoffs, just pick the language you already use anyway (JS), which also has various tradeoffs, with the big plus that you don't introduce a language chasm along arbitrary technical boundaries such as some length of wire between a data center and the user.

      Because javascript is unnecessary unless you're building a single page app meaning there's a decent chance you're not using it anyway. If you're predetermined to always use javascript, it's usually a good sign that you don't need to be making decisions about server side code.

      The one use case where Node stood out as a great solution was for an API front-end because of the non-blocking I/O aspects and in practice projects get to be unmaintainable callback soup. Which is why the second you try to do anything serious with Node, you find out about Go and never look back.

      The reason you don't just pick the language you use anyway is because the only reason it's "the language you use anyway" is that it is forced upon you. If anybody had a choice in the matter they wouldn't select it because it's a terrible choice. That's like asking people why they don't just use Windows servers since they already use Windows desktops anyway...because virtually all of those other options are much better choices for the task and there's no reason to start a project with a handicap.

      If using something other than javascript on the server side introduces a language chasm, I'd hate to see what chasm considerations database selection process looked like.

      --
      "Don't teach a man to fish, feed yourself. He's a grown man. Fishing's not that hard." - Ron Swanson
    3. Re:This is not a mindshare battle...at all by Dynedain · · Score: 1

      There's a 4th reason that gets tossed around that I've never seen actually validated with the idea of "reusing code on the backend and the front-end" but I've never seen a case where that was actually a good idea since it involves exposing so much logic.

      Check out Meteor, a framework built exactly on that idea - it's pretty crazy how easy it is to setup a rich *reactive* web app that keeps state sync across multilple devices. It's also crazy tiny for transmission size because only micro-snippets of data are exchanged between client and server instead of full page views.

      --
      I'm out of my mind right now, but feel free to leave a message.....
    4. Re:This is not a mindshare battle...at all by Anonymous Coward · · Score: 0

      Terrible language? To the contrary, I found that I really like Javascript. At first I thought it was terrible, but that was before I read a book explaining how it all works. Now, out of the 20 languages I know, its one of my favorite, if not my very favorite. When I read messages like this, I usually think the author never bothered to fully learn the language before commenting, which may or may not be true. Regardless, not everyone holds Javascript in such low regard, and I thought it was worth mentioning.

    5. Re:This is not a mindshare battle...at all by Shados · · Score: 1

      There's a 4th reason that gets tossed around that I've never seen actually validated with the idea of "reusing code on the backend and the front-end" but I've never seen a case where that was actually a good idea since it involves exposing so much logic.

      In a lot of fields you basically don't have a choice but to render stuff on the server side, for SEO, initial performance, etc. Depends on the field, but in giant e-commerce and whatsnot, you don't really get to choose here. So thats a given. Thus, if you want to be able to use javascript based UI...you either duplicate code, or you go isomorphic.

      With stuff like React or Meteor, isomorphic isn't that hard. So its becoming semi-common, when it makes sense.

    6. Re:This is not a mindshare battle...at all by Jahta · · Score: 1

      Agreed. Having read a fair bit on node.js I've struggled to find anything more than a lot of hype (mainly based on the flawed assumption that what works in the browser will work equally well on the server).

      I found this article - The emperor’s new clothes were built with Node.js - an informative (and entertaining) read.

    7. Re:This is not a mindshare battle...at all by MillerHighLife21 · · Score: 1

      There are so many javascript frameworks these days that it is really difficult to justify investing the time. In an effort to be more open minded I'll give it a look though.

      --
      "Don't teach a man to fish, feed yourself. He's a grown man. Fishing's not that hard." - Ron Swanson
    8. Re:This is not a mindshare battle...at all by MillerHighLife21 · · Score: 1

      I've learned it. I'm not going to pretend that I'm unbiased about this stuff because I was building single page applications before jQuery or Prototype even existed, before JSON was a thing, and when you still had to code things to work in IE6, Firefox, and Safari (because Chrome wasn't a thing yet). Because of that I've got an internal bias of treating anything in the browser as insecure and unreliable.

      jQuery did more to change this than anything simply because their approach to client code allowed for graceful degradation. Javascript as an enhancement but not a dependency that could naturally fallback to working on HTML alone. This has always been a really solid approach.

      Javascript's prototyping structure has it's merits, specifically for working within a browser and attempting to minimize object space for what's loaded in. I appreciate that, however, the language itself has a number of concerns when compared with other server side options.

      --
      "Don't teach a man to fish, feed yourself. He's a grown man. Fishing's not that hard." - Ron Swanson
    9. Re:This is not a mindshare battle...at all by Tablizer · · Score: 1

      if JS were that terrible, it and the browser and the web (or Web 2) wouldn't have taken off.

      JS is fine as a light-duty "glue" language and it satisfies that niche fairly well, but for complex applications or libraries, a compiled or strong-typed language is often a better choice. Their "anal" features prevent a lot of problems for larger or layered projects.

      JS has been stretched beyond its practical limit as the demand for fancier or desktop-like GUI's pushes the UI envelope on the browser side.

      On the client side there are not many practical language alternatives, but since on the server side we do have choice, we can and do choose NOT go with JavaScript.

      And while sharing code on the back-end and front-end is a nice option, the volume of sharing opportunities is not nearly enough to justify JS on the server side.

      What we really need is a GUI-friendly browser and/or standard so that common GUI idioms can be called up declaratively rather than rely on GUI libraries and actions being sent over to the client.

    10. Re:This is not a mindshare battle...at all by Anonymous Coward · · Score: 0

      Javascript is the "English" of the programming world: ie. it is ubiquitous. Like English, javascript is far from perfect. But it has the advantage that if a company takes a given pool of programmers and start a new web project, it will find that most already know javascript. Even if they don't, Web development means they will be forced to learn it (in order to interact with the frontend).

      Certainly, some feel there is no problem becoming an expert in many languages/eco-systems: Java, C#, Go, etc. But ultimately learning and mastering a single language (however flawed) is simpler and more manageable for most people. And at the end of the day you will also need to learn javascript.

      Moreover, Node JS is not the only javascript alternative. For embedded work there is also JSI (disclosure: my project), which is for using javascript with C. If your interested you can check it out here:

        http://pdqi.com/jsi

      What does this have to do with Java? Nothing. But it goes to reuse. Reuse of skill-sets rather than code.

    11. Re: This is not a mindshare battle...at all by Anonymous Coward · · Score: 0

      HTML is English. JavaScript is emoticons. If can be useful in the right context and even add some value but it's certainly not the basis for communication.

    12. Re:This is not a mindshare battle...at all by Bent+Spoke · · Score: 1

      Javascript is the "English" of the programming world: ie. it is ubiquitous. Like English, javascript is far from perfect. But it has the advantage that if a company takes a given pool of programmers and start a new web project, it will find that most already know javascript. Even if they don't, Web development means they will be forced to learn it (in order to interact with the frontend).

      Certainly, some feel there is no problem becoming an expert in many languages/eco-systems: Java, C#, Go, etc. But ultimately learning and mastering a single language (however flawed) is simpler and more manageable for most people. And at the end of the day you will also need to learn javascript.

      Moreover, Node JS is not the only javascript alternative. For embedded work there is also JSI (disclosure: my project), which is for using javascript with C. If your interested you can check it out here:

          http://pdqi.com/jsi

      What does this have to do with Java? Nothing. But it goes to reuse. Reuse of skill-sets rather than code.

      (reposted as forgot to log in)

    13. Re:This is not a mindshare battle...at all by Anonymous Coward · · Score: 0

      Please dont mention .NET

  23. There's no battle by quietwalker · · Score: 2

    Every few years, we have a new latest and greatest. A few years ago it was ruby on rails, then it seemed python was starting to come into it's own, and now it's node.js. At one point in time, in the mid 90's, it was actually Java. If you can imagine, Applets were actually a big deal.

    Programmers flock to these in droves because, being new(ish), it attracts proselytizers who overhyper and oversell it, authors to write about it, articles about it, speakers to present it, a race to be seen as an expert in it, etc. New means 'new opportunities' so there's a rush to fill this hole that's already been filled in other languages/frameworks. Lots of activity.

    All this attention, and it being new makes it a toy to play with and something to trick the boss into agreeing to use, so you have an excuse to use it. Some small number of folks will end up dealing with it for a bit, but then they drop it when something newer - and thus more interesting and exciting - comes out. Check out the TIOBE index for what's happened to Ruby lately.

    But here's the real reason this isn't a battle. Java was not a language, it was a product. Every part of it was made to sell - not to developers, specifically - but to businesses. Here is an end-to-end solution, with certification, a training program, literature, professional advocates that will travel to conferences, your company, programming competitions, and local java users groups - in fact, they'll sponsor them. They'll pay for flashy commercials, and take out ads in trade magazines, and get companies to include the java logo on their software. They'll provide support contracts and expert help, and they'll push Java as a brand.

    It's not a toy. It doesn't stick because it's cool and new and neat, it sticks because now there's money behind it and it's cheaper not to change much. That's why we still have Cobol around, isn't it?

    So, Java's already been sold to the big dogs, the guys with money who make decisions. It's embedded into the corporate hierarchy, and outside of a few side projects and startups, it's not competing with Node.js at all. Node.js will make it's splash, and in 2 years, we'll all be jazzed about something else, while the cobal, c, c#, java, and other legacy frameworks just keep chugging along with the majority shares.

    1. Re:There's no battle by Anonymous Coward · · Score: 0

      Check out the TIOBE index for what's happened to Ruby lately.

      Dang, it dropped by 0.05%. Terrible shame.

    2. Re:There's no battle by Anonymous Coward · · Score: 0

      You're not paying much attention are you? It dropped from #12 to #20 in a year.

  24. Snap-On vs Fisher-Price by Drunkulus · · Score: 1

    In a related story, experts agree that a professional mechanic's rollaway tool chest is much heavier than a children's toolbox with a plastic hammer.

  25. Moot Point and useless debate. by marienf · · Score: 3, Interesting

    Javascript on the server-side is total bollocks. Now that the client has gone smart again, because the browser *is* the client-side env, therefore Javascript has clearly won as *the* client-side language, and this means the server may become lean and mean again, because it can dispense with all the GUI, HTML, etc.. nonsense. And that means it can be done in real programming languages again. The kind where mistakes will cause a crash, not just inefficiency, unreliability and an entire generation of ops that think "just restart" is "normal". Which means that bad developers are filtered out, not saved by a nanny language and environment. Which means there will be less, but far better developers. And good developers can make good code in any language. Whatever I may have said and thought about JS in the past decade or so, I changed my mind since owning Crockford's "Javascript: The Good Parts". ON THE CLIENT SIDE, that is. I have never like anything but C(++), on the server side, and experiencing J2EE Containers, PHP, RubyOnRails, and various python frameworks there has only entrenched me more into thinking there is not one among them that I ended up respecting. If I could do a full e-commerce solution in serverside C++ in 1998, and get excellent performance from the cheap boxen of that time, imagine what you could do today by doing it right, on the server-side, by not wasting CPU cycles on another interpretative layer and letting some dumb algorithm mis-handle your memory management for you.

    1. Re:Moot Point and useless debate. by sribe · · Score: 1

      Javascript on the server-side is total bollocks. Now that the client has gone smart again, because the browser *is* the client-side env, therefore Javascript has clearly won as *the* client-side language, and this means the server may become lean and mean again, because it can dispense with all the GUI, HTML, etc.. nonsense.

      Good point.

    2. Re:Moot Point and useless debate. by angel'o'sphere · · Score: 1

      If you want to handle DB access in C++ with stuff like ODBC and write your own object relational mapper, or even simply manipulate "text results" from the DB and update "text lines" in the DB "manually" ... why not.

      I prefer to have an OR-mapper that instantiates me real objects in memory.

      However using stuff like GemStone in C++ was a nice time ... or having my own VM interception based OR mapping (VM in the sense of virtual memory, not virtual machine)

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    3. Re:Moot Point and useless debate. by narcc · · Score: 1

      ORM? That's a blast from the past!

      Has any significant progress been made in the last 15 years? Last time I checked, there were some pretty significant problems still left unsolved.

    4. Re:Moot Point and useless debate. by marienf · · Score: 1

      That's another thing I will never understand: Back in the days (1998), we used an Object Store (*nix version of NeoAccess, in our case)

      http://www.hephy.at/user/stamf... .. because we bascially thought RDB would be over by the turn of the century, and good riddance. We were extremely happy with the results. These site ran on minimal hardware (as we couldn't afford anything else in the data center), and flew, as compared to the competition (and anything else we'd ever done on that scale and online before).

      In the following years it turned out everyone else insisted on keeping SQL around, and so we had to turn to manual SQL wrapping again (we created code generators, because it's too error-prone and boring to do manually) until ORM came around, which IMHO is a totally ass-backward way of dealing with a DB from an OO point-of-view. Also, clients demanded that we run stuff in J2EE containers and hence, that we write it in Java, which I still consider to have been a marketing exercise by Sun Microsystems to obtain more broad meaning for their ailing Spark CPU line (Java has always ran suspiciously better on *nix than any other platform). Little did they count on GNU/Linux taking over the server universe. We did go Java, but never liked it, and still consider it the result of brainwashing, and don't understand the need for all those extra layers. There is not one thing that the container does that the OS cannot do better, except packaging, and ever there, J2EE is "write once, debug everywhere" in the field and therefore of little real help. Since then, other enviroments and languages came along, all with their strengths and weaknessess, but all with a common goal, from my POV, which is to make development more abstract, less error-prone, more specialized, easier to package and deploy etc.. and to take up a lot of extra CPU power and memory. I don't believe in making development easier: It resulted in the extremely dangerous monsters that are online, written in PHP by good-intentioned dilattantes with an excellent grasp of their fields but with little development skills. Same in Java, same in Python, same in Ruby.. While these are all interesting languages with interesting frameworks, they do not, IMHO contribute anyhting new except runtime inefficiency, and some extra layers to make debugging harder.

      Moore's law saved our bacons, there, because as time progressed, everything became more inefficient, but everyone had bigger CPU's and a lot of RAM to be able to keep up.

      So you see, for me, the current situation with the traction of NoSQL and the immense opportunily (and necessity, IMHO) to make the server-side efficient and lean again (power is now a major cost in the data center, vs bandwidth) is really a lot of "back to the future".

    5. Re:Moot Point and useless debate. by angel'o'sphere · · Score: 1

      In the Java world ORMs are "standard", the most common used is http://hibernate.org/

      There is a .NET port NHibernate or N-Hibernate, no idea how established its usage is: http://nhibernate.info/

      I personally fool around with OO databases, especially OrientDB. http://www.orientechnologies.c... Technically it is a graph database, but via the JavaAPI you can simply map POJOs into the DB. It is a very very fast database with replication and cloud support (extremely huge graphs are possible)

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    6. Re:Moot Point and useless debate. by angel'o'sphere · · Score: 1

      I believe with current progress in NAND storage the traditional idea of files needs to go.

      Computers imho should simply have a huge virtual memory on NAND and "files" are just objects with names in that memory.

      Ofc that leads to new problems like "transactions" in memory, the need of "copies" for objects which have different state in different transactions etc.

      Regarding your worries about J2EE containers, they don't cost that much speed. Most people don't use them anyway. The our day standard architecture is spring + hibernate and depending what you want to do a variant of tomcat as frontend. Sometimes a jetty or a jboss, but jboss then is mostly only used as web container, what a waste :D

      The drawback with current NoSQL databases is that you often manipulate the raw data directly (Cassandra) or that you need to use JSON documents. The latter means you mainly store and retrieve full documents and you have no queries that aggregate or filter on the server side like with SQL.

      Often it makes sense to write your own NoSQL DB and just put a "smart" storage behind it, like Spark or Hadoop.

      Nice site you linked to, I was minimal involved in this product: http://www.hephy.at/user/stamf...
      A shame that it never got really commercialized. The company mentioned "bought" it and did not manage to sell it and ditched it ... a real shame. It was the first OO Database "integrated" into C++ that was fast and easy to use.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    7. Re:Moot Point and useless debate. by ZeroWaiteState · · Score: 1

      ORM came around, which IMHO is a totally ass-backward way of dealing with a DB from an OO point-of-view.

      That's because SQL is a really horrible language. If it was structured algebraically with real relational operators this sort of mapping would be trivial. Instead you must choose which vendor's butchering of the English language you would prefer to write your complex set logic operation in. I'm not even going to get into the query optimizer. Key-value stores I think are a stage of grieving over how screwed up relational DB's are today.

      Also, clients demanded that we run stuff in J2EE containers and hence, that we write it in Java, which I still consider to have been a marketing exercise by Sun Microsystems to obtain more broad meaning for their ailing Spark CPU line (Java has always ran suspiciously better on *nix than any other platform). Little did they count on GNU/Linux taking over the server universe. We did go Java, but never liked it, and still consider it the result of brainwashing, and don't understand the need for all those extra layers. There is not one thing that the container does that the OS cannot do better, except packaging, and ever there, J2EE is "write once, debug everywhere" in the field and therefore of little real help.

      Well, simply put, Java eats memory for breakfast, lunch, and dinner. It's not as bad as it used to be, but Java inherently uses more memory than some other "managed code" languages because of how heavily it relies on heap storage, which has to be GC'ed. When you have many Java applications running on the same box, it is useful to share heap storage so that you don't have a situation where a Java application dies due to inability to allocate heap when 30% of available RAM is allocated but not in use by other Java processes. Containers also do things like connection pooling (because database connections are slow to set up and the OS doesn't do that), thread pooling (because the OS takes a long time to spin up a thread compared to execution time for very short function calls), message dispatch (because FIFO's don't always do the job on a heavily loaded system), and supervision (because sysv init sucks and OS people tend to oppose more complete supervisors). Was J2EE too big? Yeah, but the business need was still there.

      I don't believe in making development easier:

      I don't either. A bunch of peasant rabble; the lot of them.

      So you see, for me, the current situation with the traction of NoSQL and the immense opportunily (and necessity, IMHO) to make the server-side efficient and lean again (power is now a major cost in the data center, vs bandwidth) is really a lot of "back to the future".

      The current situation with the traction of NoSQL has to do with the fact that there are limits to how you can scale an ACID-compliant relational database, particularly when the data store is distributed over a network. Most of NoSQL (I say most, not all) revolves around fancy key-value stores. Key-value stores (which do not enforce relational consistency) have the property that data can be distributed across multiple nodes and can be retrieved in sub-linear time via a hashing algorithm like CHORD. Web developers basically discovered that they didn't need all of the functions that SQL databases provided, and by relaxing a few ACID constraints they could scale out with commodity hardware. Relational database servers are actually pretty efficient given the constraints they operate under (with the exception of the query parser), but those constraints don't always make sense.

  26. Meh by tcr · · Score: 1

    Seen both flavours of web frameworks. For comprehensibility to on-board new devs to unfamiliar code, I'd go with something like ExpressJS any day. This is from comparisons with Java and PHP web frameworks I've encountered on projects. Suspect that many who pontificate haven't actually used this stuff for real, as the lack of a type system has had F all impact for me when working on real NodeJS projects.

    --


    Information wants to be beer.
  27. Epic Battle! by wonkey_monkey · · Score: 1

    See the Titan that is Javascript take on the Giant that is Java, making them both seem normal size!

    --
    systemd is Roko's Basilisk.
  28. this crap again?! by Anonymous Coward · · Score: 0

    After 20 years in development and more specifically web development, it never ceases to amaze me how retarded this same old argument can get.

    My answer to this question has always been whichever technology allows me and those in my company to most efficiently develop and maintain projects leading to the most $$$ in my pocket and most value for my customers.

    Religious wars regarding technology are for academics...

    1. Re:this crap again?! by Anonymous Coward · · Score: 0

      People who call things religious wars are really just admitting they're ignorant and apathetic.

  29. Object Oriented VS Functional Programming by NikosBelibemTsagkas · · Score: 2

    This would be a much more interesting battle. Java, Node, [Name your lang here] is just a vehicle

  30. Pyrrhic victory by walkeraj · · Score: 1

    No matter who wins, developers lose.

    --
    Those days are dead and gone and the eulogy was delivered by Perl. --Rob Pike
  31. No such a battle by pabloa98 · · Score: 1

    Node.js has some appealing features. The more important is simplicity. Java in the other hands can do things that are impossible in Node.js. From the hardware point of view, Node.js is an old technology. With multicore architecture makes no sense to process everything using one thread. This will be worst because the number of core by CPU will grow with the time. Perhaps in 5 years we will enjoy of 48 or 96 cores by CPU. Node.js' One thread execution model makes not too much sense in that context.

    1. Re:No such a battle by Shados · · Score: 1

      Node processes its own logic in 1 thread, but it still has multi-process support. So you can use clusters to have multiple instances running at once, or go old school with spawn/fork. It does confirm what you said: it is an old technology as far as multi-core goes, and you're not going to be writing a ray tracer this way.

      For I/O intensive load though, just use clustering to have 1 instance per logical core and you're golden.

      Node's claim to fame is really just its async-first I/O design. Some other environments are bringing that in now, along with a strong threading model (ie: .NET, between almost everything new being async by default, and the async/await coroutine syntax), but the culture/ecosystem around it aren't following. Also, if your only easily parallel tasks are I/O bound, you're not getting much more out of it than you would in node.js.

      Node however, is NOT simple, it just looks simple. Its absurd stream design and error handling alone means that on any reasonably complex application, you need to be one hell of a debugging guru to figure out whats wrong. A junior dev will run home crying, while the same things in most other languages are pretty trivial.

      If you're not building a scripting tool (ie: a css compiler or something), don't need javascript on your server for isomorphic apps and you don't benefit from the threading and I/O model in your workflow (ie: your app is CPU bound), stay far, far away.

  32. Huh? by nitehawk214 · · Score: 3, Informative

    I use Java and Javascript every single day. Are new programmers simply not able to learn more than one language? My work is primarily on a webapp, so its the classical Java backend Javascript frontend. However if our platform was different we would be using different tools.

    What the hell they teaching kids in school these days? Back to the "Java is a hammer" days? Or is this the "outsourcing, so only one language for your entire end to end on every system"?

    But, my guess that the article is clickbait trolling, and real architects actually know to use the best tool for the job.

    --
    I'm a good cook. I'm a fantastic eater. - Steven Brust
  33. I always have a chuckle by johnsnails · · Score: 1

    Whenever I think about this difference given for java and JavaScript given on SO One is essentially a toy, designed for writing small pieces of code, and traditionally used and abused by inexperienced programmers. The other is a scripting language for web browsers. http://stackoverflow.com/quest...

  34. node.js (eye rolling) by bored · · Score: 1, Interesting

    I could go into a dozen technical reasons why javascript is a terrible, horrible, outrageously bad language here but this post would be TL;DR; for most people. Lets just settle for goggling "javascript terrible" and reading the first couple links.

    Or for some silly (not not really deal killing) things watch https://www.destroyallsoftware...

    The fact that there are actually people who think using in on the server is a good idea, proves there are insane or completely incompetent developers out there. If someone actually approaches me with this idea, I immediately think they are an idiot.

    See, on the browser we basically have to deal with javascript because there aren't any real alternatives. But things that are just "issues" or "irritations" in the browser quickly blossom into product killing problems when used on the server.

    Oh, and yes, I've written my fair share of javascript (and other languages), so don't think i'm talking out of my ass here.

    1. Re:node.js (eye rolling) by Shados · · Score: 3, Insightful

      Now that pre-compilation is pretty much pervasive in any advanced browser development, you DO have "real alternatives" to ES5 (probably what you're referring to if you're mentioning being stuck with it).

      CoffeeScript, TypeScript, ES6, Clojure, hell, Scala is available, and you can use Java with stuff like GWT (imo sucks, but Amazon thought it was great for a while).

      People keep going back to JavaScript because, aside for a couple of stupid things (a lot of which are fixed with strict mode and ES6 constructs), its actually pretty damn good, and some things that used to be considered hacks or half baked, like prototypical inheritance, are starting to be viewed as superior to the alternative, with good reasons.

      But even without that, the reason people will use node on the server, when its not for isomorphic app (which btw, is a REALLY good way to build your app, if you can afford the development overhead and care about your customers), is because the threading model of Node/V8 has very interesting performance and scaling characteristics for I/O heavy applications. It can scale like fucking crazy. http://blog.caustik.com/2012/04/10/node-js-w250k-concurrent-connections

    2. Re:node.js (eye rolling) by noda132 · · Score: 2

      I could go into a dozen technical reasons why javascript is a terrible, horrible, outrageously bad language

      So is Java. It's unfair to call JavaScript's problems "product killing" ... unless you mean Java's are as well?

      I juggle two day jobs, both for responsive, background-processing-heavy websites. One's in Node and one's in Scala (Java on steroids). To me, the Node way Makes More Sense.

      Yes, Java can process in multiple threads at once; but then you need to worry about atomicity. Yes, Java it can delegate different jobs to different threads; but then you need to read up on ExecutorServices. Yes, Java is faster; but if you want async file reads, things get complicated pretty quickly. (If you're going to block your thread, you'd better adjust your thread pool....) Yes, Java is type-safe and compiled; but that hinders as often as it helps.

      These are two different cultures. Java culture seems to whirl around huge infrastructures -- J2EE, JDBC, Swing, Ant, etc -- that have gargantuan learning curves and ten-year-old flaws. (One that bit me: Java 7's UTF-8 decoder accepts invalid UTF-8 to maintain compatibility with Java 5 -- that is, a ten-year-old version of the standard.)

      In contrast, Node culture is about self-organizing chaos. You can deliver results really quickly, but you might need to rewrite your code in a few months to keep up with library changes. And your favourite dependency might not be there tomorrow.

      Java and JavaScript (and any other language, really) can kill your product in different ways. Pick your poison.

    3. Re:node.js (eye rolling) by Anonymous Coward · · Score: 0

      TL;DR

    4. Re:node.js (eye rolling) by narcc · · Score: 1

      The fact that there are actually people who think using in on the server is a good idea, proves there are insane or completely incompetent developers out there. If someone actually approaches me with this idea, I immediately think they are an idiot.

      Yeah, the guys at PayPal, eBay, Microsoft, Yahoo, Uber, NYT, Dow Jones, LinkedIn, (the list goes one) must be idiots.

      I could go into a dozen technical reasons why javascript is a terrible, horrible, outrageously bad language here but this post would be TL;DR; for most people. Lets just settle for goggling "javascript terrible" and reading the first couple links.

      I thought the same thing for years. Then I took the time to actually learn the language. My opinion changed dramatically.

      Oh, and yes, I've written my fair share of javascript (and other languages), so don't think i'm talking out of my ass here.

      I would have said the same thing. The lesson I learned: Just because I've used a language for years doesn't mean I know anything about it.

    5. Re:node.js (eye rolling) by Tablizer · · Score: 1

      Just because I've used a language for years doesn't mean I know anything about it.

      If it takes so long to get decent use out of it, then perhaps it is flawed. I've yet to see a practical demonstration of JS's benefits. Most examples from other JS proponents use extreme cases, use "lab toy" examples that don't fit real-world situations I actually see in the wild, are personal preferences that vary per coder, or conjure up some obscure property that echos farfegnugen and claim I "just don't get it".

      They are right, I don't get JS's benefits. It's a poor language in my eye.

    6. Re:node.js (eye rolling) by Anonymous Coward · · Score: 0

      > If it takes so long to get decent use out of it, then perhaps it is flawed.

      Or perhaps it's just very hard to overcome mental inertia from other languages you learned?

      In my experience, if a new language requires you to think differently, old habits will make your job much more difficult.

    7. Re:node.js (eye rolling) by Anonymous Coward · · Score: 0

      I can understand blind prejudice against something that you're not well informed about, but when you look at the performance in real-world situations you have to stop and look.

      To me, I don't care if our server-side code is written in Python, JavaScript or Crayon, as long as it performs well and is easy to maintain, I'm all for it.

      Look at the Yahoo's, Walmart's and Groupon's real-world experiences with Node.js before preaching how "incompetent" everyone else is.

    8. Re:node.js (eye rolling) by Tablizer · · Score: 1

      To frank, most of Node.JS is hyped bullshit in my opinion. I've been in long threaded debates with proponents, and it seems a solution seeking a problem in most of the real world. Machines are cheaper than human labor economically. Buy fatter servers rather than pay a premium to rent or retrain human heads. Besides, servers get faster over time, humans don't.

    9. Re:node.js (eye rolling) by ultranova · · Score: 1

      Yes, Java it can delegate different jobs to different threads; but then you need to read up on ExecutorServices.

      Are you really counting "needs to read the documentation" as a negative for Java in the context of professional software development? Seriously?

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    10. Re:node.js (eye rolling) by Anonymous Coward · · Score: 0

      I can understand blind prejudice against something that you're not well informed about, but when you look at the performance in real-world situations you have to stop and look.
      Performance vs other garbage like ruby on rails... Or some hacky php framework. Its not harder to look fast vs some of that stuff. People concerned about performance don't use any of that trash.

    11. Re:node.js (eye rolling) by Anonymous Coward · · Score: 0

      ES6, you mean like this?

      http://kangax.github.io/compat...

      Or maybe your failing to understand that all those "choices" are just fancy syntax on top of the heaping pile of dogshit that is javascript in the browser. Heck you can write C/SDL and target a browser with emscripten http://kripken.github.io/emscr..., but that doesn't solve 1/2 of the core problems, only papers over them.

      Node, and ES6 are "better" but its still just lipstick.

      Oh, and connection count doesn't have anything to do with "scalability".

  35. What exactly is Apache Maven again? by VGPowerlord · · Score: 1

    Here's something I noticed that bugged me in the article.

    It claims that Node.js wins for build process because Java's popular build processors require you to write XML.

    Which makes me think they're not aware of what Apache Maven actually is.

    Maven is much more than just a build tool. It not only is used to control the build order of a multi-project build, but it also downloads and installs your project's dependencies from the Maven Central repository.

    You need a JSON parser in your project? Easy, just add a dependency reference with groupId com.google.code.gson and artifactId gson . Need version 2.2.1 specifically? That's alright as Maven allows you to specify a specific version.

    GSON probably has its own dependencies... which Maven will also download for you.

    Having said all that, if you want a build system closer to Java, you could always use the Gradle dependency manager, whose configurations are written in Groovy (a JVM language). Incidentally, you can configure Gradle to look at Maven Central for dependency resolution, too.

    --
    GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    1. Re:What exactly is Apache Maven again? by Dynedain · · Score: 1

      The Node.JS ecosystem has this as well

      Dependencies? Node Package Manager, Bower, and others
      Build scripts? Grunt, Gulp, and others

      And the best part of all? All the scripting, configuration files, etc, for these are all in Javascript and JSON (JavaScript Object Notation)... the exact same language and structure you are using for your primary development.

      The same code formatting rules, editor configs, syntax highlighting, autocomplete, for your code are used for your config, your build scripts, etc

      --
      I'm out of my mind right now, but feel free to leave a message.....
    2. Re:What exactly is Apache Maven again? by Shados · · Score: 1

      Dependency management on the JVM and the CLR is hard, so Maven is "a lot more than a build tool". In many other environments, dependency management is "comoditized". No one gives a fuck about the build tool being able to handle dependencies in Ruby-land or Node-world. Gem and Npm are good enough. Not perfect, but good enough.

      So then you're left with only the actual build tool, and Maven/Ant/whatever are pretty bad at it. Sufficient, but still bad.

    3. Re:What exactly is Apache Maven again? by Anonymous Coward · · Score: 0

      npm isn't even windows compatible. It has nested dependencies that go past the path limits in windows. It is a piece of shit and they know it. There are bug reports covering this issue.

      Node developers don't make their libraries backwardly compatible. Versions completely change features requiring 10 copies of the same thing on the file system.

      Java works on windows.

      The servers at work might be Linux, FreeBSD and Windows but I have no control over the desktops which are Windows. if I can't write node.js code and get it to run, i'm going to a platform that will work.

  36. Confusing by X10 · · Score: 1

    Sun Microsystems should not have allowed Netscape to name their new web page scripting language "JavaScript".

    --
    no, I don't have a sig
  37. Repost of the exact same link from last month? by Anonymous Coward · · Score: 0

    Repost of the exact same link from last month?

    Did a new editor come on and not search prior posts?

    Only people sucked into "internet programming" bother with in either java or node.sj

    I never want to begrudge people for earning a living and at least it isn't php.
    I've never seen elegant javascript - I have seen extremely elegant perl and fortran. Java is plagued by memory suck and slow implementations. My systems only have 16G of RAM, so I can't load eclipse to work on java.

  38. Battle for mindshare, or for page hits? by Anonymous Coward · · Score: 0

    No Its real I just punched someone for using javascript.

  39. "couldn't be more different" by Anonymous Coward · · Score: 0

    They're both C languages with automatic garbage collection that can be used to build browser based applications.
    I think they *could* be a little more different...

  40. Java no longer install/update with IE 11 by Anonymous Coward · · Score: 0

    So if you can no longer install / update Java with IE11, is Java still a contender ?
    https://community.oracle.com/message/12902862

  41. Re: Node.js is WEBSCALE! ! by Billly+Gates · · Score: 1
  42. vert.x by Anonymous Coward · · Score: 1

    http://vertx.io/

    like node.js but for the jvm and good.

  43. Not so much static/dynamic || compiled/interpreted by Anonymous Coward · · Score: 0

    I was originally attracted to Node.js because, well hey, it's one less language you need to know if the backend is written in JavaScript, right?

    However, I found that frontend and backend programming require very different mindsets--so much so that the one-language-in-front-and-back purported advantage is nearly nil.

    However, however, the event-driven nature of Node.js is tres, tres cool. That, for me, is its real selling point. And it's baked in from the start, not half-baked with a library or extension.

  44. Re: Node.js is WEBSCALE! ! by znrt · · Score: 1

    "did you just say lisp?" XDDDD

  45. Javascript is a dirty language by Anonymous Coward · · Score: 0

    I cannot image writing a production worthy server side application on top of a code base that people have been ruing for the past 10 years. Javascript has a bad rep for a reason; it is a dirty and poorly designed language. And despite the claims here, it is not particularly fast. Node can scale well to many concurrent requests, but it doesn't execute those requests that fast unless we are talking about the simplest of responses. The concurrent support within Node is also someone moot these days, as virtually all of the J2EE containers now support NIO anyway. It also has the major disadvantage of being being tied at the hip to browser implementations, which means making significant changes to the language to improve its structure will be very difficult.

    My company uses JavaScript and Java together, which is where I believe the sweet spot is. We take advantage of the new development frameworks on the client side (angular) and expose REST interfaces from a Java server. We do run some Node instances for prototypes REST endpoints, but as an architect for my company, Node is a long way from being something I would build a long term strategic server side app on top of.

  46. Node.js by Anonymous Coward · · Score: 1

    Learn our language so you only have to learn one language and not learn the 2 others that you already know. oook. lol

  47. I fail to see the benefit by msobkow · · Score: 1

    I fail to see the benefit of "non-blocking IO" when it is database concurrency that is the issue for most applications that are used to update information. So what if your first fragment of HTML can be shipped back to the client before you finish processing the page? If your servlets are taking so long to run that network IO blockages are "important to performance", you have some serious problems with your application logic.

    --
    I do not fail; I succeed at finding out what does not work.
    1. Re:I fail to see the benefit by Tablizer · · Score: 1

      I once went round and round with a Node.js proponent on that very issue. Although he was hype-heavy in general, he did come up with one practical scenario: your request (query) has to get info from two separate databases and glue the results together at client side. You can issue the two SQL queries without one having to wait for the other.

      Granted, it's not a very frequent need, and there are other possible constructs for parallelism besides Node.js's approach.

    2. Re:I fail to see the benefit by YoungManKlaus · · Score: 1

      "Granted, it's not a very frequent need"

      change "DB" to "Microservice" and its an extremely common use case.

    3. Re:I fail to see the benefit by msobkow · · Score: 1

      If you redefine terms on the fly, you can make any argument you want to.

      My point was and is that database IO blocking is the issue for at least 90% of real front-line business applications, regardless of whether they are serving internal or external customers. Client-side joins of such data are extremely rare -- there are remote database options for doing that far more efficiently and effectively provided by every major database vendor out there.

      If you're doing client-side joins, you aren't using your tools very effectively, and should be fired.

      --
      I do not fail; I succeed at finding out what does not work.
    4. Re:I fail to see the benefit by Burstaholic · · Score: 1

      Heh. I work on a mapping application that needs to query a Postgres GIS database and simultaneously query SQL Server for customer information constantly. Node.js is a _huge_ help in this scenario.

    5. Re:I fail to see the benefit by Tablizer · · Score: 1

      C# also offers parallelism constructs.

  48. Javascript is the better language by John+Allsup · · Score: 1

    At first it was the other way around, but: Java was always in a no-mans land: too low level to have the high level features of Js, too high level to have the power and speed of C/C++.  What is needed is a data-structure based language for low level programming that is accessible to Js so that Js code can create and manipulate low level programs and request their compilation.  Appropriate compilers then simply need to be made visible to Js in a natural way.  If you want a bytecode vm, implement it using the low level side of this, then control it from Js. Of course python3 style features should be worked in, and whilst v8 is great if you're on an x86 or x64 machine, a llvm or something based backend for other machines needs sorting out.  But then js is clearly the better language.  If you want type safety, you want something like Haskell, and that is a descendent of lisp, so is best represented as data structures again, not necessarily text.  Bridging the gap back to the programmer is the bit Lisp screwed up, and hopefully we can get it right this time around.

    --
    John_Chalisque
  49. Re:Confusing (JavaScript Sucks) by Tablizer · · Score: 1

    I don't care what they call it, just don't make it goofy, like they did with JS. Round-about OOP, overloaded concatenation operations, goofy hidden-flag type system, no optional parameter type checking, no optional named parameters, and a goofy CASE statement (copied C's stupid BREAK approach).

  50. Java and demographics by Arkan · · Score: 1

    Ok, I've had enough. Where all those who're shunning java come from exactly? How on earth can someone still spew stupidities like "compiled java executes slowly" or "generics are stupid"? What the fuck are you doing as a living to be so out of the usual programming practices?
    Next, you'll tell us that Design Patterns are bullshit and statically typed language are dead?

    No, sincerely, I HAVE to know!

    Just look at John Allsup, comparing oranges to apples, putting side to side Haskell, Javascript, Java and Python?! At least Java and Python are natively object-oriented... Haskell is in a totally other alley - and I personally believe that functional languages are vastly underrated - and then, boom, javascript. Seriously?

    So please, just tell me what you do for a living and your past experience in programming/software architecture, because I really want to understand the background that makes you express these opinions.

    1. Re:Java and demographics by sttlmark · · Score: 1

      I went to program in Java and all I got was this Ask Toolbar instead.

  51. Could we please stop this Java is insecure crap by coder111 · · Score: 1

    It's insecure ON THE CLIENTSIDE. Nobody uses it on the client-side any more. Applets are dead and have been for years. Clientside features are still around only to support some crap legacy apps which should have died years ago.

    And on server-side, it's as secure as anything. Probably more secure, as you get none of the memory issues or buffer overflow issues or other issues C/C++ has had for years.

    --Coder

    1. Re:Could we please stop this Java is insecure crap by gbjbaanb · · Score: 1

      And on server-side, it's as secure as anything. Probably more secure, as you get none of the memory issues or buffer overflow issues

      Seriously? Have you looked at the CVEs for Java severside anytime recently?

      http://www.cvedetails.com/prod...

      For example:
      The Double.parseDouble method in Java Runtime Environment (JRE) in Oracle Java SE and Java for Business 6 Update 23 and earlier, 5.0 Update 27 and earlier, and 1.4.2_29 and earlier, as used in OpenJDK, Apache, JBossweb, and other products, allows remote attackers to cause a denial of service via a crafted string that triggers an infinite loop of estimations during conversion to a double-precision binary floating-point number, as demonstrated using 2.2250738585072012e-308.

      or an oldie that you'll appreciate given your criticism of C/C++ :-)

      Integer overflow in the embedded ICC profile image parser in Sun Java Development Kit (JDK) before 1.5.0_11-b03 and 1.6.x before 1.6.0_01-b06, and Sun Java Runtime Environment in JDK and JRE 6, JDK and JRE 5.0 Update 10 and earlier, SDK and JRE 1.4.2_14 and earlier, and SDK and JRE 1.3.1_20 and earlier, allows remote attackers to execute arbitrary code or cause a denial of service (JVM crash) via a crafted JPEG or BMP file that triggers a buffer overflow.

      Simple fact: *nothing* is as secure as you think, that's why you have to design your architecture with layers in mind. This applies to Java just as much as any other platform.

  52. 4th reason example by Anonymous Coward · · Score: 0

    There is actually one example of code reuse (4th reason) that I'm aware of: TiddlyWiki 5, http://tiddlywiki.com The same TiddlyWiki 5 core as well as the extension modules runs both in the web browser as well as on Node.js. The deployment here is that you first start a Node.js-based TiddlyWiki 5 instance which also runs a local web server. Next, you point your browser to this web server and get a TiddlyWiki 5 clone delivered right from the running server instance. The in-browser TW5 instance then syncs automatically with the Node.js TW5 instance which in turn, for instance, syncs with the file system or does other advanced stuff.

  53. "java wins in libraries" by YoungManKlaus · · Score: 1

    well, maybe in the numbers, but def. not in the ease-of-installation ... having package managers by default is just awesome

  54. Google Web Toolkit = Java on the Client Side by Anonymous Coward · · Score: 0

    Google Web Toolkit is java that gets um- mogrified into
    browser-specific javascript. Pretty slick really.

  55. Pro's/Con's by frank_adrian314159 · · Score: 1

    Java:

    + Huge amounts of infrastructure in place for just about anything you want to do

    + Mature frameworks

    - Still have to program in Java

    Node.js:

    + Quicker to program simple apps in

    + Simpler deployment (again for small/simple apps)

    - Still have to program in Javascript

    In reality, all systems/frameworks/whatever all suck in their own unique ways. All that matters is matching the tech to the project.

    Besides, the leading edge has moved to Clojure and ClojureScript already.

    --
    That is all.
  56. Fight more about Client/Server separation ideology by Ryyuajnin · · Score: 1

    Sure, Node.js and Java are competing in the same space; the bigger question is how? The answer to that question is Single Page Applications, or SPA. Single Page Applications are becoming very popular with new developers (I believe) because they just make better sense. For FAR too long, Java EE architects have done their very best to mitigate the separation of Client & Server. Take JSF, for Example: the entire JSF UI development experience almost lets you forget that the UI and the server context are in the same memory space. But reality frequently comes crashing down the moment you step off of the beaten path.

    Enter the SPA! Angular, Backbone, etc. all rely on RESTful API's, and DO NOT CARE if it is Node.js, Java, .NET, etc. SPA’s make a full and clean break between the Client and Server realm, then only thing they share is the common midpoint of the RESTful interface; making fight less about Node.js vs Java, and more about distinguishing what you need from a back end server.

    My general assertion: Node.js will continue to gain popularity and displace many competitors. Java will going to continue to dominate the enterprise market for years to come, especially with the support of specialized frameworks and utilities like Spring, Maven, Hudson, and Junit. (honorable mention for gradle)

  57. Node.js wins most of these, actually by Burstaholic · · Score: 1

    I've never really worked with Java, but I wanted to give my perspective as a Node developer.

    Better IDEs:
    WebStorm, by the same people who make IntelliJ, is a fantastic IDE, so I'm not sure how this is a negative, except in numbers (3-1). If you're running WebStorm, you have excellent debugging as well. Between WebStorm and Chrome I can debug my Node-based webapps very well.

    Libraries:
    This is a big one. NPM has a huge collection of libraries for almost anything you can imagine, all easily accessible through the npm client tool. Good package management with NPM makes bringing in and maintaining dependencies easy and painless, while the Java world as far as I know lacks any such thing, making this a much more difficult process.

    Threads:
    Node.js uses threaded, non-blocking I/O, so most of your trouble is already handled. As far as threading your own code, you've got me there - the Node community has solutions for parallelization, but they're still a bit clumsy.

  58. At least node does not have competing web servers by Daniel+Hoffmann · · Score: 1

    Tomcat, Glassfish, IBM WebSphere, BEA/Oracle Weblogic, Jetty, JBoss those are the ones I can name right now, but surely there are more, each one with their own bugs and unique features that makes porting an application from one to the other a nightmare.

    Seriously you can make a whole career path being an "Certified WebSphere Application Server Developer", that is how complex each application server can be.

  59. I'm stodgy by Zecheus · · Score: 1

    From the perspective of a stodgy enterprise java developer, I don't find the 'common language' argument compelling. The advantage is limited to common syntax and runtime model of the javascript/node environment. However, the problem space is quite different: on the client the task is user interaction, user interface design, translating user requests into backend data requests which can block and call back. On the server side, ACID data persistence and business logic including backend service integration. I think these problems create a greater separation of client and server developers than the programming language. Someone very good at user interface design may not have the chops for ACID data persistence, and vice versa, EVEN IF the programming language and runtime model are the same. After 15 years programming java, I picked up javascript rather quickly. I can do the transactional business logic development in jee with cross concerns of security and concurrency, but if I used javascript to write a user interface, I need more learning beyond javascript. I think 'full stack' developers are quite rare. Declaring oneself as such would be a mistake if one's ground to say so is only the programming language is common to both by happenstance.

  60. Re:node.js (eye rolling) [correction] by Tablizer · · Score: 1

    Correction: "To be frank".

    I would also like to add that many of the arguments used by Node.js proponents resemble those used by assembler language proponents when higher-level languages started eating into their profession. I'm not betting on a pro-hardware stance for most development tasks.

  61. What? No one mentioned Oracle? by Anonymous Coward · · Score: 0

    Java vs anything... Java is controlled by Oracle, therefore Java loses.

    Seems quite simple, really...

  62. Java, the overweight, bulky language that sucks by Murdoch5 · · Score: 1

    How is this a contest? If I'm doing anything on a server, the last thing I'm going to reach for is Java. Java is slow, bulky, contains more overhead then functionality, eats memory for breakfast and basically breaks all concepts of what a good programming language can be. Servers need speed and reliability, well I can't argue about reliability, I can about speed. I don't care if you're stable, if you eat 20% of my system memory and make my server feel like a sports car in mud.

  63. Go Wins by snadrus · · Score: 1

    When NodeJS (Which Google doesn't care about enough to maintain) and Java (which Oracle doesn't care about enough to maintain) battle for the server, Go will win.

    --
    Science & open-source build trust from peer review. Learn systems you can trust.
  64. I guess Java web-apps are dead. by Anonymous Coward · · Score: 0

    Thanks. I don't know why I didn't think of "lack of support" as a viable reason for Java web-apps to be dead or dieing. Now, Oracle claims that JavaFX is very web-app-able. However, it doesn't seem that very many people at all are making use of JavaFX. One thing is for sure, JavaFX is entirely dependent upon Oracle continuing to support it, whereas JavaScript and related web technologies aren't going away any time soon.