Closed asclines closed 8 years ago
One question that needs to be answered: Should this follow an OOP design where everything is broken into classes based on the layer they are at in the XML tree? Or should we look this more with a key-value pair mentality and use dictionaries to store the data?
When making this decision we need to consider:
Most of the data that is loaded from the configuration XML file will not be modified by the program. Maybe we could do a hybrid of objects and dictionaries depending on whether the data should be modifiable?
Yeah I would say that the program should never modify any of this stuff outside of the configuration management tool.
In terms of the data, probably some combination of the two. In some situations we'll need a dictionary to make finding the data efficient, in others that won't be an issue
As of current, the configuration object is a singleton. I believe this meets the requirements to be a singleton as we at any point only want one instance of a configuration object per program run.
Referencing #103 for design.
This file,
configuration.py' will be a Python script that holds the class
Configuration` for holding all the data taken in by the XML file in #103.The data from the XML file should be loaded into a dictionary. Not only does this allow for quicker access of information but it also separates the manipulation of configuration data from the configuration file. The loading of the XML file is covered in #111