Revisions

Date Revision Description Author
1/19/2003 0.9 First Draft Kenneth Lewelling
1/20/2003 0.91 Added definition for OpenCms VFS and added "action" resource management through VFS Feature. Kenneth Lewelling
2/13/2003 0.92 Removed the Struts Administrative view, integrating with the OpenCms Module Administrative view. Edited features related to this change, specificly 5.1, 5.4, and 5.8. Removed 5.7. Kenneth Lewelling
4/4/2003 0.93 Converted document to xml for use with Maven. Kenneth Lewelling

1 Introduction

This document provides the current vision for the first release of the OpenCms-Struts project.

1.1 Purpose of the Vision Document

The purpose of this document is to collect, analyze, and define high-level needs and features for OpenCms-Struts. It focuses on the capabilities needed by the sta keholders, and the target users, and why these needs exist. The details of how OpenCms-Struts fulfils these needs are detailed in the Software Requirements Specification.

1.2 Product Overview

OpenCms-Struts is a project to integrate OpenCms with Struts . The primary goal is to bring a proven "Model 2" application framework with well-understood patterns to OpenCms. This project will use OpenCms as a presentation (view) layer for Struts applications, which accomplishes the second goal of bringing content management features to Struts projects.

1.4 Definitions, Acronyms and Abbreviations

  • OpenCms - OpenCms is a database driven Content Management System developed under the LGPL license. OpenCms provides a custom XML template based framework for building web applications as well as support for the Model 1 MVC pattern based around Java Server Pages.
  • Jakarta Struts - Struts is an opensouce framework for building web applications using standard technologies such as Java Servlets, JavaBeans, ResourceBundles, and Extensible Markup Language (XML). Struts is a foundation for building web applications based on the Model 2 architectural pattern.
  • LGPL License - Opensource license that allows proprietary applications to link to LGPL libraries or applications without restrictions, however modifications to the library or application itself must be made available to the public.
  • Java Server Pages (JSP) - A JSP page is a document containing fixed template text like HTML, plus special markup for including other text or executing embedded logic like java code.
  • Java Servlets - Java Servlet is a Java class and each servlet class produces dynamic content in response to service requests to one or more URLs.
  • Model-View-Controller (MVC) - MVC is an architectural pattern that divides an interactive application into three components. The model, which contains the data and business logic, the view, which formats and displays information from the model, and the controller, which handles user input and synchronizing the view with the model based on user input.
  • Model 1 - Model 1 is an adaptation of the MVC for web applications. Model 1 uses JSP to represent the view and the controller, which then access JavaBeans that represent the Model. One result of the Model 1 architecture is that control is decentralized as a JSP can control the flow of the application.
  • Model 2 - Model 2 introduces a controller servlet between the JSP page and the model, so the view and controller are separate. The controller centralizes the logic of the application as well as the flow by having a single master controller. Model 2 is the preferred method for building interactive web applications.
  • OpenCms custom XML framework - OpenCms has a native architectural framework that combines the Model 1 and Model 2 architectures. The view is created using XML pages, built on top of a template class. Template classes can be used as is, or extended to add functionality. Template class's separate code that would end up in the JSPs using the Model 1 approach, however control is not centralized as in Model 2.
  • Struts Action - Struts provides a class called Action that applications extend to provide controller functionality. A JSP page (the view) will forward to a specific user extended Action that performs an action on the user input.
  • Presentation Layer - A.K.A the view in the MVC architecture.
  • OpenCms VFS - VFS stands for Virtual File System and is a file system contained in a database. The VFS is where all OpenCms resources are contained.

2 Positioning

2.1 Problem Statements

The OpenCms custom XML framework for creating applications is not a standard and has a learning curve, which affects OpenCms developers creating web applications. The result is increased application development time is spent learning the XML framework which is not transferable to other frameworks. Integrating Struts into OpenCms would provide a well-understood approach to web development incorporating the most popular framework used today.

Struts doesn't have any content management features. While it is out of scope for the Struts framework, most Struts applications could benefit significantly from content management for administration purposes. Lack of content management affects web developers, as the html and JSP must be manually deployed to the servlet container taking up a lot of time. OpenCms-Struts would reduce the administrati ve, maintenance, and development time of Struts presentation layer.

2.2 Business Opportunity

Currently OpenCms has a custom XML framework that is not a standard technology and as a result has a learning curve that cannot be used in different environments. Development is hard work and the more fluid technologies and ideas between different projects the more work can be accomplished in less time. OpenCms is moving towards more standard technologies by adding support for JSP. While JSP is well understood the "Model 1" (mixing the controller and presentation) approach that JSP uses is limiting. What Struts brings to the table is a proven "Model 2" framework with well-understood patterns. Struts provides the control layer from the MVC architecture pattern. Struts does not define the presentation (view) layer or the model layer, therefore it doesn't have any content management features to allow dynamic and easy changes to the presentation. This project will use OpenCms as a presentation (view) layer, which will also bring content management features to Struts projects!

3 User Descriptions

3.1 User Profiles

