This document provides the current vision for the first release of the OpenCms-Struts project.
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.
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.
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.
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!
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.
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
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.
All code generated by this project will be released under the LGPL (GNU Library or Lesser General Public License).
Installation of OpenCms-Struts will be identical to the OpenCms v5 installation.
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.
"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.
"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.
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.
"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.
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.
Struts applications will integrate with the import/export of OpenCms modules.
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.
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.
OpenCms-Struts will use the HTML setup wizard to install itself, providing an identical installation to OpenCms v5.