Why was TDataSource created?

What was (or will be) an argument in favor of creating a TDataSource as an intermediary between the data-related components and the actual TDataSets, instead of directly connecting the components directly to the TDataSets themselves?

This may seem like a silly question, but I'm working on a wide range of "data view" components that reference a common "data connector" component, etc .; and when developing this set of components, I find myself referring to the classic Delphi structure "TDataSet β†’ TDataSource β†’ Data-bound-component" for customization. However, in my set of components I still want to significantly combine the functionality of the equivalents of "TDataSource" and "TDataSet" in one class. I was interested in what was the reason that they shared them in the first place.

+5
source share
5 answers

decoupling indirection.

TDataSource :

  • (TDataSource , TDataSets; TDataSet -TDataSet, MasterSource TDataSource, TDataSet)
  • - (TDataSets DataModule; TDataSource /, , DataSource).

DataSource, TDataSet, , TDataSource.DataSet.

+4

, , , , , , .

, , , TDBEdits, TDBGrids ..

+9
  • TDataSet .
  • TDataSource - : /, , ..

, , . , API, .

+4

Model-View-Controller.

DataSet (), , .
, DB, () , , . DataSource - (), , .

, , , .

+1

, , , , , - . , , , . , , , datasource.Dataset .

( , , , .)

0

All Articles