Dear all,
I am writing an ActiveX DLL that conatins objects for accessing a database. The hope is that it will ultimately provide a set of objects for developers to use when writing applications that integrate with our system.
So far I have organised it thus: Each object contains properties and methods for accessing and manipulating database tables (EG: high level commands such as SaveChanges, AddNew, Delete). The objects are organised into collections so that navigation is much like a tree structure. EG: Company(1).Addresses(x).Town etc etc etc.
I have this structure working but have noticed that each table and collection object contains much the same code that I would potentially implement time and time again. My question: Can I / how would I use interfaces to make my job simpler?
The typical structure of each TABLE object is this:
- List of properties (fields)
- Parent object reference
- Collections of sub-objects
- Initialisation & Termination
- Delete, Add, Save public methods
- Associate, Populate, Disassociate, Build friend methods
The code is fairly similar in each object but obviously the properties change. Please help: Is there any advantage to using interfaces!!??
Jason.
I am writing an ActiveX DLL that conatins objects for accessing a database. The hope is that it will ultimately provide a set of objects for developers to use when writing applications that integrate with our system.
So far I have organised it thus: Each object contains properties and methods for accessing and manipulating database tables (EG: high level commands such as SaveChanges, AddNew, Delete). The objects are organised into collections so that navigation is much like a tree structure. EG: Company(1).Addresses(x).Town etc etc etc.
I have this structure working but have noticed that each table and collection object contains much the same code that I would potentially implement time and time again. My question: Can I / how would I use interfaces to make my job simpler?
The typical structure of each TABLE object is this:
- List of properties (fields)
- Parent object reference
- Collections of sub-objects
- Initialisation & Termination
- Delete, Add, Save public methods
- Associate, Populate, Disassociate, Build friend methods
The code is fairly similar in each object but obviously the properties change. Please help: Is there any advantage to using interfaces!!??
Jason.