I want to create a simple configuration framework. Yes I know, there are many frameworks, which make their job very well. But for interesting in architecture, I want to create my own.
My framework should notice the principles of SOLID You should be able, to store you configuration in several formats. As a proof on concept, I've drawed a simple uml.
Everything starts with a simple factory. This factory returns an abstract class called: "Configurator". Within the "Configurator"-class there's a method factory, which returns an interface, called: "IConfigurationSource". The configuration source is just a interface for storing my settings into a file or any different data storage.
Just a example of a xml implementation:
For a new format, I've to create a new class which inherits "Configurator". You've to override the factory method and return a concrete type of a "IConfigurationSource". In this class, the "IConfigurationSource" will be initialized. I've also to implement a class which inherits "IConfigurationSource" again. This class will provide my data handling into a concrete data storage, in our example a xml file.
At least, a short description of my variables (examples):
- component: For each configuration component, I'll provide a separate xml file. That means: "logging, network, users, etc..."
- valueName: This is the name of a configuration item. For example: "maxUsersAtTheSameTime"
- value: This is the value itself
This is my idea, to create a simple configuration framework. Later I'll implement something like object mapping etc...
Does this design fully support SOLID principles?