Business Components for Java Applications

Open Patterns


Last modified

$Author: bastafidli $
$Date: 2007/03/16 04:04:00 $
$Revision: 1.7 $
$RCSfile: features.html,v $

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.

Data access and management

List data pattern

  • This pattern, also known as paged data access pattern, allows accessing large amount of data in relational database in small chunks. It allows retrieving data page by page or directly accessing a specified page. Page represents several data items retrieved and displayed together. The page size is user and system configurable.
  • If for example your application manages large amount of items to sell, this pattern allows you to display to user 20 of them at a time and then let user browse the rest of the items either page by page or jump directly to a certain page. All of this without extensive coding on your part.
  • The pattern allows to define what columns of your data object should be retrieved, so there is no need to return the entire record all the time. Retrieved columns may vary from request to request.
  • The pattern supports server side and client side sorting and filtering using configurable rules and conditions. It is easy to specify either in your code or in the user interface what data to display, how to display them and how should they be sorted.
  • Works efficiently on all supported databases and no SQL coding is required. All queries are provided out of the box.
  • Provides ready to use dynamic user interface for web based applications as well as asynchronous data loading for desktop applications. With minimal coding effort you can create web pages that display portion of your data together with navigation controls allowing user to access the rest of the data.
  • To make the implementation easier, this 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 pattern 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.
  • See how to use this pattern.
List data pattern

Mapped data pattern

  • Mapped data pattern allows creation, access and management of relations between data objects in a generic way. It allows maintaining multiple types of links between the same data elements and supports one to one, one to many and many to many relations. Additional data attributes may be associated with each link. Provided API lets your application efficiently retrieve related items.
  • If you are for example developing application to sell electronic equipment and you have two related items, such as flat screen TV and TV stand, you can easily create link between these two data objects. This allows your application show related items user might be interested in. You can associate type with each link to distinguish for example between items that complement each other or items that can replace each other. You can also attach certain amount of data to the link, such as percentage discount the user will receive if he buys the items together.
  • The patterns works efficiently on all supported databases with minimal coding effort required to integrate with existing subsystems. No SQL coding is required.
  • This pattern provides data object class representing the link between your data elements as well as fully functional database schema classes for all supported databases and database factory class to create, modify and access the data mappings. The business logic tier is supported by controller providing flexible methods allowing the rest of your application or subsystems to manage and access relations among your data objects.
  • See how to use this pattern.

Ordered data pattern

  • Ordered data pattern simplifies development of subsystems that have to manage order of their data objects either by automatically keeping the data object in certain order or by letting user define and change order of the data objects.
  • If your application lets user create for example wishlist of items he may want to purchase, the user may want to prioritize the list in an order, in which he would like to receive them. This pattern lets you easily create user interface that allows user to reorder the items as well as provide backend implementation that allows your application to easily recognize when an order has changed and persist the changed order.
  • The pattern defines simple data object interfaces for accessing and modifying the order. It provides sets of utility classes for comparison or ordered data objects as well as for detection when order of data objects has changed. The utility classes also simplify coding of web clients that need to propagate order of the data objects from the server to the client and vice versa. At last, the pattern provides set of custom JSP tags and JavaScript methods to speed up development of web user interface for ordering of data.
  • See how to use this pattern.

Web user interface

Scrollable table pattern

  • Scrollable table pattern is the easiest way how to add to the web pages HTML tables that can behave just like the desktop alternatives. The table has body that can scroll vertically and horizontally depending on the content size. The header and footer of the table are always visible and never scroll outside of the view. The header of the table is synchronized with the body and scrolls horizontally to reveal hidden columns whenever the body of the table is scrolled.
  • The pattern supports selection of table rows either using keyboard or mouse as user would normally do in desktop application or using check boxes as it is common in web pages. It also provides JavaScript notification when selection in the table changes or when user clicks on a link in the table row.
  • The pattern provides templating engine layout to easily create scrollable table that fills the entire page as well as it provides set of custom JSP tags that allow to create pages that contain one or more scrollable tables together with other content.
  • See how to use this pattern.
Scrollable table pattern

Tabbed dialog pattern

  • Tabbed dialog pattern is the simplest way how to enhance the web pages with tabbed dialogs. The HTML tabbed dialogs created using this pattern behave exactly like their desktop alternatives. Tabs allow presenting data and gather information split into multiple areas. Only one of these areas called tabs is visible at any given time.
  • The pattern provides set of custom JSP tags that represent the tabbed dialog, tab headers, individual tabs, hidden tabs that can be displayed programmatically, support for mnemonics for tab headers, JavaScript notification when tabs are switched or closed and more.
  • See how to use this pattern.
Tabbed dialog layout

Dialog layout pattern

  • Dialog layout pattern simplifies creation of web based dialogs by allowing to easily arrange controls aligned to single or multiple columns. Each control can have associated label with full support for mnemonics. The label also acts as a trigger to display context help associated with the control. Each control can be also accessed by a hotkey.
  • The custom JSP tags provided by this pattern simplify the coding of the web base dialogs by tying together various elements each controls consists of: control labels, control itself, context help, etc.
  • The pattern provides custom JSP tags for the common controls such as edit fields, text areas, checkboxes and lists as well as more advanced controls such as double selection list, dynamic list, etc.
  • See how to use this pattern.
Dialog layout pattern

Process execution

Background task pattern

  • Background task pattern simplifies development of background or system tasks, which are tasks that are executed by the subsystem or application independently of user activities.
  • If your application for example allows user to purchase items online, you may want to have an automated task that monitors the inventory levels and if the inventory decreases bellow certain threshold, your background task may send an reorder request to your suppliers. The pattern allows you to easily develop a background task that can have multiple instances running concurrently and each one of them can be automatically started and configured by your application.
  • This pattern provides data object interfaces and utility classes for configuring background tasks as well as web application listeners for smooth integration of background tasks with web applications.
  • See how to use this pattern.


  • Over 32 automated JUnit and visual web tests.
  • All source code meticulously code reviewed.

Next: Quick Start