Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Investigate the concept of a root object collection container #8

Closed
hisystems opened this Issue Mar 4, 2012 · 1 comment

Comments

Projects
None yet
1 participant
Owner

hisystems commented Mar 4, 2012

Usually a root object container is required that contains all of the collection objects at the root of the object hierarchy. Typically, access is required to root object so that object references can be created or returned, because a relationship exists between two objects. It would be ideal if the root object (which contains all of the collection objects) can be accessed from any object that is utilising the library (i.e. inheriting from DatabaseObject or DatabaseObjects). This would avoid having to pass around the root object in each constructor or having to workaround the issue by creating new instances of collections (instead of managing one collection instance contained in the root object).

@ghost ghost assigned hisystems Mar 4, 2012

Owner

hisystems commented Mar 4, 2012

Thoughts so far:

  • the root object should contain a reference to a Database object.
  • it should NOT inherit from Database because that will expose a number of public methods/properties - in addition it is conceptually not really representing a database, it is representing a set of collection objects.
  • the root object should be accessible automatically from any class inheriting from DatabaseObject or DatabaseObjects
  • the root object should not be static / shared as this would:
    • be the most future proof method
    • allow for the object to be passed around the library (if it is static / shared this will be impossible)
    • allow for the creation of an abstract / mustinherit class that can be appropriately structured - and contain the Database object - as indicated above.

@hisystems hisystems closed this in 038d490 Mar 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment