Eleven 1.0 review

Download
by rbytes.net on

Eleven is a programming language for creating robust, scalable web applications quickly and easily. It offers a 20x programmer pro

License: GPL (GNU General Public License)
File size: 0K
Developer: Joe Morrison
0 stars award from rbytes.net

Eleven is a programming language for creating robust, scalable web applications quickly and easily.

It offers a 20x programmer productivity increase over traditional server programming languages like ASP, PHP, and JSP by automating state management and taking control of the application's look and feel.

From high-level source code with a simple, C-like syntax, the compiler generates complete, ready-to-run implementations in PHP or mod_perl. Applications generated by Eleven maintain their state in a relational database and are inherently fault-tolerant, secure, and scalable.

Most interactive web applications today are primitive. Of course there are shining exceptions such as Amazon.com, TurboTax, and others. But by and large, most web applications are crudely designed and not especially reliable. Have you ever entered data into a web application, then lost it due to a browser crash? Have you ever gotten part way through an e-commerce transaction, then had the session go into never-never land while waiting for your credit card to be validated? Have you ever reloaded a web page and found that you just duplicated a transaction by accident? Web applications are server based, so in theory they ought to be as reliable as traditional mainframe applications. But they aren't.

The problem is that there are two ways of creating web applications. There's the expensive way, in which massive amounts of engineering are dedicated to making the sites reliable and scalable. These applications tend to keep most of their state in server-side databases, which run in controlled environments and are carefully managed. If your browser crashes during a session, you can usually log in from another computer and pick up where you left off.

Then there's the cheap way (often seen in corporate intranets and extranets). These tend to keep their state on the client (in hidden form fields or HTTP cookies), in the web server's memory, or in the web server's filesystem. These applications tend to be fragile. They don't handle system failures well, and get confused easily if the user presses the back button, restarts the web browser, etc.

The Eleven project solves this problem by making it quick and easy to create robust, scalable, database-backed web applications. Applications are expressed in a high-level language with a syntax similar to C and a conceptual structure similar to BASIC. Here is a simple example.

The code is self-explanatory:

statesafe var first, last;

display
{
print ("Please enter your name.");
edit ("First name: ", first);
edit ("Last name: ", last);
}

display
{
print ("Thank you, ", first, " ", last, ".");
}

Here is another example; the world's smallest to-do list application. Where the code invokes the edit function on the table data type, the compiler automatically fills in a table editor:

statesafe table
{
var deadline "Task deadline";
var description "Task description";
} todolist;

display
{
edit ("Enter your tasks: ", todolist);
}

The point is that the Eleven compiler takes over the job of state management. The programmer doesn't need to worry about how the variables first and last are passed from one display to the next, how to represent the to-do list in the relational database, how to deal with the back button, how to enable a session to be seamlessly resumed if the computer crashes, and so on. All of those problems are taken care of automatically.

What's more, those benefits are achieved without any special runtime support. The Eleven compiler translates source code into complete PHP or mod_perl programs that run under the Apache web server. The only runtime support needed is a standard installation of Apache with PHP or mod_perl, and a relational database such as MySQL for the back end. Furthermore, the generated code is fairly readable, and can be inspected before uploading to the web site. This is a great benefit for security-minded system administrators who are wary of installing yet another "framework" onto their production machines.

All applications generated by Eleven automatically save their state to the relational database after every user action. The web browser and web servers are stateless. Thus, the applications have three important characteristics:

1. They are bulletproof, meaning that the applications are resilient to failures of any runtime component. Sessions cannot be derailed by browser crashes, web server crashes, bookmarking or tampering with URLs, etc. as long as the integrity of the relational database is maintained.

2. They are secure, meaning that all application data is safely kept private. It is stored in the database, never in hidden form fields or HTTP cookies where it is vulnerable. Consider the example of a web application that is being used from a laptop. If the laptop is stolen, then any private data stored in HTTP cookies is compromised. This is an important factor in medical applications, for example.

3. They are scalable, meaning that system performance can be increased by replicating the application across a load-balancing server farm. HTTP requests can be directed to random web servers even within a single user session, and the applications will still work reliably. The only performance bottleneck is the database, and there are existing commercial solutions for scaling databases.

We introduce the term statesafe to describe web applications that achieve these three benefits using this architecture. All web applications generated by the Eleven compiler are statesafe.

Eleven 1.0 search tags