Web Application Framework Project Documentation

Visual Model

The Visual Model represents the User Interface for the Database Model, therefore it should take into account the nature of the Relational Database.
For example, the VM shows all the tables of the Database, enables to add, remove, view and update the Database fields etc.

One of the essential concepts of Relational DBs is the concept of primary and foreign key. Thus, it is required to provide a proper treatment of these concepts. For example:
Table "Orders" contains field "ProductID" which is the foreign key taken from its parent table "Products".
The ProductID is an integer number that is avoid of meaning to the end user. So, if the user is viewing the specific Order, s/he must be able to follow the ProductID link and see the complete description of this product.
The DatabaseProxy provides all the necessary information about the Database structure.

The Visual Model is built of the number of Visual Patterns representing the main functional elements of the application. For example, Tables Pattern is responsible for representation of all the names of the Database tables, FormEditor Pattern is responsible for a single table row editing etc. 
The Visual Patterns are described in the technion.dbui.ui.pattern package.
The developer implementing the Visual Model may define any number of new patterns they see useful. (See Conventions). 

Each Pattern fires the corresponding Event when some user activity happens. For example, the Tables Pattern fires TablesEvent when the user chooses one of the table names. The patterns may fire any number of events by need.

The Visual Pattern declares itself as a Listener of any number of Events it is interested in. The system will automagically register all the Listeners with their Event Sources, so that it is guaranteed that interested parties will be notified about event occuring.

The example of application initialization:

User activity processing:

The simulation of events originating in HTML browser:

HTML Page creation cycle example:

Event propagation through Visual Patterns:

@

Database Model

The Database Model describes the relational database in terms of Java beans. These beans are generated on-the-fly using JDBC, analyzing database metadata and compiling Java classes in the untime.
The slide below describes the correspondence between database tables and java beans: