3 ms·
How do you avoid having complicated, nested data structures in your software if your business is complicated?
by islon 8y ago
How do you avoid having complicated, nested data structures in your software if your business is complicated?
- korijn 8y agoBy simplifying your business :) although that's not always realistic.
- augustl 8y agoOne answer to this is to have your raw "source" data stored as flat as possible (Datascript, RDF, ...). Then you generate nested structures (you could call these "views") as much as you want from this data. That way, you don't have to write to nested data, because that's the pain point imo.
- fnordsensei 8y agoIf you control the source, that's fine. I get externally generated documents containing an annoying mishmash of XML representing metadata and XML representing rendering logic. Sometimes the same stuff even represents both of these things. I take them apart to something flatter as early as possible, but the complexity is nevertheless unavoidable. (changing the upstream representation would involve changing an entire industry as well as a standard)