What is Frame2?

Frame2 is a second-generation implementation of the JSP Model 2 web application architecture.
It builds on the prior art of frameworks such as Struts, WebMacro and Virtuas Solutions' TurboM2 Framework to present a highly configurable and modularized tool that supports the development of both web applications and web services using J2EE.
Frame2 users (that is, developers who build web applications and services) will use the Frame2 framework to integrate business assets with web-based user interfaces.
With Frame2, business assets may be used as-is, with no modification. The user interface components (JSPs, HTML, images, etc.) are bundled with the framework, configuration information, and user extensions for deployment in the J2EE servlet container.

The Frame2 Development Model

Frame2 presents a standard layered/n-tier model for development. Each layer contains code and configuration data specific to its purpose. These layers are intended to keep application and service development simple, reliable and sustainable.
The layers in the Frame2 model are as follows:

For web services, the layering corresponds to a similar model. The presentation layer is replaced with programmatic clients, which are often outside the realm of the service developer. Additionally application-level behaviors are simplified in comparison to web applications, often reduced to pass-through to the underlying business service.

Interposing an application controller between the client and application logic offers numerous advantages. Foremost is simplifying the work to develop web applications that have non-trivial navigation and processing rules. Complicated and rote programming tasks for managing the navigation rules, converting data from the HTTP requests, and data validation can be avoided through automation and configuration. Security measures can also be made uniform.

Configurability

Model 2 controllers intrinsically manage navigation concerns.
Frame2 provides a rich set of configuration features that combine easily with user-provided application logic. Through the configuration, users can define mappings between the client requests and the application components that process those requests, and between the outcomes of the processing to the views.
Within these configuration elements specification can be given to how to handle invalid inputs, cancellation requests, and errors generated by the application code of the framework itself.
In support of co-hosting both web applications and web services in the same deployment, the configuration information can be segregated between the HTTP and the XML processing streams.

Web Application Support

Frame2 provides a number of features for web application support.
At the server presentation layer it provides custom tags that extend the JSTL expression language to standard HTML tags as well as allowing internationalization without the need for learning or understanding new tag attributes.
At the controller layer, Frame2 gives a simplified programming model for creating and structuring application data and logic. Frame2 automatically populates JavaBeans with data from the HTTP request, validates the data, and then provide the data to the appropriate handlers for execution of the application logic.
To complement these features Frame2 interoperates with the J2EE security model to allow configurable role-based security for all requests made through the framework.

Web Service Support

Frame2 can be used with any JAX-RPC SOAP front-end (for example, Apache Axis or the Sun's JWSDP).
The web service features give the user broad latitude in how the SOAP request body is structured as well as how the response is generated.
Bodies may be processed as single or batch requests, with unmarshalling into JavaBeans automatically taken care of through JAXB technologies. Frame2 interoperates with JAXB to allow XML schema definitions to be automatically converted and validated as JavaBeans.
With a defined schema, developers can code application and business services without having to understand XML or SOAP; the code to the JavaBean representations of the SOAP bodies and Frame2 with JAXB manages conversion.

Simple API

Frame2 abstracts the transport and protocol layers to minimize the difficulty with learning and using complex technologies such as J2EE and SOAP.
Most development can be done in the application layer by reading and setting bean properties and exercising business services. The simple API in combination with the flexible configuration helps maintain good separation between the model, view and controller components.

Struts Differences

There are numerous feature-based comparisons to be made with Struts, the most popular open-source framework for building J2EE web applications.
From a framework design point of view, there are several key differences: The differences are all intended to simplify developing a web application by creating a simple but flexible API.