开发者

Node.JS in front of PHP or Rails

I'm going to start a brand new HTML5.0 project for mobile device, and my question is simple, why makes you choose Node.JS, in front of PHP or Java or Rails for Backend.

I plan to use Express, Backbone.Js, MongoDB / Redis, if i choose Node.JS; but i don't know (for now) these technologies and it's not a time waste开发者_开发百科 to learn these !

But in front of traditional languages such as Java, PHP, what could help you to start a project using Node.JS & Co.

I've heard lots of (old school) dev, that says : Hey JavaScript on server-side pouah ! you're a silly boy ! Javascript is for Hide/Display divs only, etc... !

Yes, in fact i don't know how to convince these developers that Server-side js, is cool ! it's legend .... wait for it ... dary ! If you have more args, different from speed, I'm ready to listen !

In my opinion, it's good idea simply in the fact that there is only one language from Frontend to Backend, vi JSON. But it's not enough !

Thanks in advance.


Here's a recommend stack.

There are plenty of articles on why node.js is better.

  • Usages of node.js
  • Why and when
  • What's the point?
  • It scales properly.
  • It's rapid to develop.
  • Code re-use is solid.
  • Async IO is awesome.
  • socket.io is awesome for real-time communication.

I actually need solid reasons to prefer java/php/ruby on rails. Do you have any?

basically the only disadvantage is that it's young and not stable so I wouldn't use it for big projects or safety critical projects.


I have already done a project with Node.js and Mongodb, and working on another. I was a PHP & MySQL dev but I am focusing on node & mongo now.

Here are my personal reasons:

  1. Node.js - Fast, Simple and Scalable. You can see a lot of benchmark online. and I have done a lot of load testing with real application. (e.g. with inserting data to db, doing remote call, encryption..etc not just Hello World). The throughput is astonishing good even before any optimization or load balancing.
  2. Data - Node.js & MongoDB are both in JSON format. so there is less trouble of converting any data format from DB to server to client js. They are all use the same JSON. And it is good for store web data/ doc.
  3. Learning curve - it takes me less than a cup of coffee time to learn both Node & Mongo.
  4. Community - Both have a strong & responsive community. Cool things are developed every week. Of course, the downside is that I have to update it every few days. So, node & mongo are not for lazy developer who not willing to learn anything new.
  5. Cloud - I think it fits so well with cloud environment. :)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