The following is a list of all OpenCms-Struts roles and their descriptions

Web Developer: An individual familiar with web site presentation development. Web developers create HTML/XML/JSP for a Struts application optionally using Struts and OpenCms taglibs. This role will also maintain web content for the application as well as any presentation maintenance. With the exception of OpenCms components, this role can be performed outside of OpenCms and manually import their work at a later date.

Struts Developer: An individual who is familiar with the Struts environment and develops the applications "backend" and ties it to the presentation using Struts Actions. This role can also be performed outside of OpenCms, with the exception of OpenCms components, and imported at a later date. The Struts developer can use its own programmatic security model or defer security to the OpenCms-Struts administrator to use OpenCms's declarative security. Struts developers also configure the struts.xml file for their application.

Struts Administrator: Responsible for the declarative security of Struts resources as well as configuring the OpenCms environment for Struts applications.

3.2 User Environment

This project is about combining two user environments, a web application framework and a web application content management system. The combined environment is designed to be as flexible as possible, allowing Struts applications to be ported into OpenCms, and Struts application build in OpenCms to be ported outside of OpenCms. TODO: add more content here

3.3 Key User Needs

  • Interoperability between OpenCms and Struts
  • Content management for Struts application
  • Declarative security for Struts applications
  • Industry standard application framework for OpenCms.

4 Product Overview

4.1 Product Perspective

OpenCms-Struts provide interoperability between the Struts framework and the OpenCms content management system. Strictly speaking OpenCms-Struts adds features to OpenCms that allow it to host Struts applications. A consequence of this integration is content management features for Struts applications at no additional cost, i.e. no additional programming is required for Struts applications to gain declarative security, increased maintainability, and increased productivity.

4.2 Summary of Capabilities

Customer Benefit Supporting Features
Update a Struts application's content via browser. Content management for Struts applications via OpenCms.
Lower learning curve for creating web applications in OpenCms. Industry standard Struts integrated into OpenCms.
On-the-fly struts.xml configuration. Dynamic reloading of Struts configuration files.
Optional declarative security for Struts resources. Struts integration into OpenCms's declarative security model.
Easy to export/import applications within OpenCms that use Struts. Struts application integration with import/export function in OpenCms
Add content management features with legacy Struts applications. Struts applications can be manually (for now) imported into OpenCms, with minimal tweaking of relative paths.

4.3 Licensing

All code generated by this project will be released under the LGPL (GNU Library or Lesser General Public License).

4.4 Installation

Installation of OpenCms-Struts will be identical to the OpenCms v5 installation.

5 Product Features

5.1 Integration into the Module Administrative View

The Module Administrative View will identify which modules supports Struts with a Struts status label. New modules will have an option for supporting Struts in the Create Module page, while Support for Struts can be modified through the "Administer" context menu.

5.2 Declarative security for Struts Actions.

"action forwards" are relative URL's that are configured in the struts.xml. They act as entry points to the Struts Actions. A new resource called "action" will be added to OpenCms and will appear in the OpenCms workplace. These "action" resources will be a placeholder for "action forwards" declared in the Struts XML configuration file. "action" resources will not be editable but will allow declarative security just like any other OpenCms resource in the workplace.

5.3 Action resource management through the VFS

"action" resources can be added/removed from the OpenCms VFS assuming a user has sufficent rights. Required information will be gathered in the resource wizard such as the OpenCms Module that contains the Struts application the "action" belonged to, the Action class to forward to, etc. "action" resources added or removed through the VFS will be reflected in the appropriate Struts configuration file and result in the Struts configuration files being reparsed.

5.4 Direct editing of Struts XML configuration file.

Direct editing of Struts XML configuration file in the appropriate modules directory in the VFS will be allowed based on owner and group permissions. In future versions a GUI configuration tool will be added to the Module Adminstrative view to ease Struts configuration.

5.5 Action resource management through Struts XML configuration file.

"action" resources can be managed in the Struts configuration file in the struts directory in the appropriate module directory in the VFS. The Struts configuration file for an application will be parsed each time it is edited and "action" resources will be added to the workplace based on the contents of the parsed XML configuration file.

5.6 Content management features for native Struts applications.

Struts applications can be manually imported into OpenCms to allow content management of their resources. In future revisions an automatic Struts application import feature will be added to Module administrative view.

5.8 Import/Export of OpenCms modules with Struts applications.

Struts applications will integrate with the import/export of OpenCms modules.

5.9 Struts application framework integration with OpenCms.

Native OpenCms application can make use of the Struts framework to quickly build web applications, or extend current ones. OpenCms applications will still be able to use the native XML framework and Struts thus allowing current OpenCms applications to take advantage of Struts without having to rewrite any existing code.

5.10 Support for multiple Struts applications.

Multiple modules can support Struts by using the Struts 1.1 concept of sub applications. Sub applications are completely separate Struts applications, with their own configuration files, that were introduced to ease Struts use with larger development teams.

5.11 Easy installation

OpenCms-Struts will use the HTML setup wizard to install itself, providing an identical installation to OpenCms v5.