When mainstream computer applications moved to client-server architectures, programmers started to look for ways to simplify the development of projects that used similar technologies and were similar in structure. Thus, the foundations for modern software frameworks were laid.
As development for Web-based application servers and their applications expanded, so did the frameworks that supported these technologies. Currently, there are many software frameworks in the enterprise development space especially for the Java J2EE platform.
In this article, I will concentrate on modern Java development frameworks, discuss their features, and the advantages of using them. Also, I will compare several production quality frameworks, such as Struts, Spring, and Hibernate and go over basic similarities and underlying concepts.
I will briefly examine enterprise development environments or toolkits that were developed to support these frameworks, such as Borland JBuilder, Eclipse, and BEA Workbench. Keep in mind that there are books written on each of the frameworks, and it is impossible to describe in depth all aspects or features of them in any article space. However, I will try to discuss the most widely used concepts.
Almost all modern Web-development frameworks follow the Model-View-Controller (MVC) design. Business logic and presentation are separated and a controller of logic flow coordinates requests from clients and actions taken on the server. This approach has become the de facto of Web development. The underlying mechanics of each framework are of course different, but the APIs that developers use to design and implement their Eeb applications are very similar. The difference also lies in the extensions that each framework provides, such as tag libraries, Java Server Faces, or Java Bean wrappers.
All frameworks use different techniques to coordinate the navigation within the Web application, such as the XML configuration file, java property files, or custom properties. All frameworks also differ in the way the controller module is implemented. For instance, EJBs may instantiate classes needed in each request, or Java reflection can be used to dynamically invoke an appropriate action classes. Also, frameworks may differ conceptually. For example, one framework may define the user request and response (and error) scenario, and another may only define a complete flow from one request to multiple responses and subsequent requests.
Java frameworks are similar in the way they structure data flow. After request, some action takes place on the application server, and some data populated objects are always sent to the JSP layer with the response. Data is then extracted from those objects, which could be simple classes with setter and getter methods, java beans, value objects, or some collection objects. Modern Java frameworks also simplify a developer's tasks by providing automatic Session tracking with easy APIs, database connection pools, and even database call wrappers. Some frameworks either provide hooks into other J2EE technologies, such as JMS (Java Messaging Service) or JMX, or have these technologies integrated. Server data persistence and logging also could be part of a framework.
Enterprise Development Environments
Some frameworks became very popular within the Web developer community and enterprise development space. As these frameworks matured into stable releases, commercial IDE (integrated development environment) toolmakers started to build support for them into their products. Some even went as far as to develop whole products based on the concepts of the framework. For example, BEA WebLogic Workshop is build around the Struts framework.
Borland JBuilder has built-in support for Struts and features JSF and JSTL support as well.
The Eclipse platform became a very popular development tool, partly because of its plug-in base and partly because of its Web framework support. Numerous plug-ins to Eclipse or even entire distributions of Eclipse-based IDEs appeared. Many of the plug-ins were designed for Struts framework development, such as MyEclipse (www.myeclipse.org) or M7 (www.m7.com).
Most of the IDEs feature graphical flow and visual object (or class stub) development environments. For example, here is a JBuilder's Action designer that maps out page sequences of the Web application.
WebLogic Workshop introduced Java Page Flows, which extend the Struts framework to provide a simplified development model with numerous additional features. Workshop uses Page Flows that make it easy to separate the user interface from the navigation and business logic. A page flow consists of JSP pages that contain the user interface elements and a controller (JPF) file that contains instructions on how data provided by a user is processed and what page will be returned to the user next. A page flow provides a visual overview of the Web application that enables developers to see how the various JSP pages relate to each other and allows quick building of the overall architecture of the Web application.
MyEclipse provides similar features with a much more attractive price tag.