Node.js is not suitable for typical web projects
- Transfer

"Node.js is not suitable for serious sites and web applications, but only for writing small APIs."
This is bull * hit. I have to say it.
From a translator: Recently, an interesting article by Ionut-Cristian Florescu appeared on coderwall.com about using Node.js to create regular (“standard”) web projects. Before reading it, I completely agreed with the title of the article, but now my opinion has changed somewhat. The position of the author may be controversial in many points, but his arguments are quite interesting. If you have your own opinion on this, leave it in the comments.
I have heard these words so many times that they already bothered me to death. Basically, they come from people who have never used Node.js for anything other than playing the basic todo tutorial, from “pseudo-developers” or “smart people” who like to read about what is now in trend, but they themselves haven’t developed nothing serious.
But besides them, there is a brave new world where, apparently, they think otherwise. Guys like Klout , Geeklist , Transloadit , Cloud9 , and many others presented on this page .
Are they all wrong?
But still, where did this unfounded myth come from?
Outdated data
First of all, despite the fast pace of implementation, Node.js is still a young technology. She is no longer immature, but is still developing fast, fast enough so that the marketing hype and technical articles on Node.js do not keep up with her. In fact, most of the articles and topics on the forums that discuss what Node.js is good for and what not for are very outdated.
Gentiles versus infidels
Secondly, web development and programming languages are almost always objects of religious worship, and many people in these areas do not consider JavaScript a “real” programming language. Well, it may not be perfect, but good enough to be the most widely spoken language on the Internet at the moment.
"Callback hell"
Most Node.js developers should be aware that due to the event-oriented nature, it is quite difficult to do things on Node.js that require sequential execution. In my opinion, this is perhaps the biggest weakness and at the same time the greatest strength of Node.js. Strong, because if you know your tool, it lays the foundation for handling an incredible number of concurrent connections, perhaps an order of magnitude more than you could get using PHP, .NET or RoR. Weakness, because most people rightfully seek to get rid of such code:

Each background operation returns its result (or error) in the callback. The positive side of this is that your application server is not blocked waiting for the operation to complete, but can perform other actions at this time, such as servicing another request, which keeps your application fast and users happy. The negative side is that if you have a lot of background operations (for example, to access some data), your code becomes ugly and incomprehensible.
The good news is that there are quite a few elegant ways to smooth this problem out: Async.js is probably best known, but if you are using CoffeeScript you should definitely consider the next step to “simple and powerful asynchronous stream management optimization” withIcedCoffeeScript . I did not pay much attention to it when I first turned to Node.js a while ago, but now, after using it in several projects, I really can imagine code without await and defer. I consider this an ideal solution for most of the most common use cases, when you have either a series of sequential operations, or a combination of sequential and parallel tasks:

Node.js ecosystem lacks a framework like Rails
Leaving behind language / platform issues, I will say that this is also a false myth. Personally, I love Ruby and Rails, but I find them somewhat redundant for small and medium-sized web projects, and I like being the real master of my code. I prefer to start with a small managed code base and expand it, add modules if I need them and when I need them. Therefore, I believe that Express.js provides the perfect balance between lightness and extensibility. And Connect , (on which Express is built) provides you with all the features of Rack, with, I dare say, an even richer ecosystem. I know that most will compare Express to Sinatra, but I think that Express is something more, and I also heard that even hardcore rubies admit that Rails is sometimes too redundant.
But if you use Node.js and you are impressed with Rails, maybe you should pay attention to Tower.js or Geddy .
Packages, file management
Of course, in the world of Node.js there is nothing comparable to Sprockets ? Actually there is. And not one. Node.js is the place where such things appear. Bower , Brewer.js , Piler - these are the names of only some of them.
UglifyJS Mihai Bazon 'and also runs on Node.js.
Trevor Burnham, author of CoffeeScript: Accelerated JavaScript Development, wrote connect-assets , which is now supported by Andrew Dunkman .
For developers who need a simple, but no less powerful alternative, a few months ago I posted ASPA and ASPA-Express in open-source.
Thus, there is plenty to choose from.
How are things going with template engines? They are also enough , the best in my opinion Jade and Stylus .
Speed and concurrency is not everything
No, speed and concurrency are not all, but they are damn important. I heard many say: "I will use PHP / .NET / Ruby for now, and if my site traffic reaches thousands of visitors per day, I will simply increase the number of servers."
But, apparently, this is easier said than done. Even GitHub sometimes has problems - I’m sure that many have seen an annoying unicorn error page from time to time.
And no one can guarantee that you will have a lot of money before you get thousands of visitors to your site. This usually happens in reverse order, if at all.
Also, I had occasion to hear about sites that Google search robots simply “put”. And of course you do not want this to happen to you, because at the moment in the online business, if Google is not “your friend”, then you simply do not exist.
Thus, the ability to process large volumes of traffic without losing site speed will never be superfluous. Especially if you do not have to pay large sums for infrastructure and support (no one will write this in pure C).
Lack of good Node.js developers
Because Node.js is based on JavaScript, it attracted many web developers with a “lack of proper server development experience” (that is, they are not even familiar with the basic design patterns). Although this is true to some extent, I think most newbies will still stay away from Node.js.
In addition, the same applies to any other platform, framework, or language. There are many developers, but there are much fewer good developers. In addition, in most cases, a good share of common sense will compensate for the lack of perfection.
Large corporations do not use Node.js yet
Excellent. Large corporations use .NET and J2EE, at least in my world. If you want to be there, stick with .NET and J2EE, regularly attend Microsoft and Oracle seminars, and maybe even you should take a closer look at Scala .
This is just my opinion. It is not immutable, but at least I can say that it is justified; throughout my career, I wrote code in C #, Java, PHP, Ruby, JavaScript and more. I worked on “serious” business applications and I also managed to survive as a private entrepreneur not in the field of information technology, so I learned to look at the world not through the prism of IT. But the coding process definitely began to bring much more pleasure when I discovered Node.js.
Based on all this, I had no doubts when choosing Node.js, when I re- edited LeasingSH.ro , a well-known car sales site in Romania. This is not a big project, but it’s just the very typical web project we are talking about:

One of the advantages of using Node.js is that we can probably handle more traffic than we ever get. In addition, the response time has significantly decreased, despite the fact that we still use a single web server: the

code has also become more readable and supported, as the use of the new technology indirectly brings new features (as opposed to the old PHP), such as the use of BitBucketto manage the source code, a clearer separation of tasks - mainly due to the use of Jade templates , effective compression and management of connected files with ASPA .
In conclusion, I would like to see more typical web projects implemented on Node.js. Too many of them are still implemented in PHP. Do not get me wrong, I used PHP for several years and I am not against it, but sometimes we need to look to the future.