Multi-Level Setup
When designing software for both small-sized and medium-sized businesses, there is often a balancing act in the designing setup options. Where some companies only require a feature to be turned on or off, other businesses require them to be more flexible.
The Multi-Level Setup pattern is explained at https://www.youtube.com/watch?v=kMtzKFjU22U&list=PLhZ3P-LY7CqmVszuvtJLujFyHpsVN0U_w&index=30.
In order to allow the best of both worlds, we can simply add the setup options to both the tables, and write a small interface to read the values based on importance.
Technical description
The setup fields need to be implemented on at least two levels, for example, a Singleton and Supplemental table. The setup options should be identical.
To read the setup values, we need to provide a function that first checks the most detailed level, the Supplemental table, and then the Singleton table.
The following code snippet is a part of...