Technical introduction

ESXX Architecture ESXX, pronounced Essex, is web application server that executes web applications written in JavaScript on the server-side. It's written in Java and has no external dependencies except for J2SE 6.0 — everything else that's required is packaged in one single, executable JAR file.

Simplicity does not have to mean limiting or incomplete, though. Some of the highlights of ESXX are:

JavaScript 1.7, provided by Rhino.
Modern JavaScript really is a fantastic language. We'll be tracking Rhino releases, so expect 1.8 in the future.
E4X extensions
Meaning unparallelled ease of use when working with XML documents.
XSLT 2.0, provided by Saxon 9
For state-of-the-art XML transformations with access to user-defined JavaScript and Java extension functions directly from the XSLT templates.
Embedded SQL database (H2)
For quick prototyping or situations where a non-distributed web application is simply good enough.
Built-in web server
Suitable for development and small-scale deployments.
Secure by default
ESXX is designed to make the applications immune to SQL injection or XSS attacks. More …
Encourages layer separation and state-less design
Resulting in highly scalable, easily maintainable web applications.
Ready for the multi-core era
Supports multithreaded JavaScript applications with easy-to-use fork/join and parallel array primitives. More …
A RESTful mindset
It encourages good-looking URIs and exposes web services/resources, local files, LDAP directories and SQL databases using the same API.
Full access to J2SE 6
That's thousands of useful classes and arguably one of the best runtime environments on the planet. Naturally, you can plug in your own or 3rd party Java code too, as well as native JNI modules.
Remotely controllable via JMX
Unload or view statistics about running applications directly from VisualVM or JConsole.
Standards-based
JavaScript, XML, XSLT, SQL, Java  … This is stuff you probably already know, so you'll be productive in no time.

Additionally, ESXX can be used to execute JavaScript script files right from the command line. See here for a few examples.

What it's not

ESXX is a small runtime for JavaScript web applications, mainly intended as a PHP alternative (or, on the small scale, a J2EE alternative — web apps do not have to be big and complicated!). It's not a web application framework, although you could certainly write one for it. Specifically:

  • There is no built-in object-relational mapper.
  • There is no automatic session handling or continuations support.

But remember, just because something is not directly available in the ESXX executable, it doesn't mean it couldn't, or shouldn't, be written as a JavaScript framework!

More …