Next generation design : Ideas & Discussions

IMO, JSON DB is the wrong technology. Its having a hammer, and using it, rather than asking what the problem is and what the right tool is. There’s a reason a slew of projects (like Spring, as an example) have started to move to YAML from JSON – because JSON isn’t really human-editable. Its human-readable, but its a giant pain in the ass to edit by hand. Putting everything in a single monolithic file just magnifies the problem. (Its a bad architecture for YAML, as well).

If you said “what about storing each individual thing in its own JSON file” (or YAML) I’d agree with it. But if any editing is being done outside an API that is enforcing correctness of structure, a monolithic solution isn’t right.

Alternately, have PaperUI store it in a single file, but have the system parsing them parse any files in that directory, so an “advanced” user can move chunks of it out to other files for organizational purposes. But personally, I think if I name a Thing “Living Room Sconce Dimmer”, a file like living_room_sconce_dimmer.json or living_room_sconce_dimmer.yml being created would be preferable.

IMO, though, the only downside really to the manual method of setting things up is a lack of documentation for doing so with VS Code, because VS Code makes it so easy to set up items. The learning curve is steeper than it needs to be. And, I think Xtend is just a disaster when it comes to a scripting environment (largely because there aren’t any editors that properly do syntax checking, so its just hit or miss if something is going to work).