473,322 Members | 1,671 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,322 software developers and data experts.

going class crazy, is this the right way?

I am writing an app using FileSystemWatcher and just went a little class
crazy.

I have the following classes
Server
MasterServer inherits server
SlaveServer inherits server
SiblingServer inherits server

I also have the following collections
ServerCollection
MasterServerCollection
SlaveServerCollection
SiblingServerCollection

As an experienced .Net programmer who understands classes would you design
it the same way?

The classes are real light as far as code goes.
Server just has a ServerPath property for the Path to monitor This should
probably be an array for multiple paths

MasterServer inherits Server and just has a SlaveServer property that is
supposed to be a collection of SlaveServer objects

Am I on the right track?

Thanks
zack
Nov 20 '05 #1
1 978
There often is no "right" way to design a set of classes. imho, you should
derive new classes from your base classes when you expect the functionality
to diverge as development progresses. However, I often create new classes
from collections just so I can avoid having to cast the objects to know
types when I use them. Consequently, I do have rather a lot of classes with
not much code in my program.

"Zack" <zb*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I am writing an app using FileSystemWatcher and just went a little class
crazy.

I have the following classes
Server
MasterServer inherits server
SlaveServer inherits server
SiblingServer inherits server

I also have the following collections
ServerCollection
MasterServerCollection
SlaveServerCollection
SiblingServerCollection

As an experienced .Net programmer who understands classes would you design
it the same way?

The classes are real light as far as code goes.
Server just has a ServerPath property for the Path to monitor This should
probably be an array for multiple paths

MasterServer inherits Server and just has a SlaveServer property that is
supposed to be a collection of SlaveServer objects

Am I on the right track?

Thanks
zack

Nov 20 '05 #2

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

Similar topics

2
by: Jonas Cord | last post by:
Hi, I'm trying to learn proxy classes in C++ so I've written the following code, trying to modify an example given in Deitel & Deitel's C++ book. I am trying to "hide" details of the original...
0
by: Jay Douglas | last post by:
I am trying to do an HTTP POST to a webpage from a DLL. The webpage is easily called, and a response is given. However, the web page is not receiving the POSTed variables. None of them. ...
0
by: Diego F. | last post by:
I've been days with that. I'm trying to work with web services sending and returning objects, and the web service must store some objects. - My first try (the most obvious in my opinion) was to use...
3
by: Larry Tate | last post by:
I have had a monstrous time getting any good debugging info out of the .net platform. Using ... ..NET Framework 1.1 Windows 2K Server VB.NET <- is this the problem? error handling in the...
6
by: thomas.luce | last post by:
Okay, I have been programming for a long time, and am getting back into C after about a 4 year break from it. Below is some code that won't compile for the life of me, and it is driving me crazy!...
15
by: manstey | last post by:
Hi, I have a text file called a.txt: # comments I read it using this:
11
by: shapper | last post by:
Hello, I am creating a centered web site with various div's inside the main (pBase) div. Somehow, I am getting a gap on the top of my browser window both in IE and Firefox. I tried...
1
by: shapper | last post by:
Hello, I have a class where I created various controls. One of the controls have a property which is a generic list of WebControl. Then in web site page I have something like: Dim a As New...
10
by: shapper | last post by:
Hello, I have a custom control under namespace MyNameSpace.WebControls with a property of type validation: ' Validation Private _Validation As Validation < _ Bindable(True), _...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
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)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.