The db-JAPI Coder application

 

 

This application allows the user to connect to databases, build statements, run resultsets and then build all the code for the configured components.

The Coder application is built around the dbJAPI library and therefore supplies all the capabilities of the API, both in the application and in the code generated by the application. This means that the API can be plugged into any application and the code generated by this Coder can be used in any application, in any Java supported environment.

To be more specific the Coder application allows for the user to connect to any JDBC or ODBC source. There are drivers supplied with the application for Oracle, MS SQL, MySQL, PostgreSQL and ODBC (Windows only). The user can load his/her own drivers into the driver directory and configure them in the driver XML file (more here on that).

Thereafter the application's driver GUI interface will automatically integrate with the driver settings and supply both GUI and driver interface capabilities as specified in the driver XML file. The required drivers can then be used in the user application with the code generated for automatic processing.

 

Below is the overview of the db-JAPI demonstration application with more details on the parts that bring about it's existence.

Number Description
1 This is the menu system for the coder application and does not belong to the API. All functions stemming from the menu options are part of db-JAPI. From the menu system one can save and load projects, change languages, change look & feel and select whether the buttons have icon, text or both. See below for the menu options.
2 The version information of the coder application and the db-JAPI .
3 The connection dialog is used for connecting to a data source, creating statements and manipulating data from the database.
Refer to the and for more information.
4 The System Status area shows important information about the application, the environment and the user information.
The IP, hardware address, host OS, architecture, user name, user home directory, Java runtime version, Java home folder, application working directory and memory information are shown. The memory information is updated every 5 seconds.
5 This is the help area. It has buttons for entering this help system and for viewing the API documentation of db-JAPI. The API Javadoc is opened with the default desktop internet browser, while the user help system uses JavaHelp to depict it's contents.
6 This is the button for forcing Garbage Collection. The Java RT is very affective in managing the memory, but it does make one feel warm and fussy when the broom-stick is close at hand.
7 The log system is everywhere in db-JAPI. It reports all errors, debugs, warnings and messages. Click for more information.

 

 

The coder application Menu

As mentioned earlier, the menu does not not belong to db-JAPI, but is part of the coder application that implements db-JAPI.
From this menu one can load and save projects, see a list of recent projects or exit, with or without saving. This is indicated by (1) in the image.
Please note the following; a list of named projects and up to 5 temporary projects are shown in the recent projects. The temporary projects are those saved on a "Just Exit". In other words, when we choose "Just Exit" there are no questions asked. The system exits immediately, but the current settings are saved to a temporary file which shows in the "Recent project" list.

Below we see the setting capabilities that are provided by db-JAPI. They are a list of look and feels, derived from the host system that the coder application is running on. It may be that the default look and feel is not the most suited for the environment in which the application is running. In other words, the tables may look strange, with patchy background colouring, the lists may not fit in the areas allotted, etc.
Please try another L&F if these issues are visible.

Number (3) shows the ability of db-JAPI to customise the buttons of the application. One can choose to have only the icon or only the test on the buttons. Furthermore, within the API itself, the ILptsGuiIconSet can be implemented for customised buttons and text.

The language option will change every part of the application into the language selected. Every piece of text will change to the selected language.

Please note that all the settings are saved in a configuration file in your user directory under lapetus / lpts.workspace.xml.

In the same directory db-JAPI also saves the RSA and AES Cipher Key files for encryption and decryption of local and foreign data.