Methodology

Web Applications

There are two distinct types of web application:

REST
Many applications are little more than a customised database front end. Users enter data, edit data, and extract data through reports. Whilst these applications can certainly be developed along general guidelines (see the following type), a relatively new application architecture is taking the web development world by storm. Application frameworks such as Ruby on Rails stress Representational State Transfer, typically abbreviated to REST, an the application architecture. A full description of REST can be found in the original paper by Roy Fielding. Each application resource (typically a database row or business object) is represented by a URL, e.g. www.example.com/people/3761. This resource is acted upon by the HTTP verbs; GET will retrieve the data, POST will update some attributes, DELETE will remove it, and PUT (e.g. to www.example.com/people/new) will create a new resource.
Stateful Web
Unfortunately, not all applications fall into this category. Some web sites follow a more traditional work flow, and must maintain state between requests. There are many different ways of achieving this, and the industry has not settled on any one as better than the others.

If an application can be RESTfully architectured, this is an ideal solution. There is no state to maintain, and HTTP provides a perfect interface. Furthermore, REST is cache and web farm friendly (although scalability issues are not part of this study). REST URLs are also clean - they clearly say what they mean. Bookmarking, back buttons and forking are no problem for a RESTful site. As this is a problem which has been adequately solved, it will not be considered further.

The Test

For the purposes of this study, a very simple application will be developed in a variety of frameworks:

  1. In the first screen, the web site will ask the user for their forename, and whether they want to give their surname.
  2. If the answer is positive, a second page will ask for their surname.
  3. Finally, the friendly application will greet the user by name.

Each page (except the first) will have a means of navigating back to the previous page.

For basic security, the user cannot cause markup or script to be executed in any page.

Although this application is trivial, it has two of the critical elements which confound web application developers:

Cheating

There are a variety of ways in which we could "cheat", relying on the application's simplicity to take shortcuts. As an extreme example, we could put all the variables into the query string, e.g. simpleapp?first=John&last=Smith. In order to make a sensible comparison, we will use each framework as intended, and treat the application as if it was of moderate complexity.

What are we Looking for?

The application should be quick and easy to develop. Ideally, the back button, tab/window duplication and bookmarks will work in an intuitive fashion. Generic error pages or timeouts are unacceptable.

What are we not Looking for?

What Else Should We be Looking for?