3 ms·
"Node has been a blessing for me, as a frontend engineer, because I can finally code servers in the same mindset as I write client-side javascript. " That was
by zzzeek 15y ago
"Node has been a blessing for me, as a frontend engineer, because I can finally code servers in the same mindset as I write client-side javascript. "
That was precisely the author's point. You'd rather stick with what you know then bother to deal with traditional server side techniques.
- geuis 15y agoI already do that. If I need to write a more traditional kind of page, I use Django and Python. Easy to setup, excellent framework and language to work with. I use node for new cutting edge things which Django and Python can handle, but not as easily as node.
- sofuture 15y agoI use node for new cutting edge things which Django and Python can handle, but not as easily as node. Like what?
- ricardobeat 15y agoLike massive concurrency? Websockets?
- moe 15y agoFor rather small values of "massive" perhaps (i.e. single-server?). Once you reach into realms where the label "massive" comes into play the importance of per-host performance is usually dwarfed by attributes like robustness and maturity.
- deleted 15y ago[deleted]
- lucian1900 15y agoWhy not just use Twisted? It's a lot more mature and complete than node, and you don't have to deal with JavaScript either.
- maratd 15y agoUhmm, I've been writing server side code for the last decade. I've also been writing front facing code for just as long. JavaScript works well for Node because it is a language that has evolved to be asynchronous. Not because some front-end web monkey n00bz know JavaScript. Although that is certainly a plus. Node.JS shines when you need to write network applications. It was advertised for this purpose by its creator. That is its stated goal. Traditional server-side solutions SUCK at this. Try writing a non-blocking server-side WebSocket server in PHP and distribute the load across all of the cores. Yeah. Exactly. Don't get me wrong, I love PHP. But for every job, a proper tool. Node.JS takes care of the network server and hands off the work to PHP via FastCGI. That's how it should be. Node.JS solves real problems right now. If it isn't doing that, you're trying to hammer in a nail with a screwdriver. Stop it.
- _delirium 15y agoTraditional server-side solutions SUCK at this. Try writing a non-blocking server-side WebSocket server in PHP and distribute the load across all of the cores. Wouldn't the traditional way to do it server-side be to just write it in C/C++ or Java with a thread pool? Or if you prefer the evented model, Python+Twisted isn't old enough to really be traditional, but is pretty widespread; and some Java server-side apps have been moving to an async model as well.
- maratd 15y ago> Wouldn't the traditional way to do it server-side be to just write it in C/C++ or Java with a thread pool? I was a bit vague. What I should have said was that dynamic language solutions are bad at it. Certainly you can pull out C/C++, Java, Erlang, etc. but at that point, you need to compile and recompile when you change your code. You are dealing with dependencies, libraries, binary compatibility, and the usual complexities that come with compiled languages. > Or if you prefer the evented model, Python+Twisted Well, Node.JS isn't the only game in town, certainly. Competition is a good thing.
- zzzeek 15y agoI don't actually think anyone should be using PHP. Just like MySQL gives relational databases a bad name, PHP does the same for server side programming. And yes actually trying to write a server in PHP would be ten times more insane. Node.js might be nice for writing servers but so is Twisted or straight Python, Erlang, C, even java with threads as someone mentioned.
- dmpk2k 15y agoI'm a backend engineer. Have been for years. Node.js works for me. I don't think much else needs to be said.