I am posting this here because this is where I felt I would find the brilliant minds who are familiar with OO theory rather than at the MSAccess Forums. So bear with me.
Background:
I am trying to write a VBA app using OO methodology. This allows for the DB adn the Code to live independently.
More Background:
I have an object A. For every A there may be any number of Object Bs. For every object B there may be any number of Object Cs.
Dilemma:
In some of my research I came across the idea that an object is an object itself. It needn't know from whence it came or how to update itself in the DB. Thus a second layer is develped Data Access Object. It acts as a conduit between said object (A, B, C) and the DB (Oracle, Access, SQL2000). Should I create an ADO (man I hate to use that acronym) for each Object or should I create some great class that can receive any number of objects, hit the DB and get information from a Global Data Dictionary (GDD) so the class now knows based on the object type it has received what information to go into what tables. The dynamically create a SQL statement based on what the object is trying to do.
Is this making any sense?
MW
Background:
I am trying to write a VBA app using OO methodology. This allows for the DB adn the Code to live independently.
More Background:
I have an object A. For every A there may be any number of Object Bs. For every object B there may be any number of Object Cs.
Dilemma:
In some of my research I came across the idea that an object is an object itself. It needn't know from whence it came or how to update itself in the DB. Thus a second layer is develped Data Access Object. It acts as a conduit between said object (A, B, C) and the DB (Oracle, Access, SQL2000). Should I create an ADO (man I hate to use that acronym) for each Object or should I create some great class that can receive any number of objects, hit the DB and get information from a Global Data Dictionary (GDD) so the class now knows based on the object type it has received what information to go into what tables. The dynamically create a SQL statement based on what the object is trying to do.
Is this making any sense?
MW