By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,662 Members | 1,141 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,662 IT Pros & Developers. It's quick & easy.

Please advise

P: n/a
GTi
What is the best method for doing this:

Connection class containing:
- Connection handle
- Connection name
- connection properties
- disconnection of connection

Group class containing:
- connection handle
- group handle
- group name
- group properties
- disconnection of group

Item class containing:
- connection handle
- group handle
- item handle
- item name
- item properties
- disconnection of item

A Connection can contain 1...n groups and
a group can cointain 1...n items.
It looks like a tree.

What is the best design of this class?
Examples og URL with samples is prefered since I am a novice.

Best regards
GTi

Nov 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
GTi
And I must be able to search for a item based on:
- the group + item handle
- connection + group + item name

Nov 17 '05 #2

P: n/a
Hello GTi,

You dont have advise about designing this class but I suggest to build it
around XmlDocument.
This way you`ll have
1. Tree like structure
2. Searching capabilties using XPath
3. You could implement each element (such a group or connection) as node
element.
4. This class could be serizlized very easy since all class structure(important
pieces) should be there already.

Hope it helps,
Oleg
And I must be able to search for a item based on:
- the group + item handle
- connection + group + item name

Nov 17 '05 #3

P: n/a
GTi
Oleg,

XmlDocument make me think about files.
This handles is connections handles to other computers (DCOM). I don't
need to save it in a file, just in memory. But maybe i'm wrong.
Was thinking of crating a class and using SortedLists but if there is
utillity that is better...
Will have a look on it.

Nov 17 '05 #4

P: n/a
Hello GTi,
When I was saying XmlDocument I didnt mean to use it as a file but just as
in memeory tree representation which will siplify your managment.
Oleg,

XmlDocument make me think about files.
This handles is connections handles to other computers (DCOM). I don't
need to save it in a file, just in memory. But maybe i'm wrong.
Was thinking of crating a class and using SortedLists but if there is
utillity that is better...
Will have a look on it.

Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.