K
Kenneth Porter
I'm trying to organize the XML for my system configuration.
I have a System (top-level object) comprising a varying number of
Components, each with its own configuration. I also have a number of
classes representing stateful bundles of related methods. The latter
classes need per-component configuration. Should that configuration be
grouped with each Component's configuration, or should it be stored with
the configuration for each bundle of stateful methods? What are the pros
and cons of each?
Here's a "picture" of the runtime organization:
class System
{
Container<Component> components;
StatefulMethodBundle1 group1;
StatefulMethodBundle2 group2;
};
What are the relative advantages of storing a parameter in these ways?
System.component[x].group1.y
versus
System.group1.component[x].y
(x is the name (string) of a component, y is a component-specific parameter
needed by group1.)
I have a System (top-level object) comprising a varying number of
Components, each with its own configuration. I also have a number of
classes representing stateful bundles of related methods. The latter
classes need per-component configuration. Should that configuration be
grouped with each Component's configuration, or should it be stored with
the configuration for each bundle of stateful methods? What are the pros
and cons of each?
Here's a "picture" of the runtime organization:
class System
{
Container<Component> components;
StatefulMethodBundle1 group1;
StatefulMethodBundle2 group2;
};
What are the relative advantages of storing a parameter in these ways?
System.component[x].group1.y
versus
System.group1.component[x].y
(x is the name (string) of a component, y is a component-specific parameter
needed by group1.)