#REDIRECT [[JavaScript#Server-side JavaScript]]
{{Cleanup|date=December 2008}}
{{r to section}}
'''Server-side JavaScript''' ('''SSJS''') refers to [[JavaScript]] that runs on the [[server-side]]. This term was coined because the language is predominantly used on the [[client-side]], i.e. [[client-side JavaScript]] (CSJS).
The first implementation of SSJS was [[Netscape Communications Corporation|Netscape]]'s LiveWire, included in their [[Netscape Enterprise Server|Enterprise Server 2.0]] product, released in 1996.
== Server-side JavaScript use ==
{|class="wikitable sortable"
|+ Examples of current uses of JavaScript on the server side
|-
! Project/product name
! JavaScript Engine
! Server Platform(s)
! Comments
! Website
|-
| [[10gen]]
| 10gen
| 10gen application server
| Uses the [[Rhino (JavaScript engine)|Rhino]] parser. Compiles Javascript to Java.
| [http://www.10gen.com/]
|-
| [[Acre (web server)|Acre]]
| [[Rhino (JavaScript engine)|Rhino]]
| [[Jetty (web server)|Jetty HTTP Server]]
| Integrated with [[Freebase (database)|Freebase]] to power [http://freebaseapps.com Freebaseapps.com], a collaborative hosting environment.
|-
| [[Apache Sling]]
| [[Rhino (JavaScript engine)|Rhino]]
| Any Java servlet container and standalone.
| Sling is a generic Java web application framework that allows to use any script language via the standard Java Script Engine interface. Sling is RESTful by design and sits on top of a [[Content repository API for Java|Java Content Repository]], giving scripts full access to the JCR.
| [http://sling.apache.org/]
|-
| [[AJAX Push Engine|APE]]
| [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| Standalone [[HTTP]]
| Used to write custom server modules (manage message queue, users, channels, sockets, http, ...). [http://www.ape-project.org/wiki/index.php/How_to_build_a_serverside_JS_module]
| [http://www.ape-project.org/]
|-
| [[AppJet]]
| [[Rhino (JavaScript engine)|Rhino]](modified)
|
| Also provides hosting in a virtual machine
|
|-
| [[Aptana|Aptana Jaxer (dead)]]
| [[Mozilla]] + [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| [[Apache HTTP Server]]
| An actively developed, community open source ajax-server based on the Mozilla browser (DOM + JavaScript engine) . HTML, JavaScript, and CSS are native to Jaxer, as are XMLHttpRequests, JSON, DOM scripting, etc. It offers access to databases, files, and networking, as well as logging, process management, scalability, security, integration APIs, and extensibility.
| [http://www.aptana.com/jaxer/]
|-
| [[Active Server Pages|ASP]]
| [[JScript]]
| [[Internet Information Services|IIS]]
|
|
|-
| [[Axiom stack|Axiom Stack]]
| [[Rhino (JavaScript engine)|Rhino]]
| [[Jetty (web server)|Jetty HTTP Server]]
| Actively developed open source SSJS server. [[JSON]], [[E4x|E4X]], [[List comprehensions|List Comprehensions]]. Complete access to Java APIs. Built-in security. [[Lucene]] data store by default with [[JDBC]] access to relational databases.
| [http://www.axiomstack.com/]
|-
| [[Cocoon Flowscript]]
| [[Rhino (JavaScript engine)|Rhino]]
| [[Apache Cocoon]]
|
| [http://cocoon.apache.org/2.1/userdocs/flow/api.html]
|-
| [[CouchDB]]
| [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| Standalone [[HTTP]]
| Used in [[MapReduce]] and update validation functions as well as to transform [[JSON]] documents and view results into [[HTML]] or other [[content-type]]s.
|
|-
| [[DovetailDb]]
| [[Rhino (JavaScript engine)|Rhino]]
| [[Jetty (web server)|Jetty HTTP Server]]
| DovetailDB is a schemaless, JSON-based database with an Apache license. You can use the hosted database or install your own. You can override the handlers to supplement with access control, use map/reduce, install JavaScript stored procedures to call from the client, and more.
| [http://www.millstonecw.com/dovetaildb/]
|-
| [[Eclipse (software)|Eclipse e4]]
| [[Rhino (JavaScript engine)|Rhino]]
| [[Equinox OSGi]], bundled with [[Jetty (web server)|Jetty]], any servlet container (using the servlet bridge)
| Extensions can be written in JS, not just Java, especially servlets using the [[OSGi]] [[HTTP]] Service. Frontends can be developed with [[Rich AJAX Platform|Eclipse RAP]] using the [[Standard Widget Toolkit|SWT]] and [[JFace]] APIs, or any other UI framework. Focus is on modularity ([[Plug-in (computing)|plug-ins]]), extensibility, scalability.
| [http://wiki.eclipse.org/E4/JavaScript]
|-
| [[EditMe]]
| [[Rhino (JavaScript engine)|Rhino]]
| Hosted (Tomcat)
| Wiki with embedded JavaScript engine and API for application development within the wiki
| [http://www.editme.com/]
|-
| [[Ejscript]]
| Ejscript
| [[AppWeb Web Server|Appweb HTTP Server]], [[Apache HTTP Server]]
| Enhanced ECMA-262 Language and ([[Ruby on Rails]] like) web framework including Model/View/Controller paradigm, SQLite database connectivity, Ajax libraries and a suite of view controls. Includes command line generators and tools.
| [http://www.ejscript.org/]
|-
| [[ESXX]]
| [[Rhino (JavaScript engine)|Rhino]]
| FastCGI, stand-alone [[HTTP]], any Java servlet container, [[Google App Engine]]
| Focus is on ease of use, web security and XML/XSLT (via Saxon). Has SQL, LDAP, HTTP/REST, SOAP and Java support. Can also execute JS scripts from the command line.
| [http://esxx.org/]
|-
| [[GLUEscript]]
| [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| [[Apache HTTP Server]], FastCGI and Stand-alone
| Glueing Libraries Using [[Ecmascript]] (GLUE) ports [[sqlite]], [[mysql]], [[memcached]], [[wxWidgets]], ... to JavaScript. GLUEscript is the successor of wxJavaScript
| [http://gluescript.sf.net/] [http://gluescript.sourceforge.net/?q=node/31] [http://docs.wxwidgets.org/stable/wx_classref.html#classref]
|-
| [[Google Apps Script]]
|
|
| Automate simple tasks across Google Products
| [http://www.google.com/google-d-s/scripts/scripts.html]
|-
| [[GromJS]]
| [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| [[Bauk]], FastCGI and Stand-alone using gromjscli
| GromJS Server-Side JavaScript interpreter includes support for files (open, read, write, lock, seek, truncate, etc.), MySQL, PostgreSQL and SQLite databases, session variables, hash arrays, pipes, HTTP file-upload, cookies and more.
| [http://bauk.ws/gromjs.jsx]
|-
| [[Helma]]
| [[Rhino (JavaScript engine)|Rhino]]
| [[Jetty (web server)|Jetty HTTP Server]]
| Complete package with web server and framework.
| [http://dev.helma.org/]
|-
| [[im-jssp]]
| [[Rhino (JavaScript engine)|Rhino]]
| Resin and any other Java servlet container.
| "'''im-jssp'''" is a template engine that used Server Side JavaScript and HTML. <br />And "im-jssp" has custom tag "'''jsspRpc'''" that is Server Side JavaScript can be called from Client Side JavaScript seamlessly.
| [http://oss.intra-mart.org/projects/im-jssp/] (Japanese)
|-
| [[Jack (web server)|Jack]]
| Multiple
| Multiple
| A JavaScript engine and server-agnostic interface, much like [[Rack (interface)|Rack]] for [[Ruby (programming language)|Ruby]] and [[Web Server Gateway Interface|WSGI]] for [[Python (programming language)|Python]].
| [http://jackjs.org/]
|-
| [[jsext]]
| [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| [[Apache HTTP Server]], [[lighttpd]] and Stand-alone
| Has modules for fastCGI, CGI, MySQL, SQLite, FTP, SMTP, HTTP, AJAX, JSON, SOAP, WSDL and more. Automatic inclusion of C libraries.
| [http://jsext.sourceforge.net/]
|-
| [[jslibs]]
| [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| FastCGI and Stand-alone (TCP)
| Native libraries bindings: NSPR, SQLite, FastCGI, libTomCrypt, librsvg, libpng, libjpeg, FreeType, libffi, ...
| [http://jslibs.googlecode.com/]
|-
| [[JSSP]]
| [[Rhino (JavaScript engine)|Rhino]]
| Any Java servlet container.
| Contains a modified Rhino version for embedded SQL support
| [http://jssp.de/]
|-
| [[Juice (JavaScript framework)|Juice]]
| [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| Stand-alone
|
| [http://juicejs.org/]
|-
| [[Junction (web server)|Junction]]
| [[Rhino (JavaScript engine)|Rhino]]
| [[Apache HTTP Server]]
| Ruby on Rails port to javascript
| [http://code.google.com/p/trimpath/]
|-
| [[Livelink WCM Presentation Server]]
| [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| [[Apache HTTP Server]], [[Internet Information Services|IIS]] and [[Sun Java System Web Server]]
| A commercial content management system used in a number of European public-sector and financial organizations. It uses SSJS for dynamic features and to customize the behavior of built-in objects. Though still developed and supported for existing users, this SSJS product is no longer available for sale to new customers.<ref>{{cite web |url=http://www.opentext.com/2/global/sol-products/pro-wcm/letter-wcm-customers.htm |title=A letter to Livelink WCM customers |accessdate=2009-01-24 }}</ref>
|
|-
| [[mod js]]
| [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| [[Apache HTTP Server]]
| mod_js is a stand-alone module for Apache that is able to execute JavaScript on the server. Now discontinued.
| [http://modjs.org]
|-
| [[Myna Javascript Application Server]]
| [[Rhino (JavaScript engine)|Rhino]]
| Any Java servlet container, packaged with winstone
| Myna is a general purpose, 100% open source, web platform modeled after Cold Fusion with centralized datasources, Web-based Administration, runtime Object Relational Mapping, templating, LDAP access, strong cryptography, SOAP and XML-RPC publishing and more.
| [http://www.mynajs.org]
|-
| [[Narwhal (JavaScript platform)|Narwhal]]
| [[Rhino (JavaScript engine)|Rhino]], [[WebKit#JavaScriptCore|JavaScriptCore]], [[XULRunner]], [[V8 (JavaScript engine)|V8]], others
| Multiple
| An implementation of the [[CommonJS]] standard for multiple JavaScript interpreters.
| [http://narwhaljs.org]
|-
| [[Node.js]]
| [[V8 (JavaScript engine)|V8]]
| Standalone
| Javascript asynchronous, Event-based I/O. Influenced by systems like Ruby's Event Machine or Python's Twisted. Few modules available (yet).
| [http://nodejs.org]
|-
| [[NOTEX]]
| [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| CGI/FastCGI script on any web server
| NOTEX is a CGI script to run JavaScript files hosted anywhere on the network to process [[XML]] data with [[ECMAScript for XML|E4X]]
| [http://www.notex.info/]
|-
| [[OpenMocha]]
| [[Helma Object Publisher|Helma]]
| Stand-alone
|
| [http://openmocha.org/openmocha/]
|-
| [[Opera (web browser)|Opera]]
| [[Presto_(layout_engine)#JavaScript_engines|Futhark]]
| [[Opera (web browser)|Opera Unite]]
| Javascript is the server-side language used to develop services for the Opera Unite feature of the Opera browser. This is a server built in to the browser. The javascript API includes local file access to a virtual sandboxed file-system and persistent storage via persistent global variables.
| [http://unite.opera.com/]
|-
| [[Persevere (web server)|Persevere]]
| [[Rhino (JavaScript engine)|Rhino]]
| [[Jetty (web server)|Jetty HTTP Server]]
| JSON database integrated with JavaScript environment with a HTTP/REST, JSON-RPC, and Comet interfaces.
| [http://www.persvr.org/]
|-
| [[Phobos (web server)|Phobos]]
| [[Rhino (JavaScript engine)|Rhino]]
| Glassfish and any other Java servlet container.
|
|
|-
| [[Plain Old Webserver|POW]]
| [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| [[Mozilla Firefox]]
| A Mozilla Firefox Extension which adds a server to your browser. Templates can use SSJS.
| [https://addons.mozilla.org/firefox/3002/]
|-
| [[PyV8]]
| [[V8 (JavaScript engine)|V8]]
| Standalone
| Python Wrapper for Google V8 Javascript Engine which could be used in the web framework or script
| [http://pyv8.org/]
|-
| [[Rhino in Spring]]
| [[Rhino (JavaScript engine)|Rhino]]
| [[Spring Framework (Java)|Spring]]
|
| [http://rhinoinspring.sourceforge.net]
|-
| [[Rhinola]]
| [[Rhino (JavaScript engine)|Rhino]]
| [[Apache HTTP Server]]
| Uses [[gcj]]
| [http://mod-gcj.sf.net/rhinola.html]
|-
| [[Server Side Execution (SSX)]]
| [[Rhino (JavaScript engine)|Rhino]]
| [[Devwex]]
| JSP/ASP-like scripting; supports threads, object (de)serialization, access to local and remote filesystems, database connection via jdbc; released under the GPL2 license
| [http://www.seanox.de/projects.ssx.php]
|-
| [[Server Side Javascript]]
| [[Rhino (JavaScript engine)|Rhino]]
| [[Jetty (web server)|Jetty 6]]
| For writing servlets.
| [http://www.bluishcoder.co.nz/2006/05/server-side-javascript.html]
|-
| [[SSJS]]
| [[SpiderMonkey]]
| [[Synchronet|Synchronet BBS]] Integrated Http Server
| Current developer trunk (3.15a) supports [[E4X]]
| [http://www.synchro.net/]
|-
| [[Torino (web server)|Torino]]
| [[Rhino (JavaScript engine)|Rhino]]
| Tomcat and any other Java servlet container.
| Server-side JavaScript environment for developing web applications. Provides a rich server-side programming environment using Java APIs. Released under the GPL3 license.
| [http://torino.sourceforge.net/]
|-
| [[v8cgi]]
| [[V8 (JavaScript engine)|V8]]
| Apache, cgi, fcgi and Stand-alone
| Libraries for [[GD Graphics Library|GD]], [[HTTP]], [[MySQL]], [[Session (computer science)|Sessions]], [[Internet socket|Sockets]] and [[Template engine (web)|templating]].
| [http://code.google.com/p/v8cgi/]
|-
| [[Whitebeam (web server)|Whitebeam]]
| [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| [[Apache HTTP Server]]
| Server-side JavaScript environment for developing web applications. Includes integration with graphics libraries and the PostgreSQL database. Actively developed and in use supporting commercial sites. Released under the BSD license. Latest release supports E4X.
| [http://www.whitebeam.org/]
|-
| [[wxJavaScript]]
| [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| [[Apache HTTP Server]] and Stand-alone
| With E4X and wxWidgets ported classes. GLUEscript is the successor of wxJavaScript
| [http://www.wxjavascript.net/]
|-
| [[Xpages]]
| [[IBM JS]]
| [[Lotus Domino Server]]
| Compiles Javascript to Java, which then runs in Domino context
| [http://www-10.lotus.com/ldd/ddwiki.nsf]
|-
| [[jsdb]]
| [[SpiderMonkey (Javascript engine)|SpiderMonkey]]
| Stand-alone
|
| [http://www.jsdb.org/] [http://www.jsdb.org/reference.html]
|-
| [[Juice (Javascript)|Juice]]
| [[Flusspferd]] (SpiderMonkey)
| Stand-alone
| Juice is a server-side web framework built around CommonJS modules and specifically the JSGI 0.3 proposal. Its an open-source stack released under the MIT license that comes bundled with its own development server and a javascript interpreter.
| [http://juicejs.org/]
|-
|}
Other common server-side programming languages are [[JavaServer Pages|JSP]], [[Active Server Pages|ASP]], [[Perl]], [[PHP]], [[Python (programming language)|Python]], [[Ruby programming language|Ruby]] and [[ColdFusion]] amongst others.
==Specifications==
*[http://research.nihonsoft.org/javascript/ServerReferenceJS12/index.htm Reference for Server-Side JavaScript 1.2]
*[http://research.nihonsoft.org/javascript/ServerGuideJS12/index.htm Guide for Server-Side JavaScript 1.2]
*[http://wiki.commonjs.org/ CommonJS Specifications to unify SSJS APIs]
==See also==
*[[JavaScript]]
==External links==
*[http://groups.google.com/group/commonjs The Server-Side JavaScript Google Group] dedicated to creating cross-platform SSJS standard APIs.
*[https://developer.mozilla.org/en/JavaScript_shells https://developer.mozilla.org/en/JavaScript_shells] especially section "Standalone JavaScript shells"
==Notes and references==
{{reflist}}
{{ECMAScript}}
{{compu-lang-stub}}
{{DEFAULTSORT:Server-Side Javascript}}
[[Category:JavaScript]]
|