Workzen MVC is a "universal" model-view-controller architecture that can be used to build any type of application, with any type of interface.
The model-view-controller pattern has been in use since Smalltalk. Swing uses it to solve an interface problem, (updating the widget's view when the widget's model changes) and Struts uses it to solve an application level problem (seperating business logic from presentation).
Swing applications continue to suffer from "mixing" the model and the view on an application level. The "inner class" is used to perform actions on the business tier, while providing access to the view components. This is convenient, but leads to code that is difficult to read and maintain.
Struts is a web based MVC, and as such, has tight bindings to the Servlet API. This makes it difficult to use in other types of applications. Struts actions cannot be used directly by Swing applications.
Different application design approaches are employed depending upon the application "interface". Swing apps are developed differently than Web apps, which are different from CLI apps (command-line interface), which are different from Mobile applications. Each interface requires a unique development approach, a different IDE, a different skill set.
The solution is to enforce a "strict" seperation of the view from the model. Each view is formalized into a base class, with a common interface component model that can be shared between all interfaces.
The benefits of a common view model:
The Workzen MVC framework uses an "application" level controller. Events are triggered, actions are performed, and views are displayed. Views and Events are defined in xml, and loaded at runtime.
Input validation can also be handled by the framework.
See how it works.
Struts is the reference implementation for application level model-view-controllers. Workzen MVC uses a front-controller the same way Struts does. All views, actions and validators are defined via an xml configuration file.
Struts encourages the use of Tag libraries in the JSP view, while Workzen encourages widget use.
The example application is a simple "User Administration" tool. It provides a command-line interface, a Swing interface, and a Web interface. The only difference between each application type are the individual view classes. See the example configuration.
Applications are being deployed on an increasing number of hardware platforms. Data access points are increasing. We have needs to access data from wireless, voice, web, workstation, and terminal. This framework can help bridge the gap between these environments.
Workzen Mvc is an Open Source GPL project.
Send code, comments and suggestions to workzen.us
Workzen at Sourceforge