Why not to use Node JS
The web application has came very long way since the dawn of internet. It has seen many platforms and there upgrades making them more easier to develop with better performance in terms of speed and reliability.
Asp.net, JSP and LAMP stack are the current core platforms which are till now being used for web development. For e.g classic asp to asp.net and then finally to ASP.net MVC. Model-View-Controller is a big term which has brought revolution in web applications as code segregation and maintenance was never this easy, with all spaghetti code is segregated according to the purpose of code.
For those who don’t understand asynchronous flow, Asynchronous means the execution is not in straight order for e.g You have web form in which you enter data which goes to server performs some operations step by step and returns you (client) the response.
Suppose on server side there are 4 steps to be performed then in a conventional synchronous environment Step 1,2,3,4 are performed and only then the response is returned. Now for instance if step 2 is the step where it takes longer time about 3 mins (just assume) then the response has to wait 3 min along with step 3 and step 4 . After all the steps are performed only then the response is sent to client side. So here if you see, the user has to wait for too long just to get the response irrespective of whether the steps 1,2,3,4 were useful for response. In the below video too Ryan goes through the similar scenario.
So in Node JS or a asynchronous environment the response would be sent to user irrespective of the 4 steps and later in background or asynchronously they will be executed. This is what exactly told us whenever Node JS is discussed.
But my question begins here Ryan suggests us to change the way we see our apps today the typical CRUD operations but how?
What if steps 1,2,3,4 are all required for the response ? In CRUD operations the steps will be insert/update query to database and if the insert id is required in the response then how exactly we gonna deal with it ? Our 90 % app flow is the same way (CRM and big applications ). I know one day we all will design our apps that way but not TODAY or until we develop that mindset.
The people who without any proper knowledge are migrating to node JS will be in big trouble once they realize that node JS wasn’t best fit for their app. In my personal experience I have seen many people planning to build their next big app in Node JS just because its trending.
Node JS is really in its early stages so no offence to its founders but people must understand and give some time to the technology to evolve until then you can build dummy apps just to explore the potentials of node js but not for production .
On the same note one more thing about node js is that there ain’t any stable / ideal framework to use. Now many will say whoa Express JS …seriously?.
Express js you can call it as primary component to bootstrap the node js but cannot be used for building apps with GBs of code (Yeah the code will be in GBs for big app if you use node). No proper architecture for node frameworks here is list of almost all node frameworks http://nodeframework.com/
I have tried a few but always felt like they are in initial stage with most of them have chat application as default as we had “Hello world ” program :p
When I say web framework I mean one time configuration and later just pure functionality development as in ASP.net MVC , Spring MVC or Laravel , Node JS frameworks are just not there, I am sure they will be in near future and I am also sure the mature node js framework is around the corner , But till then just don’t rush with node for your serious and big projects or else you will face serious consequences in terms of maintaining the code and explaining the structure to evey new coder, just imagine the scenario where in past people who have started their projects in core PHP or classic asp how they struggle in terms of coders and quality features.