4 ms·
My concern about node.js is that it seems difficult to write server code that is readable later.... Since you're constantly creating handlers, it is kinda like
by lzw 16y ago
My concern about node.js is that it seems difficult to write server code that is readable later.... Since you're constantly creating handlers, it is kinda like programming the movie inception to me. Maybe a higher level abstraction on top might solve that.
- dfox 16y agoThat higher level abstraction is called "threads" and that is exactly what node.js tries to avoid :)
- pjscott 16y agoOr coroutines, like eventlet uses in Python. It's very readable, and asynchronous. http://eventlet.net/ http://eventlet.net/
- denik 16y agoAnother similar library: http://gevent.org http://gevent.org
- lzw 16y agoProcesses (or threads) are not the problem, it is shared state / memory / side effects. Erlang has solved this pretty well, and I love the way it works, but do not find myself looking forward to the syntax. Either choice means that the code is harder to read, but erlang is easier to read than node code, I suspect. (Will have to investigate.)
- fauigerzigerk 16y agoYou always have shared state somewhere. It makes no sense to me to force myself to have it exclusively in the database by choosing a platform that cannot do shared state or makes it extremely tedious. I agree with you on the handler maze though.
- troygoode 16y agoI develop in - and enjoy - node, but that Inception metaphor is brilliant! You do get used to it though. :-)