-
Notifications
You must be signed in to change notification settings - Fork 1
Saving Settings Design
DamianSuess edited this page Jan 1, 2019
·
4 revisions
We can go several routes for saving methods. We may also need a stronger GUID for our add-ins outside of the Mono.Addin's generated Id.
We're going with Option 2 (for now) which uses a single JSON file ToolsHub.db
.
- Create a JSON file for each add-in, using the add-in's ID as the root file name.
- PRO: This provides us the ability to separate into smaller chunks for quicker save/load times.
- PRO: - Only that file will be modified when a page is saved.
- CON: - Too many files to maintain - creation/cleanup/duplicates.
- CON: - Needs a file naming strategy
- Have one massive JSON file for all with the following sub-items.
- Subitems:
- Id - Add-in's Id.
- Key - Property name
- Value - Property value
- PRO: - Load once, it's in memory
- CON: - How do you clean up dead items?
- CON: - All items will be re-written constantly
- Subitems:
[
{
"Id": "ShortcutsAddin",
"Items": {
"ShortcutItems": "W3siVGl0bGUiOiJDLURyaXZlIiwiVGFyZ2V0IjoiQzpcXCJ9LHsiVGl0bGUiOiJELURyaXZlIiwiVGFyZ2V0IjoiRDpcXCJ9XQ=="
}
},
{
"Id": "PomodoroTimer",
"Items": {
"Duration": "25",
"BreakShort": "5",
"BreakLong": "10"
}
}
]
- Use SQLite to manage everything in the same manner as the JSON file.
- PRO: - Fast, clean, efficient!
- CON: - Another dependency and project bloat
- Use an INI file where the Keys are you add-in id or GUID.
- CON: Same issues as JSON files
- CON: What's the data-cap and doesn't support multi-line data?
- Home
- ToolsHub Architecture
- Addin ExtensionPoints
- Creating an Add-in
- Design Docs
- Feature Requests
- FAQ