I heard that after google's V8 engine was developed, JS became much faster and was able to make JS as a server side language. But isn't the languages like python is slow either?
-
1You've heard wrong. JavaScript was designed as a server-side language from nearly the very beginning, and implemented in Netscape's server product. See [this question](https://stackoverflow.com/a/26321883/1048572) about why it wasn't popular, though. – Bergi Dec 05 '20 at 12:28
-
JavaScript **has been** used as a server language before Node.js. It was not very popular as a server-side language before Node.js. – axiac Dec 05 '20 at 12:28
1 Answers
Why javascript couldn't be used as a server language before node.js?
JavaScript was used as a server-side programming language before Node.js. Long before.
JavaScript was originally created as a server-side language for Netscape Application Server (as LiveScript in September 1995, renamed JavaScript in December).
Microsoft's JavaScript dialect JScript was available for server-side scripting in ASP on IIS (alongside VBScript) from within just a couple of years of that.
Various non-Node.js projects looked at using JavaScript on servers in the early 2000s (using SpiderMonkey from Mozilla or, later, V8 from Google [one was called ChromeServer IIRC]), but Node.js was the one that caught fire.
I heard that after google's V8 engine was developed, JS became much faster and was able to make JS as a server side language. But isn't the languages like python is slow either?
That's a very different question. It's true that V8 pushed JavaScript performance forward markedly (and since then other engines have done the same), but I don't think performance was the primary reason JavaScript wasn't used more as a server-side language earlier (as you say, some implementations of Python at the time weren't particularly quick, similarly PHP). Other languages were just better established, or had better tooling, or were just the flavor of the day. JavaScript was newer.
The big change came when JavaScript became popular, not when it got faster, though granted the two happened in rapid succession. Sites like Google Maps showed just how powerful client-side JavaScript and DOM had become, and that drove a massive number of people to learn the language. For a lot of shops, having the client-side and server-side in separate languages was just fine, but a number of people wanted to use the same language on both sides of the fence. JavaScript was effectively the only game in town on the client, so interest in it on the server grew. Node.js rode and fed that wave.

- 1,031,962
- 187
- 1,923
- 1,875
-
@Apeiron - You're welcome! I realized I'd only really answered the title not the body so I went back a few minutes ago and did that. It was after your comment, so you may not have seen it. – T.J. Crowder Dec 05 '20 at 12:52