Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netscape Enterprise Server and Server-Side JavaScript (SSJS) vs Node.js

What are the major differences between the Netscape Enterprise Server implementation of Server-Side JavaScript (SSJS) and the node.js implementation?

Why did not Netscape's implementation gain attention while the node.js seems to be far more popular?

like image 911
Handsome Nerd Avatar asked Aug 21 '13 07:08

Handsome Nerd


People also ask

Is node js server-side JavaScript?

Node. js is an open source JavaScript runtime environment that lets developers run JavaScript code on the server. If that's too complex for you to understand then you should think of it this way: Node. js is JavaScript that runs outside the browser — on the server.

Is node js server-side or client side?

Node. js is a JavaScript framework for writing server-side applications. In its simplest form it allows you to trigger small JavaScript programs from the command line without any browser involved. For example, assuming node is installed if you write a JavaScript program in a file called hello.

Is JavaScript good for server-side?

While most JavaScript applications run on the client side, there are some server-side applications that it is useful for, such as creating web servers. With its many capabilities, it is no wonder that JavaScript is so popular.

Is node js same as JavaScript syntax?

The Syntax is exactly the same. There are differences in the apis however. The standard browser dom is not available in node but it has additional apis found at nodejs.org. Any syntax differences are due to quirks in browsers.


2 Answers

Back in 1999/2000, I used to work at a company that used Netscape Server and SSJS. I don't know how popular it was at the time, but from first hand experience, I can tell you that almost everything about it was terrible:

  • It was a giant pain to debug (any changes to source files, even static files, required full reloading of the application, which was not a fast operation)
  • A simple error (such as an uncaught exception) often would lead to catastrophic server failure. Somewhat amusingly, this is the default behavior of NodeJS, although it is much easier to get around this problem with Node.
  • Although the syntax was JavaScript, it failed to implement one key advantage of modern JavaScript: runtime interpretation. Server Side JS with Netscape Server required compilation before deployment, and therefore dictated a very slow development process.
  • It followed a multi-threaded execution model (rather than modern JS VMs, which are almost always event-loop based)
  • Possibly it's biggest weakness was a lack of asynchronous programming support. All IO operations were blocking, and as such it required a heavyweight multithreaded model to support multiple clients. The execution model was more similar to a J2EE container than to modern event driven JavaScript VMs (ie: V8). In my opinion, this is the number one thing that NodeJS gets right: the async philosophy is deeply embedded in the NodeJS development workflow and it is the key to its lightweight, event driven, extremely efficient concurrency model.

Just for giggles, here's a link to the SSJS reference guide from version 1.2 . Starting on page 21, you can see all the standard functions and synchronous APIs for file objects, database queries, etc...

My company ended up switching to ColdFusion shortly thereafter and never looked back.

like image 70
Garcia Hurtado Avatar answered Sep 20 '22 14:09

Garcia Hurtado


The main difference would be the evolution of Javascript over the the past 15+ years. Node.js uses the V8 Javascript Engine which would be far more optimized for modern computers.

Wikipedia has a good list of the differences between various server-side JS solutions.

Here is a list of features for Netscape Enterprise Server - provides a good idea of what makes modern SSJS solutions much better.

Why did it not gain attention? Realistically, client-side JS has only recently started to become the standard for web development so it was unlikely anybody would have considered using it for server-side development when it wasn't even really widely adopted for it's original purpose. I say widely adopted in that previously it was always difficult to cater JavaScript solutions to all browsers.

like image 24
CodingIntrigue Avatar answered Sep 19 '22 14:09

CodingIntrigue