CmonLib: DataSense

This somehow is a follow-up of a CodeRage DE session of mine from 2019 (in German) showing an alternative approach to connect controls to databases. Meanwhile the technology described in that session has become a part of CmonLib.

There is a whole range of DB controls in Delphi, such as TDBEdit, TDBListBoxTDBCheckBox and a few others, which usually come as special versions of the standard controls of the same name and are characterized by the additional properties DataSource and DataField, which are used to establish the connection to the field of a data source. This connection is then usually bi-directional – the data source represents the field content in the control, but edits within the control are also passed on to the data source. This feature alone has made Delphi one of the most efficient development environments for database applications from the very beginning. Even today, a simple application for editing a database table can be realized in Delphi within a few minutes.

Unfortunately there is a growing number of controls that don’t have a DB counterpart. Even more: DB controls are a VCL-only thing. FMX lacks them completely. (Yeah, I know – Live Bindings, but…)

To the rescue CmonLib recently got a new feature: DataSense Continue reading “CmonLib: DataSense”

CmonLib: A Facelift for DataSetHelper

Some of you might already be aware of my CmonLib,  which, according to the GitHub ReadMe, is a collection of several units with different purpose.

My intention for this library was to group all those single-file-helper-units into one repository which can be added as a single submodule to any project in one go. In addition, a couple of these helpers share some common functionality which could better be mapped in one repository, while the alternative would be multiple pretty small repositories forming a hierarchy.

This means that there are very few dependencies between all units of CmonLib. For details, please refer to the ReadMe.

One of those helper units is Cmon.DataSetHelper.pas, which is the new name and place of the former DataSetEnumerator. There is another article in this blog describing that helper: Dataset Enumerator Reloaded

During the last weeks there have been some improvements and extensions to this unit which I am going to explain in this article. Continue reading “CmonLib: A Facelift for DataSetHelper”