Maintain a hierarchial structure for settings
Often the ideal structure involves three levels: system, group, and individual. The setting should be picked up in reverse order.
Avoiding magic numbers is a well-known best practice. Even better is not to have any constants but to use in-application settings as I have already mentioned.
When settings are first implemented, there is only one level: system-wide.
Having only system-wide settings eventually becomes inconvenient because it does not allow you to customize the behavior of individual entries or groups of related entries.
For instance, we had a setting that controlled the number of days before an order could be considered complete.
We ended up wanting to offer a shorter period for payout for more established suppliers. As a result, we implemented an override in the supplier profile that takes precedence over the system-wide setting.
When implementing a customization setting, consider whether you need to add an override in a group or an individual entry.
It might not need to be implemented immediately but do consider it and consult the relevant teammates for advice.
In some instances, it might be beneficial to implement it immediately, but not accessible yet.
Sometimes the converse can also be true. Adding a setting to an individual entry indicates that it would be useful to have it in the parent group and the system.
- Have admin editable platform settings from the start
Don't only avoid magic numbers but avoid constants entirely.
- Consider the complementary interaction
Sometimes creating the opposite interaction can have an even more powerful effect
Suggest an improvement to this page (firstname.lastname@example.org)