Live data from Hacker News

Why Node.js?

news.ycombinator.com

11–15 of 15 posts

Re: Why Node.js?

#11
post #5

The best "framework" node.js has to offer is Meteor. Nothing beats Meteor for rapid prototyping so far. Node was the next big thing a few years ago, I was an evangelist by myself. Today, drawbacks and backlashes appear more and more... so if you plan to reorganize yourself or some products to node, you may just skip it. I'm personally betting on elixir for everything that is related to "server" or "service", and Rust…

I have not used Meteor yet. Hopefully I will give it a try. But still I see many big companies converting to node.js and praising it in their blogs and everywhere. Big companies like facebook, paypal, etc are investing in javascript. Using it in places where it was never thought of e.g. "react-native"

When you come from a legacy ball of mud in written in any language, a rewrite alone brings loads of benefits if done properly. In most cases, the evented design of node requires some re-thinking and forbids simple copy-paste of the old stuff.

In addition, a good chunk of computing is pushed from the server to the clients nowadays, reduces server load even more. Of course, your servers are more idle if they have less to do.

The course of JS is, that it is used in places never thought of. But I just leave it at that.

Finally, I trust a proven tech, that is designed to solve todays performance/distribution/messaging problems and delivered for decades now (elixir/erlang/OTP). Choose by yourself. Yeah, JS nowadays is like lego, you can plug together anything already available, but then, lego is for kids and isn't used for actually mission-critical things in the real world.

Re: Why Node.js?

#12
I think there are several great reasons to use Node.js.

First, JavaScript is a darned good language. It has some quirks, and some down right awful parts. But they are easily avoided, and often can be automatically detected by static analysis tools like JSLint, JSHint, etc.

Lexically scoped anonymous functions, closures, first-class functions, immediately invoked function expressions, object literals, dynamic objects, are all magical once you twist your brain into really understand how to program in that paradigm.

And yes, other programming languages have combinations of these features and maybe implement them better. But if you look at the other most popular programming languages (http://www.tiobe.com/index.php/content/paperinfo/tpci/index....) JavaScript is really it for this sort of dynamic, functional-esque style programming.

And popularity matters when you are looking for support, documentation, or libraries to interact with other systems.

Secondly, asynchronous event driven programming is a truly powerful model. And while you can do event driven programming in any language. Node.js treats it as a first class citizen, with it's standard lib implemented as non-blocking with callbacks.

But what really makes Node.js so awesome is the marriage of it's dynamic nature with the event driven model. They just work so well together. Passing functions as callbacks for events just works so elegantly compared to how'd you have to do that in other languages. Building out constructs like promises or event emitters is trivial because JavaScript is so flexible.

I think Node.js gets shoehorned into doing a lot of work where maybe it doesn't make sense. I still use Perl/Python for CLI scripts. But for distributed network applications, Node.js makes solving a lot of problems way easier.

Re: Why Node.js?

#13
Honestly my situation is similar to yours. Using PHP for web applications mostly more than 8 years. I had many frustration with PHP over the years, but it has a quite strong community & mature documentation, millions of code samples. a dozen of giant MVC frameworks that some of them are famous as PHP itself. what my problem in getting started with Nodejs was lack of understanding JS's basics not even Nodejs itself (yea i was really blind & fool but i was thinking that i knew JS) i was reading source codes of famous libraries in Nodejs. Quickly I have seen my problem. i didn't knew JS even though i was using it more than 8 years. i was unable to understand even the basic libraries or frameworks. That moment was an illumination for me. then i started to learn JS in real. i've read the famous JS books during 6 months. with the decision of never try to code before fully understand. that was my leap for being a better developer (it worked even for my PHP knowledge) by the way i still read the books :)

After that 2 years i have developed more than 5 projects with nodejs. i still don't have a stable MVC structure for expressjs (not like SF2 or ZF2 etc.) keep changing it every project, improving. but it's a nice journey to learn something new when you are 36 years old. now i have quite stable vision/exprience right before starting a project while planning. Already started to use task runners grunt/gulp, actually i have developed a deployment app with nodejs & connected it with my own git server. i work way professional & efficient than before. My humble advice is read the source codes of Express.js Sails.js maybe even Backbone.js then see if there is any black spot in your understanding. (if not that's nice of you :) ) Node.js is upto something very nice for all web developers.

Re: Why Node.js?

#14

Honestly my situation is similar to yours. Using PHP for web applications mostly more than 8 years. I had many frustration with PHP over the years, but it has a quite strong community & mature documentation, millions of code samples. a dozen of giant MVC frameworks that some of them are famous as PHP itself. what my problem in getting started with Nodejs was lack of understanding JS's basics not even Nodejs itself (y…

Well I am pretty good at javascript both es5 and es6. As I am full stack developer having skills in both frontend (angular, react, gulp, grunt) and backend. The only problem I am facing is to find a good and stable web framework for nodejs. I tried Sails due to its popularity, but I found its broken in many places, documentation is not updated and hence misleading. Two days ago I started using Loopback uptill now I have not faced those issues that I faced with Sails. Lets see how it goes. Which frameworks do you use in production?
Post reply on HN