Trying to compare Configuration and VL.ModelUtils

I would like to analyse a new feature that is claimed to be a replacement for tinkering with configurations. It’s a really interesting tool, but I have a couple of questions:

  1. How can I edit the configuration on the fly?
  2. How do I access the configuration as a file or object?
  3. Is it possible to load or save configurations?

I’m trying to compare it with what I use myself on a daily basis and I realise that this more technologically advanced solution definitely has a lot of potential. But so far it seems to be focused on ease of implementation and not so rich in features.

For example, I can save and load configurations in my solution with a single button. I can edit the configuration through channels (which is incredibly convenient with imgui). Let’s forget that I have an enumeration list that stores all the properties, that’s not so important. But I can also get the config as a structured object of my type, such an object can have many functions, I use a constructor in case the file is not found and the object is created by default.

It all comes down to choosing the right Configuration Provider? What can I do to bring in the features I need?

i’m afraid Configuration is probably not for you then. From their docs: “Configuration is read-only, and the configuration pattern isn’t designed to be programmatically writable.”

as you see in their docs, the main point is that you can have multiple configuration sources (providers) and in your app you get a unified view over them, no matter where they originate from. given that main idea, it also makes sense that they are read-only (since you would’t know where a config originates from).

obviously if you say your only source will always be say a .json file, you could write changes to configs to that file manually. but probably at this point it makes more sense to stick to your proven system.

@joreg thank you for the detailed answer.

It seems that the range of possibilities for this feature is not that great. Although I can see it being a great tool for passing settings via command line parameters. It’s probably also a very powerful tool when settings don’t need to be edited.

I have a question, how can I load configurations on the fly? Is that possible? It looks like the feature now works before the application is initialised.

in my understanding this is a question for each of the providers. e.g. the json provider has an option to auto-update when the file changed.

I’m wondering if I can reload the configuration from different files, perhaps using them as “scene” files. Doing it on the fly.