Server-Side JavaScript

  • Revision slug: Web/JavaScript/Server-Side_JavaScript
  • Revision title: Server-Side JavaScript
  • Revision id: 418483
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment grammer, time. next to add modern actual content, maybe node.js paraMoved From JavaScript/Server-Side_JavaScript to Web/JavaScript/Server-Side_JavaScript

Revision Content

Here's a radical idea:  Use one language to write entire Web apps -- the same language which billions of web pages already use, every day.

Sounds obvious, but for at least the first twelve years of the Web's evolution, developers have pretty much had to use different languages on the server from those  available in the browser, leading to segregated teams, disaprate and inconsistent know-how, and plenty of server-side string manipulation gymnastics to generate HTML or Ajax pages. 

The simplicity of using JavaScript on the server was part of Netscape's original vision back in the day with Netscape LiveWire.  But back then, 350 MHz servers were the best you could buy, and Mozilla was yet to emerge from the Netscape organization to continue to advance the state of Web technologies.  Today with computing cycles having increased more than 10-fold and Mozilla's work on Rhino (JavaScript interpreter in Java) and SpiderMonkey (JavaScript interpreter in C) and JavaScript itself, we have very solid foundations for JavaScript to be extraordinarily useful and applicable on the server-side again -- with performance in the same range as popular server-side environments like PHP and Ruby on Rails. 

Now, with TraceMonkey available, JavaScript (both client side and server-side) can see 20x to 40x speed improvements according to Brendan Eich, Mozilla CTO and creator of JavaScript.  Server-Side JavaScript is another way in which, as this article quotes Eich, "Mozilla wants to 'get people thinking about JavaScript as a more general-purpose language' and show them that 'it really is a platform for writing full applications.'"

Many vendors today are embedding Mozilla Rhino or Mozilla SpiderMonkey into Web server environments. Some, like Aptana with the open source Jaxer server actually embed the entire Mozilla Firefox browser engine (including SpiderMonkey) within a Web server to enable server-side Ajax and server-side DOM access in addition to server-side execution of JavaScript.

Revision Source

<p>Here's a radical idea:&nbsp; Use one language to write entire Web apps -- the same language which billions of web pages already use, every day.</p>
<p>Sounds obvious, but for at least the first twelve years of the Web's&nbsp;evolution, developers have pretty much had to use&nbsp;different languages on the&nbsp;server from those &nbsp;available in the browser, leading to segregated teams, disaprate and inconsistent know-how, and plenty of server-side&nbsp;<span style="line-height: 1.572;">string manipulation</span><span style="line-height: 1.572;">&nbsp;gymnastics to generate HTML or Ajax pages.&nbsp; </span></p>
<p><span style="line-height: 1.572;">The simplicity of using JavaScript on the server was part of Netscape's original vision back in the day with Netscape LiveWire.&nbsp; But back then, 350 MHz servers were the best you could buy, and Mozilla was yet to emerge from the Netscape organization to continue to advance the state of Web technologies.&nbsp; Today with computing cycles having increased more than 10-fold&nbsp;and Mozilla's work on </span><a class="internal" href="/en/Rhino" style="line-height: 1.572;" title="En/Rhino">Rhino </a><span style="line-height: 1.572;">(JavaScript interpreter in Java) and </span><a class="internal" href="/en/SpiderMonkey" style="line-height: 1.572;" title="En/SpiderMonkey">SpiderMonkey </a><span style="line-height: 1.572;">(JavaScript interpreter in C) and </span><a class="internal" href="/en/JavaScript" style="line-height: 1.572;" title="En/JavaScript">JavaScript </a><span style="line-height: 1.572;">itself, we have&nbsp;very solid&nbsp;foundations for JavaScript to be extraordinarily useful and applicable on the server-side again -- with </span><a class="external" href="http://www.aptana.com/jaxer/benchmarks" style="line-height: 1.572;" title="http://www.aptana.com/jaxer/benchmarks">performance&nbsp;in the&nbsp;same range</a><span style="line-height: 1.572;"> as popular server-side environments like PHP and Ruby on Rails.&nbsp; </span></p>
<p><span style="line-height: 1.572;">Now, with </span><a class="external" href="http://weblogs.mozillazine.org/roadmap/archives/2008/08/tracemonkey_javascript_lightsp.html" style="line-height: 1.572;" title="http://weblogs.mozillazine.org/roadmap/archives/2008/08/tracemonkey_javascript_lightsp.html">TraceMonkey</a><span style="line-height: 1.572;">&nbsp;available, JavaScript (both client side and server-side) can see 20x to 40x speed improvements according to Brendan Eich, Mozilla CTO and creator of JavaScript.&nbsp; Server-Side JavaScript is another way in which, as </span><a class="external" href="http://arstechnica.com/news.ars/post/20080822-firefox-to-get-massive-javascript-performance-boost.html" style="line-height: 1.572;" title="http://arstechnica.com/news.ars/post/20080822-firefox-to-get-massive-javascript-performance-boost.html">this article quotes</a><span style="line-height: 1.572;">&nbsp;Eich, "Mozilla wants to 'get people thinking about JavaScript as a more general-purpose language' and show them that 'it really is a platform for writing full applications.'"</span></p>
<p><a class="external" href="http://en.wikipedia.org/wiki/SSJS" title="http://en.wikipedia.org/wiki/SSJS">Many vendors</a> today are embedding Mozilla Rhino or Mozilla SpiderMonkey into Web server environments. Some, like Aptana with the open source <a class="external" href="http://www.aptana.com/jaxer" title="http://www.aptana.com/jaxer">Jaxer server</a> actually embed the entire Mozilla Firefox browser engine (including SpiderMonkey) within a Web server to enable server-side Ajax and server-side DOM access in addition to server-side execution of JavaScript.</p>
Revert to this revision