With the first Technical Preview release of the Cellosoft Alt Framework I felt it was necessary to write a short foreword for potential users.

The Alt Framework is a new JavaScript-based web application framework built on top of Java Servlets.

If you are anything like me, you would immediately be rolling your eyes and asking why someone went and made another framework. Keep reading and I will try to convince your eyes to stop rolling and start widening.

With the current trend of "Web 2.0" and "AJAX," and various other buzzwords (not to worry, I will refrain from using them), a thought occurs to me: if you are going to be writing lots of JavaScript for the client side, why not also use JavaScript on the server-side? (It occurred to me before all this Web 2.0/AJAX nonsense, but now it just seems all the more obvious.)

JavaScript is a really neat functional language, and if you cannot already think of the advantages of using JavaScript to writing web applications (rapid development, a language web programmers already know, shared code between server and client, etc.), well then maybe you shouldn't be writing them.

Although server-side JavaScript is not a new concept, I found it difficult to find application servers that did it right.

After developing SQueaL, a XML-based SQL schematic system, and making the designs for Onion ML, a XML-based templating system, I came to the conclusion that despite my desire to not create a web application framework, I would end up writing one anyway. And that I might as well do it right.

Thus the Alt Framework was born.

I have approached designing the Alt Framework with a few rules.

The first rule is to design for simplicity. The shortest, simplest, and most straightforward solution is often one of the best, and it tends to make design a lot easier.

The second rule is to reuse. This rule has two meanings. The first is to use existing code and libraries that other people have written, unless it holds you back. The second meaning is to reuse ideas. Sharing concepts and approaches even across unrelated parts of a library make it easier to use.

The last rule is to document. I think that one is self-explanitory.

With those in mind I started developing the Alt Framework.

Instead of writing a web server from scratch, I decided to build a Java Servlet and power it with Mozilla's Rhino JavaScript engine. This instantly gave me access to not only all the JavaScript features, but all the Java features as well.

AltServlet, the servlet I created for the Alt Framework provides the foundation needed to execute modular JavaScript code. While AltServlet enforces a certain convention for modular code, aside from a few minor functional additions, it is essentially a thin layer that lets you write Java servlets in JavaScript.

Technical Preview

The Alt Framework technical preview is an alpha release. It is far from feature-complete, but demonstrates what the Alt Framework could be.

The intention of this release is to generate interest. Instead of just talking at you like I have above, it provides a demo you can download and have running in a few minutes.

page last updated: Thursday, February 14, 2008

copyright © 2006 cellosoft