News for hackers. Stuff that matters.
Re:After a year of using Node.js in production by jrapdx3 on Monday May 02, 2016 @07:39PM (#11616710)
Can't fully agree with the article re: using nodejs in production. A couple of years ago I decided to use nodejs for a rewrite of a web/database app that had gotten to be complex and hard to maintain.

As so often said, it was true for me that the abundance of modules and choices in node was at first very confusing.

I eventually figured out that keeping things as simple as possible was my best approach. What I came up was a server relying on very few module dependencies and written using consistent if not so elegant components. Sure it's kind of verbose and far from totally DRY but fairly easy to understand, modify and extend.

Key issue was node's "callback hell" style of async programming. Of course, it's not just node, other languages (Scheme, FP, etc.) can be mind-bending in a similar way.

The callback "inside-out" locality inversion was initially hard to grasp, but once I caught on it was possible to get the server working the way I needed it to. The more recent development of promises, etc., certainly provides reasonable ways to reduce the high barriers implicated in using the nodejs style of async programming.

Re:After a year of using Node.js in production by zyxley on Monday May 02, 2016 @07:42PM (#11616727)
Callbacks definitely become much, much less of a problem once you can turn everything into promises.