Login   Register  
Icontem

Leave NodeJS or use Promise, or use reactive extension

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      JS Classes blog  >  Are Developers Really...  >  All threads  >  Leave NodeJS or use Promise, or use reactive extension  >  (Un) Subscribe thread alerts  
Subject:Leave NodeJS or use Promise, or use reactive extension
Summary:On visionmedia leaving nodejs for callback problems
Messages:4
Author:Daniele Cruciani
Date:2014-07-16 10:46:58
Update:2014-07-16 22:45:31
 

  1. Leave NodeJS or use Promise, or use reactive extension   Reply  
Picture of Daniele Cruciani
Daniele Cruciani
2014-07-16 20:59:48
Yes, the callback hell complain is something that happen everytime you try do write some code more complex than helloworld in Node JS.

But some solution are here from long time, that is promise and reactive extension.

TJ Holowaychuk wrote most of express package, that is the most used node web server, and it is based on node original idioma of callback, error, and next() call ...back.

I use express, it is a great work, but is not up-to-date with promise idioma, and sometime I am not very confortable with it.

I already did the first step, https://github.com/kriskowal/q
and callback hell disappeared

I heard a lot of people beeing entusiast for reactive extension:

https://github.com/Reactive-Extensions/RxJS

it is a microsoft contribution.

Also developers which are leaving are leaving express related packages, thus webserver, not node js framework ... As stated in the title it seems that nodejs is near to close down


  2. Re: Leave NodeJS or use Promise, or use reactive extension   Reply  
Picture of Manuel Lemos
Manuel Lemos
2014-07-16 21:31:46 - In reply to message 1 from Daniele Cruciani
Well the problem of callbacks is that you cannot control most of the logic from inside a callback.

For instance when you are inside a loop, if you need to evaluate a condition inside a callback function, you cannot break out of that loop from the callback. Promises do not solve this problem.

What the Go language and Facebook hack provides is the advantages of asynchronous programming without having to deal with callbacks.

Anyway, the article was not stating that developers are leaving Node.js, but rather questioning if they are really leaving.

  3. Re: Leave NodeJS or use Promise, or use reactive extension   Reply  
Picture of Daniele Cruciani
Daniele Cruciani
2014-07-16 22:34:02 - In reply to message 2 from Manuel Lemos
Well,actually I cannot figure where and why one would do such a thing.
However is that my concern on the assertion, the maybe leaving actors are in fact contributor to express project, that is not node js project.
Express add session management, template, and other really usefull thing to http. The are no news about nodejs developer leaving (no one, and no one maybe following him)

  4. Re: Leave NodeJS or use Promise, or use reactive extension   Reply  
Picture of Manuel Lemos
Manuel Lemos
2014-07-16 22:45:31 - In reply to message 3 from Daniele Cruciani
Yes, it may just be somebody making a statement to call to the attention of Node.js developers in the hope they fix it in the ways they want.