Live data from Hacker News

Why Node.js is becoming the go-to technology in the Enterprise

nearform.com

11–20 of 75 posts

Re: Why Node.js is becoming the go-to technology in the Enterprise

#11
I had used node.js for about two years, and it's not without its share of pain. Trying to find some way out of callback hell, and then finally adopting a rack-like way of writing the controllers, it's somewhat manageable.

It takes quite a bit of getting use to, think and write in promises, futures, or whatever other shenanigans we come up with to deal with callbacks. I suspect it's a weakness of the language design, bent to the will of the reactor pattern.

I can't imagine what sort of enterprise cruft will layer on when people are doing that with callbacks, etc.

Re: Why Node.js is becoming the go-to technology in the Enterprise

#12
post #9

These stories about switching to node are pretty funny: "I switched from a dump truck to a motorbike and now I can drive way faster!" Node.js isn't really faster than most other popular languages with an evented library, but if switching to Node involves scrapping years of enterprise cruft, then maybe it's worth it. By the way, enterprise adoption of Node is surely a sign that we need to jump ship. Glad I got out of…

What did you switch to after abandoning Rails? I consider the tooling and rails ecosystem to be the best for small, agile projects and I'm really interested in the alternatives.

Re: Why Node.js is becoming the go-to technology in the Enterprise

#14
post #5

The real reason is quite simple. And I'm not trying to be bitter or anything, rather think like a businessman. The reason is... it's full of JavaScript kids out there, and because they're so many, they're all replaceable, and cheap. Like the commodity hardware servers they're programming. It's neat to cast this as "easy to attract and retain talent", but "rapid innovation" and "developer happiness" (especially consid…

JavaScript is the new Java... sigh.

Well you are right in a sense that JS is becoming the new de facto WORA (Write Once Run Anywhere) platform that Java was.

i.e. Mobile: Android v. Sencha

Embedded: Java ME v. Raspberry pi

Desktop: Swing v. node-webkit

Web: JavaEE v. Express

I believe Java went through this phase as well in the 90s wherein developers from other languages got excited about its future and started jumping away from COBOL, etc.

Re: Why Node.js is becoming the go-to technology in the Enterprise

#17
post #9

These stories about switching to node are pretty funny: "I switched from a dump truck to a motorbike and now I can drive way faster!" Node.js isn't really faster than most other popular languages with an evented library, but if switching to Node involves scrapping years of enterprise cruft, then maybe it's worth it. By the way, enterprise adoption of Node is surely a sign that we need to jump ship. Glad I got out of…

I don't think enterprise ever has or will adopt Rails. Even node.js isn't at the point where it can really be considered "enterprise".

Java is dead. Long live Java!

Re: Why Node.js is becoming the go-to technology in the Enterprise

#18

And then as soon as Derpys Mansion new language comes out all the newcomers will flock to that and you're entire staff will leave to go work for some startup. The reason why "Enterprise" uses the software they do is not because it's the fastest, or most suitable for the job. It's that it's been in production for many years and has a large ecosystem and strong commercial backing. Along with a strong workforce that isn…

Type annotations are indeed useful for maintaining large projects. Even in dynamic languages, a lot of maintaining a large project is effectively type discipline.

Re: Why Node.js is becoming the go-to technology in the Enterprise

#19
It's a little tiring to see some of the same old fallacies about Node repeated ad infinitum in this thread. I suspect a lot of the complaints stem from poor development practices or not understanding norms in JS.

JS isn't without its flaws, but can we at least put a few fallacies to rest:

> callback hell

There's no reason to be in callback hell if you use an asynchronous control flow library and stick to the standard style of function signatures. I love @caolan's async [1]. In particular, there's a control flow pattern called `auto` that really (IMO) demonstrates some of the power of async programming: it's a full dependency graph resolver [2].

> single-threaded

There's the cluster module, but nevermind that -- you can always just use the child_process library [3] to access spawn() and fork(). Remember those? Processes are a more nautral match for distributed computing than threads anyway.

> lack of strict typing

Strict typing won't make you a better developer, and you can enforce some degree of type correctness with Closure compiler annotations.

[1] https://github.com/caolan/async [2] https://github.com/caolan/async#auto [3] http://nodejs.org/api/child_process.html

Post reply on HN