Wednesday, October 7, 2009

Struts2 course chapter 1: Evolution of web applications

This is the first of a series of slides trying of spread the word about Struts2, a powerful, easy to use, but still unknown MVC framework for most the Java developers.

You should already know that Struts is the most popular framework for developing Java web applications. However, with the years, this framework has became short of features to meet the emerging paradigms of computer programming such as dependency injection, aspect oriented programming, REST, etc. Struts2 include these features and more, but some training is necessary. Thus, in the following weeks I will try to synthesize the most important aspects of this framework.

I must say that Struts 2 is not only a new version of the popular Struts framework but it is a brand-new, state-of-the-art web application framework. In includes the following advantages:

* Is based on Java and therefore you can use your former Java talent pool
* Is uses the convention over configuration paradigm
* Is uses dependency injection (DI)
* It uses aspect oriented programming (AOP)
* Easy testability
* Easy extensibility (plug-ins)
* Portal support
* AJAX support
* Intelligent defaults
* Among others.

One of the best things about Struts2 is that you do not need to be an expert of the last paradigms of computer programming such as DI or AOP and take advantage of them. Struts2 includes them inside the framework.

In summary, Struts 2 isn't just a new release of the older Struts 1 framework. It is a completely re-engineering new framework, based on the OpenSymphony WebWork framework.

In this chapter I will explain about the evolution of the MVC framework and its different implementations and comparing them:

* Life without MVC
* Using the mediator pattern
* MVC model 1
* MVC model 2
* Struts1 implementation of MVC2
* Struts2 implementation of MVC2

Download the ready to use eclipse projects

Struts2 course chapter 2: Installation and configuration

In this chapter I will explain how to install and configure Struts2. In fact, Installing and configuring Struts is pretty strightforward. As of the version 2.6.x of Struts2 just download the binary files from and drop in the classpath of the server or the one of the web application. See the details in the slide below:

Download the ready to use eclipse projects