CodeMine Data Classes
The CodeMine Data Classes provide a layer of abstraction for consistent, transparent access to a variety of data sources. The Data Classes can be used with the CodeMine Interface layer classes to build complete standalone applications, or they can be used separately for server applications that do not have any user interface of their own.
CodeMine Data Environment
The CDE class contains the cursor and rule objects that together make up a "business object". In the simplest case, when using SCX based forms, the CDE is created dynamically at runtime based on the formís native data environment. There is also a utility to export an SCX data environment to a CDE class at design time, which you can then enhance with the VFP class designer.
Defining the CDE as a class at design time gives you many extra features that are not available in the native VFP data environment. These include things like alternate cursor types (like SQL passthrough or ADO), and setting relations between views. The CDE may be used stand-alone, or attached to a form.
The Cursor class defines the details of each cursor in a CDE Ė name, alias, data source, cursor type, open options, etc. Cursor objects provide a level of abstraction above the physical target cursor. When the cursor is opened, a Data Access object is added to it to provide the details of low level access for the particular cursor type.
Cursors may be used stand-alone, or added to a CDE container.
The Rule class is where you can store business rules and data validation code for your data. Rule objects are linked at runtime to one or more cursors. A cursor may also have any number of rule objects linked to it.
Rules contain a large number of data events that you can write code for, such as BeforeNavigate(), AfterNew(), RowValidRule(), FieldValid(), CursorValidRule(), AfterChange(), and so on. These events are triggered when the corresponding event occurs in a cursor that the rule is linked to.
The Data Manager class provides the interface between a CodeMine form and the various cursor and rule objects contained in the formís CDE.
The Data Manger also contains the same rule events as the rule objects. This makes it easy to quickly prototype and test your rule code directly in a host form. You can easily export the tested rule code from a Data Manager to a Rule class using the Save-as-Class feature.
Data Manager Rule events are compatible with all prior version of CodeMine.
The Connection Manager class is responsible for managing and sharing connections to remote data sources, such as SQL Server. It is also responsible for managing both local and remote transactions across one or more connections.