Archive for the ‘Architecture’ Category

NewImage.jpgJust wanted to pass along a few architectural thought regarding a behavioral-baed (what not how) declarative UI generation architecture. A general  set requirements for a basic declarative UI framework in Java technology (e.g., found in Swing, GWT UIBinder, etc.) should include:

>> Validation: Using XML Schema

>> A DOM: A custom DOM to handle specifics such as keeping in sync the GUI component state and XML node state

>> Persistence: Marshalling and unmarshalling of the GUI

>> Image data: Stored as Base64 data

>> Swing components: Representation of the more commonly used Swing components for GUI development


The two subsystems could be broken down into the behavioral and declarative capabilities.

Behavioral Subsystem:

A. A Behavioral Engine is retrieved from a Behavioral Factory.

B. Sales, client, prospect, and environment state characteristics are assessed to define UI state space.

C.Behavioral Engine create UI XML (XUI) layout based on sales, client, prospect, and environment state characteristics.

Declarative UI Subsystem

1. A Builder is retrieved from a Builder Factory.

2. The Builder first ensures the XML document has been validated and parsed before it allows retrieval of a XUI document. If parsing or validation fail, a XUIParseException will occur and the framework will abort document loading.

3. The Builder creates the DOM where the objects reflect the XML elements that were read in.

4. A Realizer object, called internally by the XUI object, is instantiated and made ready to perform the next step.

5. Realizing is where the framework creates a hierarchy of GUI components based on the hierarchy of XML nodes created previously (the true core of the framework’s engine).

6. Using the power of reflection in the Java environment, the model logic (the portion of the application that drives the UI) is bound to the GUI components that have just been realized.





Read Full Post »