Question
December 29, 2007 at 08:03 AM
progress_dba

OO Design

by progress_dba . Updated 18 years, 8 months ago

Hello,

Language is C#, .net 2.0.

What I’m building is an app that will do the following:

1) Read a param file for parameter values such as directory paths and email server IP address.
2) Monitor a file system for any files that are placed there and take action when they arrive.
3) When they arrive read the .xml files for data to send and email (i.e. TO,From,Subject,etc.)
4) Send the email.
5) Move the .xml file out of the current directory to an archive directory.

This app would be a Windows Service or an app that runs like one having a Start and Stop mechanism to start and stop the monitoring.

This is all well and good and I can get to work , no problem. My question is how would I design this in an OO fashion? I’m an old top-down guy so I’m having a hard time seeing the design. An example would be that I would normally call a function/subroutine to gather the parameter data and use that data throughout the rest of the app. Sounds like global data which I understand is a big OO no-no. Would this type of app have just one class and all methods would be the tasks I’ve listed above?

Any help teaching this Old dog new tricks would be most appreciated, ;-).

Thanks,
T.

This discussion is locked

All Comments