ESXX - The friendly ECMAscript/XML Application Server
Java JavaScript Shell XSLT Other C++ Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
debian
docs
examples
jee
lib
package
rsrc
share
src
tests
tools/generate-help
.classpath
.project
CHANGES.txt
ESXX.wxs.in
LICENSE.APL2
LICENSE.BSD
LICENSE.GPL-3
LICENSE.H2-1.0
LICENSE.JavaMail
LICENSE.LGPL-3
LICENSE.MPL-1.0
LICENSE.MPL-1.1
LICENSE.Validator.nu
LICENSE.txt
NOTICE
README
TODO
build.properties
build.xml
esxx.spec.in
install.properties
install.xml
make_package.bat
make_package.sh
publish_package.bat
publish_package.sh
run_wix.bat.in
version.in

README

What it is
**********

ESXX (pronounced "Essex") is a rather silly acronym and stands for
"ECMAScript, SQL, XML and XSLT". It's a very simple and easy-to-use,
yet powerful, JavaScript Application Server written in Java (6) and
utilizing FastCGI for web server communication.

It's built around an E4X-enabled JavaScript run-time (Mozilla's
Rhino), Java 6's JDBC API for SQL queries and the Saxon 9 XSLT 2.0
processor.

The JavaScript code has full access to all Java APIs, which means that
anything that can be done using Java, can be done with ESXX.

The intended work-flow goes like this:

1a) An HTTP method handler in the ESXX run-time invokes a method in a
JavaScript object, which performs all logic operations. This could,
for example, disk access, database queries or remote server
communication using HTTP/SOAP etc. If the logic is complicated, you'll
probably want to implement it in Java, instead of JavaScript, or as a
remote service. The handler returns an XML document (in some
unspecified format), that contains all data that is to be returned or
presented to the client.

1b) Alternatively, ESXX is simply invoked on a plain static file,
containing an XML document (and one or more ESXX PIs). For example,
the document could be a DocBook XML document that is to be presented
to the user.

2) A server-side XSLT stylesheet, backed by JavaScript code if
required, is used to transform the XML document from step 1a/1b into a
format the client understands, usually XHTML (un-styled, but with
basic layout so it renders correctly in old browsers). Plain text,
some other XML format, SOAP or JSON are other possibilities for AJAX
clients.

3) The client receives the document and performs further processing,
if required. If the client is a web browser, this would be something
like like final layout and presentation using client-side XSLT, CSS
and JavaScript.

This work-flow ensures a complete separation between logic, client
data format and layout. However, there is nothing in ESXX that forces
you to design your web applications in this manner.


License
*******

ESXX is available under the GNU GPL license, version 3 or later.

However, as a special exception, this program is allowed to use
APL2-licensed code from the Apache project, JavaMail from Sun, Rhino
from the Mozilla project and Saxon by Michael Kay.

Martin Blom reserves the right to extend the above list of exceptions.

If you'd like to contribute code to this project, complete rights must
be granted Martin Blom, since this project is also available under an
non-GPL license, for a fee. (Note that this does not in any way
restrict your rights when it comes to what you are allowed to do with
the projects code.)


Requirements
************

* Java 6
* A web server supporting FastCGI or AJP, such as Apache or Lighttpd
 (not strictly required, but strongly recommended for production)

These required components are distributed with ESXX, packaged using
One-JAR:

* Commons CLI
* H2
* HttpClient plus dependencies
* JFast
* JLine
* JavaMail
* Jetty
* Jing
* OAuth
* Rhino
* Saxon
* Validator.nu HTML parser

You will probably want a external database to, like PostgreSQL or
MySQL, although you can use H2 in embedded/auto server mode when
running multiple ESXX front-ends).


How it works
************

1) The document requested is loaded and parsed as XML, validated if a
DTD is present. [Cached]

2) The top-level esxx JavaScript object is initialized and the
document loaded is added to it.

3) All <?esxx-* ?> PIs are evaluated. [Compiled]

4) If the element {http://esxx.org/1.0/}:esxx was found, the
appropriate handler is invoked.

5) If there is an server-side XSL stylesheet installed:

 5a) The stylesheet is loaded and parsed as XML, validated if a DTD is
 present. [Cached, compiled]

 5b) The result document from step 1 or 4 is transformed using the
 stylesheet. Extension functions in the form of "javascript:" URI's are
 evaluated.

6) That's it.


The author
**********

ESXX was written by Martin Blom <martin@blom.org>.