Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 143781 of Server-Side JavaScript (SSJS)

  • Revision slug: Server-Side_JavaScript_(SSJS)
  • Revision title: Server-Side JavaScript (SSJS)
  • Revision id: 143781
  • Created:
  • Creator: Khakman
  • Is current revision? No
  • Comment page created, 339 words added
Tags: 

Revision Content

Here's a radical idea:  Use one language to write entire Web apps -- and have that language be the one that billions of web pages every day already use.

Sounds obvious doesn't it, 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 than what they use in the browser which leads to segregated teams, disaprate know-how, and at times plenty of server-side gymnastics with string manipulation to generate HTML or Ajax pages.  Of course the simplicity of using JavaScript on the server was part of Netscape's original vision back in the day with Netscape LiveWire.  But that was when 350 mhz servers were the best thing you could buy and long before Mozilla emerged 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 become extraordinarily useful and applicable on the server-side again -- this time with performance in the same range as with other popular server-side environments like PHP and Ruby on Rails.  And with TraceMonkey to be available soon, JavaScript (both client side and server-side) could see 20x to 40x speed improvements according to Brendan Eich, Mozilla CTO and creator of JavaScript.  Server-Side JavaScript is another way that, as this article quotes Brendan, "that 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.  And some like Aptana with the open source Jaxer server actually embed the entire Firefox browser engine with 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:  Use one language to write entire Web apps -- and have that language be the one that billions of web pages every day already use.</p>
<p>Sounds obvious doesn't it, 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 than what they use in the browser which leads to segregated teams, disaprate know-how, and at times plenty of server-side gymnastics with string manipulation to generate HTML or Ajax pages.  Of course the simplicity of using JavaScript on the server was part of Netscape's original vision back in the day with Netscape LiveWire.  But that was when 350 mhz servers were the best thing you could buy and long before Mozilla emerged 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 <a class="internal" href="/En/Rhino" title="En/Rhino">Rhino </a>(JavaScript interpreter in Java) and <a class="internal" href="/En/SpiderMonkey" title="En/SpiderMonkey">SpiderMonkey </a>(JavaScript interpreter in C) and <a class="internal" href="/En/JavaScript" title="En/JavaScript">JavaScript </a>itself, we have very solid foundations for JavaScript to become extraordinarily useful and applicable on the server-side again -- this time with <a class="external" href="https://www.aptana.com/jaxer/benchmarks" title="https://www.aptana.com/jaxer/benchmarks">performance in the same range</a> as with other popular server-side environments like PHP and Ruby on Rails.  And with <a class="external" href="https://weblogs.mozillazine.org/roadmap/archives/2008/08/tracemonkey_javascript_lightsp.html" title="https://weblogs.mozillazine.org/roadmap/archives/2008/08/tracemonkey_javascript_lightsp.html">TraceMonkey</a> to be available soon, JavaScript (both client side and server-side) could see 20x to 40x speed improvements according to Brendan Eich, Mozilla CTO and creator of JavaScript.  Server-Side JavaScript is another way that, as <a class="external" href="https://arstechnica.com/news.ars/post/20080822-firefox-to-get-massive-javascript-performance-boost.html" title="https://arstechnica.com/news.ars/post/20080822-firefox-to-get-massive-javascript-performance-boost.html">this article quotes</a> Brendan, "that 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.'"</p>
<p><a class="external" href="https://en.wikipedia.org/wiki/SSJS" title="https://en.wikipedia.org/wiki/SSJS">Many vendors</a> today are embedding Mozilla Rhino  or Mozilla SpiderMonkey  into Web server environments.  And some like Aptana with the open source <a class="external" href="https://www.aptana.com/jaxer" title="https://www.aptana.com/jaxer">Jaxer server</a> actually embed the entire Firefox browser engine with a Web server to enable server-side Ajax and server-side DOM access in addition to server-side execution of JavaScript.</p>
<p>  </p>
Revert to this revision