Live data from Hacker News

Node.js - Convincing the boss guide

nodeguide.com

81–85 of 85 posts

Re: Node.js - Convincing the boss guide

#81
post #66

Earlier quoted context omitted.

The majority of my free time goes into the Ruby/Rails ecosystem, but I decided to finally jump into javascript for real and force myself to grok things like closures and context (still strugglin'!) the past month. Node isn't a new language. It's javascript. Node just gives javascript the rest of the web stack, conventions, and a package manager that feels like Ruby gems. Javascript already is the best solution for al…

Javascript is already out there in the wild solving problems that Ruby/Python/Clojure can't. Examples?

The entire front end side, for starters

Re: Node.js - Convincing the boss guide

#82
post #81

Earlier quoted context omitted.

Javascript is already out there in the wild solving problems that Ruby/Python/Clojure can't. Examples?

The entire front end side, for starters

Most companies already use multiple language, and for good reason as not all languages are suitable in all cases. The idea of having a single language everywhere is nice, but in practice this forces you into substandard solutions in some contexts. This is not a compelling argument for me.

However, if you really do insist on having one language everywhere, you can also compile Clojure down to Javascript using a subset of Clojure called ClojureScript.Unlike Coffeescript, ClojureScript uses Clojure semantics and is not just a different syntax for Javascript.

This doesn't save you from all the odd performance edge cases of Javascript, but at least it gives you conciseness and semantics of Lisp in the one situation where you have no choice of language: the browser.

Re: Node.js - Convincing the boss guide

#83
post #63

Earlier quoted context omitted.

If only a group of more than 5 developers were enthusiastic about the same thing! Your enthusiasm for node is another persons pain. I've got 1 coder enthusiastic about node, another for clojure, and another for scala. Should every project be a different language and ecosystem? What happens when programmers move around in an organization. "I think part of node's mass appeal is that it has introduced an element of simp…

Does node let you use things like libcurl? I only ask because there are libraries which already have that implemented. I don't use node so I have no idea if it can hook into system-level stuff like that.

The difference is that it's a 5 minute thing in ruby with any of the major http libraries. Is libcurl evented? No matter how you slice that cake, it's a lot more than 5 minutes of effort.

Re: Node.js - Convincing the boss guide

#84
post #33
post #7

Earlier quoted context omitted.

I have to disagree. I understand that you can get quickly the feeling that you have to do a lot of stuff manually with node because node packages (gems in node) are more kind of atomic and not full-blown like rails. You can quickly setup a rails-like-environment with node packages. There are different web frameworks which are a refreshing take compared to rails and provide same or better functionality. ORMs like Acti…

Prove it: What is node equivalent of: "rails g resource User email:string password:string"? AFAIK there is none. At least not one that would take care of migrations, validation, security, logic and views. And if I want to use postgres? Sure, there's a npm package. But it's for queries, I still need to define models and validation manually. ....

I use my own migration utility using `psql Yes Rails does all that for you automagically but you can use a lightweight ORM like FastLegS. A model is as simple as this:

UserDao = FastLegs.Base.extend({ tableName: "users", primaryKey: "id" });

To expose it:

app.get("/user/:id", function(req, res) { UserDao.find(req.params.id, function(err, result) { res.json(result.rows[0]); }); });

Let's not forget about unit tests. I can run well over 100 test cases in just over ONE second! Rails is PAINFULLY slow at this.

I've done enough Rails to know how productive it is, and there are many things I miss. I'll argue though I'm more productive with node.js since we do most GUI with Backbone on the client. I can share code between client and server, for example validations.

Re: Node.js - Convincing the boss guide

#85
I seriously think Node.js is one of those things that get's overhyped. Yes it's fun to code...until the nested callbacks get's too much. For me personally I will stick production code with ruby/sinatra and eventmachine and play with node for personal projects.
Post reply on HN