Building an Enterprise-Ready Web Application with Struts
June 23, 2005
This article will demonstrate how to build a (mostly) enterprise-ready web application (webapp) using the Struts framework and a few readily available tools. To demonstrate the techniques used, it will give you a whirlwind tour through a functioning, Struts-based webapp. You can view the live demo of the webapp here, or you can download the complete source here.
It is a simple recipe-viewing tool. The user can search for recipes by name, and if a match is found, it is displayed in read-only fashion. Unlike a lot of sample webapps, this webapp was built to follow best practices closely; in places where it deviates from best practices, it does so for a reason and that reason is well documented. The goal of the webapp is to provide a functional webapp you could use as a basis of comparison for production systems. One notable place this example deviates from best practices is the data tier: it uses a hard-wired set of two recipes instead of a persistent data tier, but a later article in this series will deal with using Hibernate and a relational database to provide a persistent data tier. Other articles deal with using the Tiles templating system to create a consistent look and feel for your webapp, and integrating with the popular Spring Framework to provide Inversion of Control.