Homepage and Weblog of Fleur Jeanquartier

Short history of Java Web Frameworks

-See Java_logo.svg on Wikipedia-Java itself has a very long history – Java Web frameworks has some kind of evolved the last 10 years too. Therefore I would like to give you a short summary from my point of view, how some things in developing Java Web applications with Java have changed during the last years:

The first release of the J2EE provided only Java Servlet, which was a small, primitive framework to build web applications. Presentation markups was totally interlocked into Java code and therefore was very confusing, if you was no expert in Java.The later following JSP was an advancement insofar as web developers had the possibility to directly embed dynamic (JSP) elements/tags into HTML-pages. These elements are backed with Java obejcts so that JSP is then converted into Java Servlet and executed within a Servlet container. So, JSP lays on the top of Java Servlet or respectively builds upon it.

Though JSP offered the possibility of automatically creating servlets from embedded tags, it was not best fitting for not writing confusing (Java) code, because there was no separation between presentation- and logic-layer. There was still much Java-snippets in between the HTML-source of web pages (as also often seen in PHP, where php-code and html is tangled up).

Example of a Java Webapplication Architecture

To cleanly separate between presentation and business logic, the MVC architectural/design pattern was introduced to Java Web development:

In complex computer applications that present a large amount of data to the user, a developer often wishes to separate data (model) and user interface (view) concerns

The model could be implemented in Java, such as a “master” servlet represents the controller. The controller servlet handles all web requests, including form posts etc. The servlet provides the business logic, and then depending on the outcome, retrieves the necessary model object and provides the appropriate output such as forwarding to a specific JSP page.

This MVC pattern can be enhanced by not only being action-oriented but also component-based. Cotnrary to actions, components can be readily reused and no UI-module has to be separatly re-implemented over and over again anymore.

Web developers can use this (newer) level of abstraction for builduing new components and implement newer UI features such as AJAX.

The current (new) standard and most popular component-based web framework in Java is JavaServer Faces (JSF).

However, standards in its compatness won’t last long, so there are newer web framework projects for Java, that make use of JSF but enhance it, such as Apache’s Shale and Jboss’ Seam.

In my humble point of view, by looking at all the possibilites and endeauvours of enhancing this existing Java Web Framework, JSF will definitely play an important role in future too!

However, do not forget Ruby (on Rails) next to and also within the Java world! – There is no obvious next/future language. Let me state “JRuby” (Ruby within the Java world) as example for the idea of running other languages on the Java Virtual Machine.

See also a short summary / list of dates and releases of the Java Enterprise Edition, providing also specifications Web Frameworks in Java:

1999: Java Enterprise Edititon released in Version J2EE 1.2
including specifications for EJB (in v1.1), JSP (in v1.1), JDBC (in v2.0) etc.
2003: Java Enterprise Edititon released in Version J2EE 1.4
including specifications for Web Services for J2EE (in v1.0)
2006: Java Enterprise Edititon released in Version Java EE 5
including specifications for EJB (in v3.0), JSP (in v2.1), JDBC (in v3.0), JSF (in v1.2), etc.

Last but not least a short list of prominent Java Web Frameworks:

  • Echo
  • Grails
  • JSF/MyFaces
  • Struts
  • Spring MVC
  • Tapestry
  • Velocity
  • WebWork
  • Wicket
  • div. commercial libraries & frameworks
  • etc.

Further Readings:

Leave a Reply