Storing configurable data in a database is a common and recommend practise. Doing so, allows for the application to be easily configurable without having to recompile and deploy a new version. Examples of commonly used configurable data that could be stored in a database are: default settings, lookup data, company information and system settings.
Now that the application is utilizing the database to store configurable data, how can a user of the system update the configurable tables?
Characteristically, the users of your application do not have the development tools or the knowledge to update a database directly. Furthermore, for security reasons, you wouldn’t want to expose the database to unqualified individuals.
Therefore, you could expose the configurable database tables via a custom user interface. This allows complete control over which database tables can be edited and by whom.
Although a custom user interface is an excellent approach to allow users of the system to update configurable database tables, it can be extremely expensive to develop. It requires custom database stored procedures, business objects, façade methods, web services and a user interface to loading and saving the data. This process would be duplicated for each configurable database table and for every application that your company develops.
The Agora Framework DB Table Editor allows users to update the contents of any database table. The DB Table Editor can be embedded into an existing .Net application or it can be used as a stand alone application.
The DB Table Editor consists of a DB Table Editor Settings user interface and a DB Table Editor user interface.
The DB Table Editor Settings user interface allows administrative users to configure which tables are editable. You can specify the following when configuring a table as being editable:
- Can add new rows
- Can update existing rows
- Can delete rows
- Which columns are visible
- Which columns are editable
- Which columns are localizable
- Which columns required a value
- Specify column lookup lists
- Set the column display format (i.e. currency, percent, drop down list, custom)
Figure 1 – DB Table Editor Settings window
The DB Table Editor allows users of the system to edit the database tables that have been configured in the DB Table Editor Settings user interface.
Figure 2 – DB Table Editor window
The DB Table Editor is also customizable. You can inherit from the DB Table Editor user control and add extra functionality if required.