473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Configuration hierarchy organization

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<Componentcomponents;
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.)
Dec 27 '07 #1
4 1407
System.component[x].group1.y
versus
System.group1.component[x].y
Which solution to choose depends on what is changed together more
often. You should organize the config so that typical changes will
affect parts of configuration that are close to each other in the XML.
I suppose typical changes more often affect many methods and a single
component, so I think the first solution is better.

Moreover, you seem to be using a language that was designed for text
annotations, not for data. If your application is not text-oriented,
but rather data-oriented better use Harpoon (http://
harpoon.sourceforge.net) or Yaml (http://yaml.org), but not the XML.
Dec 27 '07 #2
Uhm... As the example you show demonstrates, this isn't an XML question;
it's a basic data structures question.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Dec 27 '07 #3
Joseph Kesselman <ke************@comcast.netwrote in news:4773eb20$1
@kcnews01:
Uhm... As the example you show demonstrates, this isn't an XML question;
it's a basic data structures question.
Pointers to better forums would be welcome.
Dec 28 '07 #4
mc****@poczta.onet.pl wrote in news:1c007e07-aee4-4d5e-a97e-d7e3f0619931
@t1g2000pra.googlegroups.com:
Moreover, you seem to be using a language that was designed for text
annotations, not for data. If your application is not text-oriented,
but rather data-oriented better use Harpoon (http://
harpoon.sourceforge.net) or Yaml (http://yaml.org), but not the XML.
I wasn't aware of those when I started to code. Thanks for the pointers.

The app is implemented in C++, and uses the XML classes in the wxWidgets
frame work to parse its config files.

One thing I haven't seen in any of the data languages is a way of
implementing "macros", a way to express a sequence that is used in several
places. For example, my config file defines multiple types of systems
(selected at runtime by the user) and many characteristics of these systems
are common (eg. they may share similar collections of components). It would
be desirable to specify a component configuration once and then refer to it
in several places. I've seen hints of XML "pointers" that might serve the
purpose, but haven't found any good examples illustrating their use.
Dec 28 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Bruce Hensley | last post by:
I don't know how to begin on a query (SELECT statement) to find all the tasks assigned to an arbitrary manager (say, staffID='JSmith') and her organization, that is, assigned to all her underlings,...
21
by: Mark Broadbent | last post by:
Consider the following statements //------- Item i = Basket.Items; //indexer is used to return instance of class Item Basket.Items.Remove(); //method on class item is fired item i = new...
1
by: Abel Martinez | last post by:
Hello. I'm looking for an example of how to do this in C#. Particulary the CDO.Configuration stuff. I'm currently using System.Web.Mail.MailMessage and System.Web.Mail.SmtpMail to send messaged,...
5
by: rdcpro | last post by:
In reading MSDN docs on creating custom Configuration sections, I found this page: ...
10
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server...
1
by: Hank | last post by:
As our database runs, there are occasions where someone in the organization should be notified about significant events, such as automatically advising the Design Engineer when a new part has been...
0
by: tmsprowl | last post by:
Greetings! I was wondering if someone could help me with a problem I'm having. My department is just one of many within my organization. My organization has control over the network domain,...
4
by: Kenneth Porter | last post by:
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.