mohdfareed / msd-p18538

Interactive Training Robot for Fire Safety
0 stars 0 forks source link

Setup a config file for the system #7

Closed BrianMonclus closed 5 months ago

BrianMonclus commented 8 months ago

This issue has been updated to reflect the new structure of the project. Since we are now settled on using a RESTful API and mudBlazor this issue reflects that.

Front end:

Back end:

mohdfareed commented 8 months ago

I think JSON is the way to go, I've used it previously with Python and it's a smooth process.

mohdfareed commented 8 months ago

I suggest it has any "hard-coded" attributes you can think of. This should give me an idea of what to assume might need to be changed at runtime in case we need parts of the code to not restart upon config changes

mohdfareed commented 7 months ago

Given the updated backend, this would best be a service+model. There should be a model that holds all the data; it will be serialized to and deserialized from json for persistence. The service can have any logic for accessing/modifying configs.

mohdfareed commented 5 months ago

I will let the frontend handle titles and descriptions for the settings.

The backend will handle only storing the config (to be used by the backend) and providing a validation interface when settings are changed.

All settings will be strings, and the provider of the setting will be responsible for validating the data. The end result will be settings defined where they belong (transaction engine setting will be defined inside that service), with the persistence being a simple config.json that I will store with the logs files.

I will also provide a way to define defaults.