Comment by enobrev
14 years ago
I've said it before and I'll say it again: While liking Ted's writing is a matter of taste, he makes good points.
You probably shouldn't be trying to beat nginx or apache with node.js. That is a solid point. A couple years ago, I would have said you probably shouldn't try to beat Apache. I'm not saying it can't be beat; I'm saying you're not Igor Sysoev.
Javascript probably isn't the best language for an important scalable application on the server. It's getting better. But there's a reason Google and friends have to make some serious improvements. Don't get me wrong, I Love Javascript. It's one of my favorite scripting languages.
I love PHP as well (another language Ted just took a stab at). But I won't pretend PHP will some day be the best way to make an Android app. Sure, if someone added a PHP interpreter to Android, I might consider prototyping with it. But when it's time to shoot for production, it's going to be Java. Obviously.
Our languages are tools. Ted happens to think Javascript is the wrong tool - and in most cases outside of the browser - he's probably right. I'm using it for a pretty large project right now. I have pull requests to a few npm modules and few new npm modules to add, and a few thousand lines of code tying them all together.
But once our concept is proven, I assure you, Node will probably be the first thing to go. Not from my toolbox, just from the project that will have already outgrown it. It's not the right tool for the job when we scale beyond a couple servers. But for right now, while figuring out what goes where and why, there is none better.
So what's stopping you putting nginx in front of node?
If you're worried about the maturity of its library, availability of good developers, or just that JS is an ugly language (and Coffee-script is too boutique), or Java is just faster, that's a good reason. Though there are lots of people who use the slow and ugly PHP (which seems to get good milage - Facebook and Wikipedia are doing OK with it).
I don't like JS, so I wouldn't use Node, but that doesn't mean it's crap.
Actually, javascript running on v8 sounds like it would (theoretically) be an excellent platform for writing an Android app. It's fast enough and has a small memory footprint compared to java.
I haven't yet used Node for a production app, but (being very comfortable with JavaScript) I have found it invaluable when prototyping concepts and ideas instead of mockups. For now, I keep falling back to Python & Django for the real deal, but I'm keeping a very close eye on Node as a contender, especially as I'm moving into more real-time app development.
For now, when building serious apps, Node is the first thing to go; in the near future, it may be the first thing to introduce.