Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

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
Closed
Assignees

Comments

@hisystems
Copy link
Owner

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
@hisystems
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant