The ImageLibrary (ILib) package contains a collection of Delphi components that lets you build a full featured, self-contained database. You need no drivers or third parity tools. You may create and configure your database from within the Delphi IDE or, for full power, use the designer application that ships with the package.
This presentation describes some of the key points of the ImageLibrary database. It scratches the surface. To get an impression of the full richness of the system, you may take a look at the help file.
More than images
The term “Image” is a bit misleading: ILib has much more than images up the sleeve. In fact it offers most of what you would expect from a database system: SQL support, transaction handling, indexing, validation … But of course, living up to the name, images are given special attention. Store them, search them, edit them, view them in different formats; a lot of effort has been put into the system to make image handling nice and easy.
To view and edit data fields you link them to native Delphi controls—or you use specialized ILib controls to handle database operations in ways that Delphi natives cannot.
For grid view and editing ILib offers the TILDatasetViewer component that displays images and data in tabular formats. The viewer can have check boxes to handle multiple selection, signal validation states of the records, store html links to external resources … It can expand record lines to show multi line text fields or multi value fields.
The dataset viewer component operates in two modes: Image and text display. The highlighted record displays the values of a “multi value” field, that means a field that can have more than one individual value.
Data aware controls and control panels
By subclassing controls into search and update controls you can make the controls perform advanced operations that else would have required underlying SQL statements. This feature is especially effective when controls are hosted by control panels. At design time you can have control panels automatically generate and link your controls. At run time the panels organize control display according to the active work mode and field selections.
Advanced search with data aware controls in a control panel. The user can select fields from different tables and set logical and comparison operators.
You can enhance the functionality of a search control to set multiple criteria on the same field. A single line search control does only accept a simple expression. To make it express a compound condition you can switch to enhanced mode. Both search controls and update controls have this duality.
ILib highly emphasizes that creating your UI should be as easy as possible. A recommended way of handling the challenges of a multi table application is applying what is named the wsCommandModes work style. This offers an automated way of executing search and update commands in connection with data aware controls. Additionally, you are granted ready-made UIs for columns and sort administration and an easy solution for setting up an SQL editor. With the command modes style follows automatic validation of SQL-statements and values typed in data aware controls.
A significant advantage of using this style is that you can have your search controls accessing any table in the search path, in that way executing implicit joins without writing a single SQL-line.
This shows how ILib generates the UI in three different modes: search, update and columns mode. The top section displays the tables, the middle section shows a list of available fields for the selected mode, the bottom area displays the data aware controls the user has selected. In columns mode the DACs are actually arrow keys that manipulates the field order. The table and field lists are standard Delphi list components you plug into your components. The DACs are generated and hosted by control panels. There are corresponding UIs for sort and SQL management.
To execute an operation associated with the work mode, you call the ExecCommand method and CanExecCommand for validation. Instead of coding this manually, you can use an ActionBar component. This lets the user select the work mode and execute commands without you having to code anything. An action bar can be tied to a specific table or it can dynamically adapt to the table that the user selects.
Action bars automate a variety of functions, like navigation, inserts and deletes, image control and filtering, etc. You can apply it even if you build your application without the aid of the command mode work style. The actions behind the tool buttons can be distributed to menus and stand-alone buttons.
Message bars offer a way to notify he user about the state of your application. Messages are composed from validation results, syntax checking, return results from database execution methods (Insert, Update, Delete …) or by constraint and type checking of data aware control input. The message bar surveys all these sources and produces messages that are most relevant within the given context. Additionally, the message bar automatically displays the progress state of operations that are expected to last longer than normal waiting time.
The message bar switches automatically to progress mode when a lengthy operation is detected.
The message bar can be configured in many ways, letting you adjust message flow logic and appearance.
ILib is basically a hierarchical system where tables are organized in parent / child structures. This approach does not prevent you from modelling relationships like you can in a relational database. By connecting branches in the table tree, you can solve many to many relationships or access tables not directly available from the search path.
ILib exploits the hierarchical model to offer integrated master / detail processing. In Delphi, DB components let you set up m / d views by writing parameterized filter queries that extracts the detail records through the DataSource component. In ILib master / detail processing is a built-in feature that potentially influences data display of all parts of your application. Unless you want to do special filtering, you don’t have to code anything to make m / d work. You tune the system by means of a single design time property.
A simple example of master detail processing. When the user activates a record in the Title table, the records in the child table Editions are automatically filtered out. You enable this behavior by checking a single design time property.
ILib offers two ways to build database schemas: You can use the ILib designer application or the “QuickBuilder” editor that operates from within the Delphi IDE. Both methods are based on a graphic UI.
QuickBuilder is a convenient option if you only need a table or two to store some application data. It creates a database with an all-round configuration.
For more demanding data models the ILib designer is the right choice.
Simply double click the TableManager component and the QickBuilder pops up. As soon as the database is created, you can start working.
The ILib designer is the ultimate tool for creating the database schema. View the data model as a dependency graph, use separate tools for adding and configuring databases, tables and fields. You can test application options, monitor transactions and get insight into the low-level parts of the database. The data editor gives you full access to database data.
View the data model as a dependency graph.
The data editor gives you full access to the data.
Transaction monitoring keeps you up to date with work history.
ILib has been tested with a load of 1 million rows stored in parent / child records. Searching on indexed fields, the system responded instantly. Scanning 1 million records takes approximately 1 minute, depending on computer capacity.
Mass updates and inserts may take some time when the database grows large.
ILib is a single user database, tied to the Windows platform. For cross language support, you can download the ILib.dll library that lets you access the database using SQL.
Should you trust it?
ILib has been developed over the last four years; thousands of hours have been spent in bug-testing. But as with most systems no one can really claim that everything works perfect.
If I were you, I would be skeptical, but curios. Why not try it out? It’s free.