59 points · by ksetyadi · 15y ago · 33 comments
There are a ton of guides on how to set up a webserver in 20 lines, but hardly any on how to (properly) handle a lot of async callbacks and requests etc.
Thanks for your opinion :)
These 2 tools are reserved for people who exactly know what they want out of their tools, not for someone who just jumped in to "web development" and wanted to use buzzword compliant tools.
Sorry for being such a snippy on Monday morning but I'm hoping people around me would become better at fundamental as opposed to combining tools w/o knowing what they're good for.
I don't want to criticize the authors work. He's done a pretty good and thorough job. Hopefully I'll pen down an easier guide later tonight.
The huge majority of uses for either would be better served without them.
The win on engineering productivity alone has made them a good choice for us.
Now, when (and if) you know enough about those, by all means move on to NoSQL etc.
Note, though, that I'm taking about people using it in production and not knowing what the compromises are --the "Mongo DB is webscale" and "node.js is damn fast" people.
I have no problem with people that are just using it to play/experiment with (though, they too would have to understand the compromises eventually).
https://github.com/creationix/step
While I wouldn't quite call it pretty, it keeps things at the same indentation level, and I can still use closures to maintain the illusion of a single "thread".
There are a few examples out there about using events/listeners, but I think there's room for a really good one.
Mirror: https://gist.github.com/1327266