8

I'm digging into Node.js now and the whole idea seems brilliant to me. But I'm interested in what the benefits of using Node.js are when developing "traditional" sites with a bit of AJAX and no realtime features. When I say traditional, I mean the sites that one usually builds using MVC frameworks on platforms like PHP, ASP.NET, etc.

I know that the Express framework is popular, but the question is more about what I would gain by switching to Node.js rather than simply "Can I do MVC in Node?".

Hashim Aziz
  • 1,786
  • 4
  • 21
  • 41
artvolk
  • 9,204
  • 11
  • 51
  • 83

2 Answers2

7

Node has the advantage of

  • having a rich open source community with third party modules that solve most problems
  • having a low level API with a minimal amount of "default" bloat
  • reducing language context switching
  • having a decent level of performance
  • allowing you to manipulate the HTTP server programatically within your application
Raynos
  • 156,883
  • 55
  • 337
  • 385
  • would +1 the "reducing language context switching" directly if I could. You'll get much better at Javascript in general as you start to create applications that use it for all aspects. – Brad Harris Apr 01 '12 at 22:21
  • 1
    You also gain the ability to re-use portable code between the client and server where it makes sense. This may mean sharing template rendering on the client and server, or re-using data models on both the client and server. There are lots of scenarios where it may be useful, and it's usually not even an option to consider on other platforms. – Brad Harris Apr 01 '12 at 22:24
  • Code re-use on server/client is a difficult thing to get correct, yes it can be done, I havn't witnessed anyone do it in an elegant fashion yet – Raynos Apr 01 '12 at 22:48
  • Even just something as simple as a shared library of validation functions that works in the browser and the server is really valuable. – Peter Lyons Apr 02 '12 at 14:24
2

I guess this url: How to decide when to use Node.js? -is all you need.I am making this as community wiki.

Community
  • 1
  • 1
Monojit
  • 185
  • 2
  • 3
  • 14