473,320 Members | 1,993 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,320 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 1873
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

3
by: Ashutosh Bhalerao | last post by:
I need to be able to access the following information programmatically. Total RAM Memory How many occupied memory slots are there in the machine How much memory in each chip What kind of RAM...
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.