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<Compo nentcomponents;
StatefulMethodB undle1 group1;
StatefulMethodB undle2 group2;
};
What are the relative advantages of storing a parameter in these ways?
System.componen t[x].group1.y
versus
System.group1.c omponent[x].y
(x is the name (string) of a component, y is a component-specific parameter
needed by group1.) 4 1898
System.componen t[x].group1.y
versus
System.group1.c omponent[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.sourcef orge.net) or Yaml ( http://yaml.org), but not the XML.
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
Joseph Kesselman <ke************ @comcast.netwro te 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. mc****@poczta.o net.pl wrote in news:1c007e07-aee4-4d5e-a97e-d7e3f0619931
@t1g2000pra.goo glegroups.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.sourcef orge.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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 chips?
DDR
SDR
|
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, and their underlings,
and .... For that matter, I don't even know how to find everyone in her
organization (at all levels).
- All individuals have only one manager
- Tasks are assigned to individuals
- A manager at any level may have direct...
|
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 ("Pear");
Basket.Items.Add(item);
//------
|
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, but I need to set this "sendusing" attribute and don't know
the syntax for doing it in C#. Thanks!!
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = Server.CreateObject("CDO.Configuration")
|
by: rdcpro |
last post by:
In reading MSDN docs on creating custom Configuration sections, I found this
page:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfcustomelementfornamevaluesectionhandlerdictionarysectionhandler.asp
At the very bottom, it says:
Configuration File
This element can be used in the application configuration file, machine
configuration file (Machine.config), and Web.config files that are not at the
| |
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 Error in '/QuickStartv20' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file
|
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
added or the Production Manager when some other event has happened.
For these notes I use a little Instant Messaging system I built into
our database, that I call TMail. It allows quick messages to be sent
around from person to person, without...
|
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, but my department has
a couple of web servers of our own that are part of my organization's
domain. I am trying to read LDAP information on my organization's
domain controller from a web application on one of my department's
servers. I have been...
| |
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
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...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |