News for hackers. Stuff that matters.
Re:Why I think Node.JS is a terrible platform by thedufer on Sunday September 09, 2012 @05:21PM (#4497046)
There are a number of reasons. I work on one of the larger node apps out there, and its working great for us (admittedly, we use CoffeeScript, which eliminates half of the arguments made against node).

- Server/client sharing. This sounds like its not a big deal, but it is if you're writing an app for which node is a good choice. Our code is close to 50/50 client/server (maybe a little server-heavy), and the amount of shared code is fairly surprising. - Native JSON. All of the data that we send from our servers is JSON (with a few exceptions for errors). Mongo speaks JSON as well. Its extremely useful that all of our data is in the same format, including that going over the wire and that inside our code. - One language. I've used server-side Python before, and it is way easier to only have to think in one language, especially if you jump between server and client code often. - CPS. Everyone's hating on it, but its hard to see the advantages of it without working on a large project first. I was very skeptical when I started, but it really works well. Most people are immediately turned off by the amount of nesting involved, but a simple async library resolves this nicely. - Javascript. It has problems, but most of them are ways to shoot yourself. If you avoid shooting yourself, it really is a beautiful language.

The biggest problem with node is that the average programmer* probably can't grok CPS. Its honestly a lot harder than most code you'll see. That said, I can't imagine the codebase that I work with being less than an order of magnitude larger without it, so its well worth it.

*In my experience, the average programmer can't grok recursion or pointers, either.

There are no comments on this comment yet.