Okay, this is a bit of a pointless question, but it’s still playing on my mind.
I’m making an interface a bit like reaktor (custom control widgets laid out on a panel). The user can add any number of Control widgets to a page on a tabbed control panel.
Obviously, the Control widgets contain the settings required to operate, but having worked quite a bit with the whole VST plugin ‘filter / editor’ way of working, i feel it may be safer to store the data outside of the Components (e.g. for the time where they’re not actually being displayed). I’m actually only making this as a standalone app for uni, but it’s always nice to have a portable framework that you can use elsewhere.
My question then is, is it a bad idea to keep the data stored in the Component objects (when they’re not being used on the screen)? Or should the data just be stored elsewhere in a similar structure and referenced in the components?
I’m about to change the design of it so that the data structures are JUST for the data, and the control components (panel, page, control) each hold a reference to a data object. Before I do all this though, I thought I’d ask to see if someone says it’s not worth the effort.
[Having written this post I sort of feel like I’ve answered my own question, and I’m going to do it anyway… but it’s worth asking all the same]