JDataPanel (JDP) Framework 

The main problem with many existing presentation layer solutions is that individual presentation layer controls are not, by default, bound to each other and are not logically grouped, that is, there is no logical structure for the presentation layer.

In contrast, the business logic and data access layers have their own logical structures. The business logic layer is represented by a set of business objects with their own structure and relations, and the data layer is frequently referred to as a set of relational ( table-based structure ) or hierarchical ( xml representation ) objects.

This contradiction leads to a large programming efforts overhead when all the layers are put together.

The primary goal of the JDataPanel is to have the presentation layer components logically structured, that is, properly groupped and placed at the right level in the presentation hierarchy.

JDataPanel Framework is a central element of MainTrend's programming environment. It is both a base for all the conversions (Rally-to-Java, PowerBuilder-to-Java etc.), and also the independent framework for building J2EE applications. When developed, the purpose was to build a general framework that included Rally and PowerBuilder functionality as a special case. The purpose was to give Java developers a powerful and flexible Java and XML based environment for building Data Access Layer and Presentation Layer components.

JDataPanel Framework consists of the following parts:

  • JDataPanel components ( Presentation layer )
  • DataManager components ( Data access layer )
  • Application manager components ( Control layer )
  • Graphical designers ( JDataPanel Builder and DataStore Builder )
JDataPanel is a universal XML-based user interface description:
  • It has both "wide" and "deep" architectures: correlates with intuitive concept of object with attributes ("wide") and sub-objects ("deep").
  • It has built-in integration with the Business Logic and Data Access Layers together with readiness for layers separation.
  • It is a powerful form / report framework.
Here is a User Interface Description Structure:
<?xml version="1.0" encoding="utf-8"?>
<group name="Main" ... (other attributes) >
  <textgroup name="t1" fontfamily="Courier New" x="0" ...>
    <text name="t1_1" container="t1" ...>Hello!</text>
  </textgroup>
  <group name="Header" datasource="DS1" ...>
    <text .../>
    <field name="date" datafield="indate" datatype="Date" ...>
      <editcontrol name="JDateField".../>
    </field>
    <group ...>
      <field .../>
      <text .../>
    </group>
  </group>
</group>

JDP framework supports an MVC (Model - View - Controller) design pattern in thin client environment (HtmlRenderer + browser as "View", JDP Model as "Model" and JDP commands as "Controller").

DataStore part of the framework is used as a "Data Model" part of the "Model" in MVC pattern.

DataStore framework is also a universal data access layer solution, and can be used independently from JDataPanel part of the JDP framework.

DataStore objects have their xml representation, which looks as follows:
<?xml version="1.0" encoding="utf-8"?>
<datastore name="EXAMPLE_DSD" clearOnRetrieve="true" comment="" deleteAllowed="true" insertAllowed="true" retrieveLimit="0" trimEndOnRetrieve="false" updateAllowed="true" updateFields="CODE, DESCRIPTION" updateKey="CODE" updateSourceName="EXAMPLE_TBL" definition="select EXAMPLE_TBL.CODE, EXAMPLE_TBL.DESCRIPTION from EXAMPLE_TBL EXAMPLE _TBL order by EXAMPLE_TBL.CODE asc" adapter="1">
  <field name="CODE" dataType="String" sourceAlias="EXAMPLE_TBL" sourceFieldName="CODE" sourceName="EXAMPLE_TBL" updateable="true"/>
  <field name="DESCRIPTION" dataType="String" sourceAlias="EXAMPLE_TBL" sourceFieldName="DESCRIPTION" sourceName="EXAMPLE_TBL" updateable="true"/>
</datastore>

Flexibility of the DataStore framework is based on the encapsulation of the data access functionality with the "adapters" concept. Each type of the data storage can be accessed with the appropriate adapter, for example:
  • SQLAdapter -> JDBC -> Database
  • XMLAdapter -> XML files
  • InMemoryAdapter
The adapters' concept is open and any needed additional adapter can be easily developed.

Application manager components are the base for the building thin client solutions for converted from different sources applications, or for the applications which are built from scratch with JDP framework.

These components can be easily inherited and extended to suite all the needs of the chosen target platform.

To increase the development productivity and to help the developers in working with JDP framework, the Graphical designers (JDataPanel Builder and DataStore Builder) can be used.

Here is the example of the JDataPanel (form), opened within JDataPanel Builder: