I had a question about saving site configuration data.
We have a platform for web applications. The idea is that different customers can post and display their data on their own website, which is located on top of this platform. Each site has a configuration that determines which panels related to the client are displayed on which pages.
The system was originally designed to store all configuration data for each site in the database. When the site loads, all configuration data is loaded into the SiteConfiguration object, and client panels are created based on the contents of this object. This works, but it’s very difficult for me to apply change requests or add new sites, because there is so much data to sift and it’s hard to maintain the mental model of the site and its configuration.
Recently, I was tasked with developing a subset of some sites that will be created as PDF documents for printing. I decided to use a different approach to how I would define the configuration, instead of storing the configuration data in the database, I wrote XML files to store the data. It’s much more convenient for me to work because, instead of reading meaningless data lines associated with other meaningless data lines, I have meaningful documents with semantic, readable information with relationships defined by a visually understandable nesting of elements.
So, now with these two approaches to storing site configuration data, I would like to get the opinions of people more experienced in solving this problem regarding these two approaches. What is the best way to store site configuration data? Is there a better way than the two methods that I have outlined here?
Note: StackOverflow tells me that this question seems subjective and is likely to be closed. I am not trying to be subjective. I would like to know how best to approach this issue next time, and if people with experience in the industry can make a certain contribution.
source share