Need to convert my php app in node.js [closed] Need to convert my php app in node.js [closed] express express

Need to convert my php app in node.js [closed]


I don't agree that you should roll your own before utilizing some of the excellent libraries available in node.js. No one recommends that you build your own MVC framework before using Ruby on Rails or ASP.NET MVC. However you definitely must understand the strengths and weaknesses of node.js and how to effectively leverage them.

ASP.NET and PHP are much more forgiving platforms than node.js. If you do something stupid in most platforms, you can still deploy and have a functional system. They are very tolerant of poor performance and sloppy code. If you screw something up in node.js, it's possible for the entire webserver to simply stop responding to requests while it processes something.

It is possible to get extremely good performance and scalability from node.js, but you have to understand functional programming and make sure that the code you write doesn't block. You have to know how to break medium and larger applications up into separate parts (dare I say nodes?) that know how to communicate in order to accomplish more complex tasks.


You can't even remotely compare node.js to something like PHP. Node.js was designed to provide a full-stack high-performance IO framework, not a scripting language based on a web-server of your choice.

First of all, you HAVE to make sure you fully understand the node.js paradigm and it's event-based architecture. It's completely different to something like ASP.NET or PHP, you really have to rethink on the whole programming model. In order to achieve this, it's important to learn node.js FROM SCRATCH! Don't start directly with some framework like express or flatiron. Learn it from the basics: console.log('Hello world')

Maybe some good starting points:

Some further links:Advanced documentation for node.js developer