Frequently Asked Questions about EverClassy Dataset

What exactly is EverClassy Dataset?

EverClassy Dataset is a VCL dataset component that is populated with native Delphi objects instead of records retrieved from a database system, for instance. It has some similaties with TClientDataset in the sense both are memory datasets, but EverClassy Dataset does not depend on a secondary component like TDatasetProvider.

What is it useful for?

EverClassy Dataset makes it possible to interoperate dataware components, such as TDBGrid, with native Delphi objects. This feature is specially useful when an application design is driven by object orientation guidelines. In such a scenario, the application is constructed with a multitude of objects that will need to be handled in a GUI. With EverClassy Dataset it's possible to use the full featured dataware components to directly work as editors to the application's objects.

Why would I have pure OO design in my application?

Because Delphi is a OO programming language that provides a wide and powerful range of features that cannot be completely used in a relational design. Inheritance, polimorphism, abstraction, delegation and many other programming tools that are only available when an application is designed and built on object orientation. Table oriented design is limited and greatly restrains the programmer, making the coding tedious, expensive and repeatitive.

Can I use absolutely any object with EverClassy Dataset?

Yes, absolutely any object can be worked by this dataset, with no exceptions!

How the objects are handled by EverClassy Dataset?

Objects are mapped to dataset records while their properties are mapped to dataset fields. For instance, consider a list of objects is assigned as a source to EverClassy Dataset. If this list has 50 items, the dataset will show 50 records. Each record mapped to each item. The dataset fields are associated to the object properties by name convention. For instance, a date field named BirthDate will be handled by a dataset field with the same name. Imagining a TDBGrid with a column bound to that field, each time the user changes the value of the column, such a value is received by the field and immediatly assigned to the corresponding property in the instance corresponding to the current record.

What if I declare a field that does not correspond to any properties?

This field will work precisely as any other field, but it's value will be kept in a buffer that will be lost when the dataset is closed. This behavior can be very useful when the programmer needs fields that exist only as helpers to accomplish a more sofisticated GUI.

Can I have items with different classes in the collection handled by the dataset?

Yes, there are no restrictions about what objects can be worked by EverClassy Dataset. Each record can be mapped to a different class instance independently of the others.

Can I have an object that has sub-objects?

Yes, it's possible to add a TDatasetField to the dataset and assign this field to a second instance of TECDataset. This second dataset will work as a detail dataset, handling the sub-objects.

Do I need a dataset now that Delphi has LiveBindings?

Yes, LiveBindings do not depend on a dataset when there are not grids envolved, but in a GUI that uses such a component it's still necessary. The dataset is useful to handle a collectivity of values and LiveBindings rely on it to populate a grid.