Hi, at a high level I'm just looking for some clarity on the differences and benefits of storing data in my DOM from within a definition or section. For example, if I want to model a system that has encoders, decoders and some admin data I have the option of having a definition for the system, and then within that I can have an encoder section and decoder section. Within my 1 or more sections I have some field data foreach my encoders/decoders. I could however have a module with 2 definitions, 1 for each encoders and decoders, and then sections within each definition for the fields. Encoder general information, encoder admin data etc.
What are the differences, capabilities and restrictions of storing my data from within it's own definition rather than within it's own section? Do I restrict what I can do in the future if all the data is defined within 1 definition? Is it better structurally to break up my module into multiple logical definitions?
I think all the examples I've seen have 1 definition but I'm not sure if that's just for simplicity of each example or because it's appropriate/usual for a module to have 1 definition defined.
Hope all that makes sense, thanks.
Hi Ross,
In general, choosing between using multiple sections, or splitting up in separate DOM definitions comes down to:
- How much data you want to store
- What parts of that data need to be retrieved
- How often are those parts retrieved
If all the encoder & decoder info is always required at the same time, it may make sense to store it then all in one DOM instance using multiple sections. (Since you would otherwise need to do multiple request to stitch the different DOM instances together).
If, however, you will have situations where you only want to have the encoder or decoder data separately, storing them separate saves you some time when reading since you don't have to read the other data is not needed at that time. This may also allow you to reuse the same data if that would make sense in your use-case.
Note that having your data across multiple definitions with links to one another is definitely a valid way of using DOM and may often result in the best performance since the DOM instances are not too large. But again, keep in mind that this performance improvement is not negated by having to do too many smaller requests instead.
Feel free to share some numbers on the amount of encoder, decoder and additional fields we are talking about. That way, I could make a more specific suggestion.