upuldi,

> most of the issues with nodejs is due to the fact that developers have to 
write javascript

Developers who are transitioning to Node from Java (or a similar statically 
typed language like C++ or C#) may find it difficult to learn and/or 
appreciate a dynamic language like Javascript (or Ruby or Python, for that 
matter). This is one kind of "hard".

Those who have learned Javascript and node.js -- experienced node.js 
developers -- will say that node.js is hard because asynchronous 
programming is hard.

If you find and use an asynchronous programming library for Java (or 
transpile Java into Javascript in order to use node.js), then you will be 
able to skip the one-time difficulty of learning a new language, but you 
will always be dealing with the difficulty of asynchronous programming.

It is worth asking yourself whether you really need the high level of 
concurrency provided by the async model (10,000 simultaneous connections, 
etc). If not, you can pick from a wide variety of languages and platforms 
and will be able to write code in a normal, synchronous manner -- cleaner, 
more maintainable, debuggable code.

If you really do need the high level of concurrency provided by the async 
programming, then you will need to deal with the complexities introduced by 
this model. I initially thought that generators (i.e. co.js and Koa) would 
bring the simplicity of synchronous code, but really they just put a 
prettier face on the same complexity -- a cleaner syntax and less 
error-handling burden -- but when you start debugging, stepping through 
code & looking at the stack, it's still the same async model under the 
hood. The only async language or framework that I'm aware of that really 
works hard to reduce the complexity (synchronous-style code with a normal 
callstack and debugging, but uses async IO where possible and gets 
multiplexed over green threads where not possible; with explicit 
synchronization, message passing, etc) is the Go language.

That said, I don't think the complexities of async in node (especially w/ 
the aid of long stack traces & generators) are that bad, so long as you're 
writing server code where most of the state is in the request/response 
objects and the dev team is happy to learn and deal with the additional 
complexities of async. But if you're writing a non-trivial desktop app or 
other really stateful app, I wouldn't recommend writing it in node.

-- peter

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to