NODE.JS VS PYTHON VS PHP
Usage. Prospects. Comparison
Brief theory: what is Node.js and where is this technology applied
What can you do with Node.js
- increased development efficiency due to the use of one language for the front and backend and the possibility of reusing the code;
- the ability to use NPM - the largest package manager;
Node.js vs PHP and Python
Node.js is inferior to PHP in popularity. Suffice it to recall that the most popular content management systems are written in PHP, including WordPress, Joomla !, Drupal. WordPress alone employs about a third of all sites on the Internet.
The PHP infrastructure is more variable than Node.js. For example, PHP developers can choose between several decent web frameworks.
Python is considered one of the best languages for learning programming. But the main difference between Python and Node.js is the application. Python is more universal: it is used both in web development and in Data Science, Machine Learning and other fields. Node.js is more likely "ground" under web development. Thanks to Electron, this technology is also used to develop desktop applications.
Nevertheless, Node.js infrastructure is mature enough, and developers have high-quality and convenient tools. For example, the NPM package manager and the Electron framework for creating desktop applications were mentioned above. Also worth mentioning are the Express and Nest.js frameworks for developing web applications.
Why should you study Node.js and pay attention to the backend JS
That was the first. The second - at some point, there’s a need to work with data stored on the server. It seems to me that any web developer, at least at a basic level, should understand how this all works. And here Node.js is an excellent choice, it allows you to create a full-fledged web server with a minimum entry threshold.
The third. Despite all the mistrust, Node.js has grown to a state of almost an adult instrument and continues to evolve. Today, we finally have decent tools, static typing, and even one-two good frameworks (Nest and Express). We can safely recommend Node.js as a server solution for large, long-lived, loaded projects.
What are the prospects for language and technology
And in the case of Node.js, TypeScript is the main reason, because unlike the browser, we do not need to translate JS to JS - we completely control the runtime. However, the possibilities that TypeScript gives us are far more than just syntactic sugar.
Advice to beginners: where to start, what to study, what to look for
It’s worth starting with a study of UNIX and the fundamentals of computer networking. After that, you can try to write a simple application on Node.js, preferably without frameworks (including without Express). Having understood what TCP / UDP and HTTP / HTTPS are, you can already try to write a full-fledged backend for Express, which provides data via AJAX and template HTML. Also, of course, you have to deal with Nginx or HAProxy, to understand what balancing is. It is very good to understand at least at a minimum level what Docker is and why it is needed.
Diving into TypeScript and trying Nest is the next recommended step. A good option is to study the Angular + Nest bundle since Nest is created under the strong influence of Angular and implements similar concepts.
We highly recommend Mario Casciaro's Node.js Design Patterns.