Meet the Frameworks

JavaServer Faces

Sun Microsystems released the Java platform in 2000. It consisted of three components; a language, a runtime, and standard libraries.

The Java language was intended to be a replacement for the ubiquitous C++. The language was drastically simplified, eliminating many of C++'s more complex features and inconsistencies. Furthermore, every data type except a handful of built in primitives is a class, and no methods can be created outside of a class, leading some to jest that OO stands for Object Obsessed. Low level operations and casting were severely curtailed to enhance the language's safety. Like C++, Java is statically typed.

Java was originally intended to be interpreted. Instead of being compiled to native machine instructions, it was compiled to bytecode for the Java Virtual Machine. Many JVMs were created for different hardware and operating systems, but all of them ran the same bytecode, making Java trivially cross-platform. To improve performance, JVMs now perform just-in-time compiling.

Installations of a Java Runtime Environment include, in addition to a JVM, the standard libraries; a huge collection of utility classes available to every Java program. There are in fact three versions of the Java platform:

The language is the same in each case, but the standard libraries differ. This study examines the use of JEE's framework for web applications, JavaServer Faces.

Tapestry

Tapestry was the first attempt at simplifying JEE development. Howard Lewis Ship, working independently, wrote a new MVC framework based on pages and components. Previous versions of Tapestry used a lot of XML glue, but Tapestry 5, a complete rewrite, has dispensed with this nuisance.

Stripes

Stripes was born out of frustration with the sheer number of artifacts and configurations needed in existing frameworks. A "Hello World" page in a classic JEE framework requires a JSP page, a backing bean, an action bean, and a fairly incredible amount amount of XML configuration before anything will work.

An equivalent JSP in Stripes will generally display correctly without any further work. If an ActionBean is added in line with Stripe's conventions, it will be automatically wired up to the page without the need for any configuration. When conventions do not achieve the the desired result, all configuration can be performed with annotations in the bean code.

RIFE

The developers at Uwyn ("Use What You Need") like Java, but they do not like the way that everyone else applies Java to the web. Thus, they wrote their own open source framework, RIFE. RIFE runs on any Java application server, but does not use any standard Java web frameworks. Instead, they have some very interesting - and very unique - ideas of their own.

Wicket

Whatever the problem, Wicket's solution is a component. Wicket models a web site as a set of components, and all state is persisted as component state. Like many of the newer frameworks, XML is eschewed. Literal HTML is held in templates, everything else is done in Java.

ASP.NET

Microsoft perceived the exploding popularity of cross-platform Java as a threat to their proprietary Windows operating system. To combat this threat, they developed Visual J++; an implementation of Java with extensions to make Windows programming easier. Sun sued Microsoft for breaking the Java standard (which violated their license), and the eventual settlement barred any further development of J++.

Instead, Microsoft set to work on a new platform. The Java Runtime environment was replaced with the Common Language Runtime, a JIT compiler for Common Intermediate Language bytecode. From the start, Microsoft had intended multiple languages to target the CLR. (Although this is certainly possible for the JVM, it had not been Sun's intention.) Nevertheless, the lingua franca of .NET is Microsoft's C#. Although marketed by Microsoft as an evolution of C++, it is actually an evolution of Java; a litigation-free form of J++.

Microsoft do not differentiate between desktop and server versions of the runtime package, although ASP.NET, the web server component, will only be installed if IIS (Microsoft's web server) is present. (The ASP portion of ASP.NET indicates that it succeeds Active Server Pages, an older Microsoft technology.)

ASP.NET MVC

Another popular movement now threatens Microsoft's dominance; the use of dynamic languages, such as Ruby and Python, and the burgeoning popularity of associated frameworks, such as Ruby on Rails and Django.

Microsoft's response was the ASP.NET Extensions project, a suite of technologies intended to bring the high productivity of these frameworks to their .NET developers. Chief amongst these is ASP.NET MVC, a model-view-controller to replace the problematic Web Form lifecycle. (Problems with the standard implementation of ASP.NET are discussed later.)

PHP

Whereas Java and C# are object orientated and statically typed, PHP (originally Personal Homepage Processor) is a dynamically typed procedural language, to which OO features have been recently added. PHP was created to script web servers, and the standard library has rich support for this. PHP is much simpler than JSF or ASP.NET, and is cross-platform.

JSF and ASP.NET could be considered descendants of C++ CGI programming, whereas PHP continues the Perl legacy. PHP is maintained by The PHP Group.

Ruby on Rails

Ruby on Rails is a relative newcomer to web programming, and represents the new paradigm of coupling dynamic programming languages with REST architectures. Ruby is a dynamically typed language in which everything is treated as an object, much like Smalltalk or Javascript. Ruby's dynamic properties are extensively exploited by Rails, particularly in database persistence, where data access objects are created on the fly to match the schema.

The Rails framework aggressively promotes REST, but this study will investigate how well it performs outside of its comfort zone. Rails is maintained by 37signals.

Seaside

Alan Kay famously stated, "I invented the term Object-Oriented, and I can tell you I did not have C++ in mind." What, then, did he have in mind? Smalltalk, which he developed over various iterations from 1969 to 1980, when the modern Smalltalk-80 standard was published.

Seaside is very, very different. It is written in Smalltalk, a language rarely seen outside of educational establishments and research laboratories. (Seaside is actually written in Squeak, but it has been ported to many other Smalltalk dialects.) There are no HTML files. Instead, like Smalltalk itself, every part of the web application is a live object residing in the image. Components produce HTML programmatically.

The key feature of Seaside is its use of continuations. In almost every other web framework, the execution context which renders an HTML page dies after the response is sent to the browser. Upon receiving a request, particularly with component-based frameworks, the server may attempt to recreate the old execution. In contrast, Seaside saves the execution context as a continuation, which may live across many request-response cycles.

WASH

Haskell is a functional language, much loved by academics but rarely seen in practice. It is a language of few libraries and many papers.

WASH stands for Web Authoring System Haskell. Written by Peter Thiemann, it is formed of several modules:

The CGI module, used in this study, provides comprehensive support for web programming; a Haskell program calls the library functions to serve CGI requests.

Arc

Arc is the new kid on the Lisp block. Designed by Paul Graham, it has the modest goal of becoming the premier language for the next hundred years.

Arc is in an early development stage, and would not appear to be a suitable subject for a comparative study. However, the inventor has issued a challenge to do just that.

Commercial Usage

JEE, perhaps the first commercial framework, is still broadly perceived in the IT industry as the most enterprise grade framework; something which should be used for global financial systems and multinational conglomerates. JSF and Tapestry are both common implementation of JEE, although there are many others not investigated here, and custom code using JSP as the presentation layer is still common.

Coming later, ASP.NET has firmly entrenched itself amongst small and medium sized businesses, although it is edging up into larger enterprises, and taking market share from JEE in all sectors.

Even older than JEE, the free and open source PHP is wildly popular amongst hobbyists, and utilised extensively by smaller organisations. Ruby on Rails, also free and open source, is mostly used by hobbyists, although there is growing interest from small business. The remaining frameworks are rarely seen in actual use.

Framework Versions Used in this Study