Code Creation Overview
[Previous] [Main] [Next]

Code Creation Overview

The next few screens describe the funtions of the JGuiGen Create Program. They are also part of the JGuiGen Help file.

Overview -

First we need something to drive this system. In our case we use a table called a Data Dictionary.

Data Dictionary - In order to document a SQL database you need to store information about the various tables and the columns in each table. Usually the column names, data types, and default values are not enough to really describe how a column is used. Over time columns are added and other columns are no longer used. Creating a paper document that contains this information is often a "paper tiger." It sits on a shelf and is out-of-date the minute it is finished. JGuiGen uses a SQL table to doucment databases. The table is called data_dict and it is called the "Data Dictionary." This table is automatically filled with information useing calls tothe SQL database's metatdata system. This automatically records added columns, deleted columns and columns that have changes size, shape or data date. You then use JGuiGen to add information to the data dictionary. This additional information describes the columns, how they get they data and any notes you think would be helpful in the future. In addition the data dictionary description is used to supply tooltips of the generated applications and drives the application generatation when it comes to deciding how to edit the various columns.

In order to fill the data dictionary you must have a SQL database and an account that has access to that database. You will need to add a table called data_dict to your database. There is an XML file that contains information that the Data Dictionary program needs to open the SQL database. You will edit the XML file to make it match your database. You will also edit the list of tables in the file to match the tables you wish to document and work with. Once this is correct the Data Dictionary system has the five basic steps described in Trying JGuiGen section above

Briefly the steps are as follows:

1. Modify your data base as described in the readme.html file. This involves

2. Edit the JGuiGenIni.xml file to tell the system what kind of data base you using and the user name and password needed to access the database. Optionally these can be stored in LDAP. See the readme.html file for more information.

3. JGuiGen --> CREATE --> REFRESH this brings up what we call the MARK TABLES screen. You choose the tables you are interested in here and mark each with a check mark in the Process field. You will be offered a chance to view the prinout when you leave the screen. You can also view the prinout at JGuiGen --> File --> View Data Dict Listing.

4. JGuiGen --> CREATE --> CLASS. You can tell the system about the application you want generated. For example you can put the menu at the top or the bottom of the screen, you can include the scrolling JTable or not.

5. JGuiGen --> CREATE --> COLUMN. You can tell the system to ignore selected columns, what kind of visual control to use when editing a column, what to use for tooltips in your application, what are required columns, which field to use in the JTable, etc.

6. JGuiGen --> CREATE --> COLUMN (CODE BANK) - This appears as needed in the COLUMN edit screen. It contains the codes you need to create a group of radio buttons, to populate a JCombobox or populate a multi-selection JList.

7. JGuiGen --> CREATE --> ORDER - Click the Order button and sort the columns into an order that makes sense for and edit screen.

8. JGuiGen --> CREATE - I!8N - Use the Internationalization (I18N) menu option to write out the property bundles needed for the application to run.

9. Modify the rowlayout manager in the <your application> file to give your application a better look and feel

10. Modify the prompts as needed in the I!8N screens) and regenerate the properties bundles.

We will look at each of these in the following screens.