Node can shutdown the Lamp?

in #technology6 years ago

Node.js is able to shut the so-called " lamp ", or Linux + Apache + MySQL / MariaDB + Php? I make this digression because everybody speak about Node and related projects or addicted to it.

lamp.jpg
picture with creative commons cc0 license

In theory it is possible. Node can run on MacOS and Windows too. Of course from a practical standpoint, that is outside the development, exposing an Internet server that is not Linux is a bad idea. In comparison to PHP development, Node is much easier because you can take anywhere the environment . So in a sense the "L" word is safe.

Let's move to Apache. Node from a practical standpoint is able to expose a web server natively, but it is not able to manage Virtual Host. So Apache or Nginx are still needed, and their presence in my point of view increases the safety. In fact, web server should be used as a proxy systems, Node most likely will turn on a door that is not usually the 80 or 443. So with Apache or Nginx we can decouples the web server by the application, where the proxy libraries will be shown and it will run on standard ports. A potential attacker would be in front of this extra layer, not easily identifiable. So also the "A" word is saved.

Let's go to the database, like MySQL or MariaDB. Node is versatile and can use them safely. Libraries are well known and well documented and these are not even the only ones. However, better use, because they speak "the same language" is MongoDB . Of course if we compare Mongo with MySQL you can even say that Mongo itself is not really a database, not to mention the security, MongoDB in the past has suffered quite heavy situations. But similarly to all other databases it is advisable not to expose them and their use should be intend to "internal" use. This leads to possible security holes to fall very drastically. And empirically also the "M" word is safe.

A the end we come to the painful notes. PHP is the real victim of the Node. In fact, if Node does not need PHP, you can not say otherwise. Or perhaps there may be situations where you do not need Javascript, but let's be honest, we speak a few situations. PHP is limited to process the requests at the server level to expose them to the incoming call. Once it is downloaded by the client's browser has finished its work. With Node the requests also moves on the client, and is able to interact directly with the server part.

I noticed this with my own project of mapping. The PHP file was a mixture of PHP and Javascript on several levels, and the same code is complicated by the fact of having to speak two different languages. Recently I'm working on a little project that uses the same libraries, but being entirely in Javascript. Well all of that has occupied me a long time to make things work between the two languages ​​is literally disappeared when I used Node.

work-731198_1280.jpg
picture with creative commons cc0 license

It is not all gold, Node.js is JavaScript and JavaScript is a language not rigorous but rather interpretable. For example PHP calls for the closure of the lines must be defined, Js not. If you declare a value of a variable I can do it with double or single quotes, and I can mix both in the same file. Things like EsLint are good because I realized the code at one point was a stylistic frenzy, though functional.

This concept of freedom is reflected on libraries and frameworks too, so Node.js is not enough and cascade needs many other things, that in fact inflate the project with Megabytes and more computing power requirements. And this would be not the main problem from a programmer prospective, the libraries and frameworks are equivalent of miles of APIs to be read and learn for move forward.

Maybe it's a temporary problem until one of these frameworks will be a winner. If Node won the war to the direct competitors, one of the most direct subset is uncertain. Take React, Angular and Vue, each of the three has features that the other did not, and the first two were behind names such as Facebook and Google which have advantages and disadvantages. What is better to learn? it is impossible to say now..

What is certain is that the projects in PHP have already greatly reduced in 2017. The same WordPress has put a foot on these technologies, Guntenberg is the proof. And in many speculates a skin change over the next five years. Ultimately, the "lamp" is not yet turned off, certain that its light is already today little more than a candle.

Coin Marketplace

STEEM 0.24
TRX 0.11
JST 0.031
BTC 60936.15
ETH 2921.43
USDT 1.00
SBD 3.70