up to this point I used config files (mainly XMLs) to store different configurations for my program. The program is highly modular. My idea was to create a hierarchy / multiple layers of factories that use each other, where the main factory reads in/parses the XML-file. The entire program is basically set up through dependency injection by the factories. However, I'm dealing with two issues:
- Is that the correct/standard way of setting up/configuring a program? What are my alternatives?
- How do I make sure that the configuration elements fit together. E.g. strategies will only work with specific other strategies. My feeling is that I either have to use A LOT of if-else constructs or a lot of factories that set up a certain "combination of config-elements", which will explode with the amount of possible combinations.
Aucun commentaire:
Enregistrer un commentaire