OpenSubsystems

Business Components for Java Applications

Subsystems

Open Patterns

Documentation
Download
Last modified

$Author: bastafidli $
$Date: 2007/03/24 08:35:37 $
$Revision: 1.12 $
$RCSfile: index.html,v $

Open Patterns

Open Patterns is repository of common application functionality patterns allowing subsystems and applications provide often required but difficult to implement features with a minimal effort. Included functionality patterns usually cover all application tiers providing reusable persistence implementation, business logic and user interface design elements. Open Patterns includes for example list data pattern allowing to access large amount of data in relational database in small chunks; pattern to manage relations between generic data objects; pattern to manage order of the data in the relational database and using the user interface; background task invocation and execution pattern; advanced web user interface pattern providing elements such as scrollable table mimicking full-featured desktop alternatives, tabbed dialog controls, dialog layout management and advanced dialog controls. See full list of features for more details.

Why to use it

The goal of Open Patterns is to expand the foundation created by Open Core and further increase development speed and quality of developed applications by providing reusable blocks of high level functionality.

  • Open Patterns uses the features provided by Open Core and implements using it higher level building blocks to develop and enhance subsystems and applications. This functionality is more than just a reusable library or collection of Java functions or objects to use in your code. Rather than anonymous chunks of code, Open Patterns provides functionality that is usually directly identifiable by user in an application user interface or behavior
  • Most patterns included in Open Pattern span all application tiers. For example list data pattern provides persistence tier classes such us database schema classes to generate queries to retrieve data from the database page by page and database factory classes to execute the generated queries and fetch the data. For business logic tier it provides fully functional controller allowing to access previous, next or specific page with your data or change page definition settings. For user interface tier this patterns provides reusable servlet that processes requests from an user interface and loads and displays the desired set of data. This pattern also provides JSP page elements to easily generate controls that allow user navigate the data.
  • Each pattern is easily extendable to enhance or modify its functionality by simply deriving new Java class or specifying different JSP pages to use.
  • All common application functionality patterns provided by Open Patterns are guaranteed to work on all databases, J2EE applications servers, platforms, operating systems and browsers supported by Open Core.
  • Open Patterns is very easy to learn and use and requires only knowledge of Java, JDBC, Servlets and JSP.

Who is it for

Open Patterns is tool for Java developers to implement more complex functionality in their own subsystems or applications easier and faster. When developing custom applications, developers decide, which pattern from Open Patterns repository their applications would benefit from or decrease their development time. Then the developers integrate the selected patterns into their subsystem or applications by modifying all the required tiers.

When to use it

Developers should consider using Open Patterns whenever they have need for specific functionality provided as a reusable pattern by Open Patterns. They should consider using the provided patterns even if their own needs are slightly different than the functionality provided by Open Patterns, since each pattern is designed and implemented to be easily extendable or modifiable to fit the developers' exact needs.

Open Patterns guarantees to correctly work in all environments (databases, J2EE application servers, browsers, etc.) supported by Open Core and therefore developers should consider using the provided patterns if they need to ensure that the desired functionality will work consistently in all required environments without the need for tedious testing and verification.

How to use it

Open Patterns requires Open Core subsystem. You can either use the binary Open Core libraries bundled with Open Patterns or you can download the full Open Core distribution package yourself.

Open Patterns is an infrastructure component used to develop Java applications and subsystems. You will need to download the binary distribution package patterns-bin-xxx.zip to take full advantage of its functionality. Include all jar files found in the lib folder on your classpath. You will be able to immediately use all classes documented in the JavaDoc API. The API can be found in the docs folder. You may also need libraries from the external\runtime folder on your classpath once you run your application. To speed up your development and configuration you may want to use some of the files included in the sources folder.

The supplied demonstration packages allow you to see the various UI elements of provided patterns as well as UI template layouts included with Open Patterns.

The demonstration distribution package patterns-app-xxx.zip contains ready-to-deploy web application in WAR or EAR format (patterns-app.war or patterns-app.ear) in the webapps folder. You can just copy one of these files to the deployment folder of your server or use the management application supplied with your server to deploy the demonstration application. If you encounter error related to missing classes or class cast issues when deploying the war package and you are using servlet container rather than full J2EE server you may need to include files jts.jar and jta.jar found in the external folder into folder on your server designated for shared libraries. In Tomcat this is \common\lib folder and in Jetty \ext folder is suitable for this purpose.

Alternatively you can use patterns.war from the lib folder of the binary distribution package patterns-bin-xxx.zip or demonstration distribution package patterns-app-xxx.zip to see examples of the Open Patterns web ui elements. You will also have to copy all libraries from the external/runtime folder to a location, where your server will find them by default and make them available to installed web applications.

Once deployed, you can access the tests using one of these URLs depending on the server you use, for example