Design guidelines advice - IRC Bot class
I'll start of by saying that I'm a C programmer going to C#. That is, procedural and imperative to extreme OOP and generic programming.
Therefore I come here to seek advice.
I'm working on an IRC bot class. Obviously, coding an irc bot is not hard at all, but coding it so it is generic and not specific to my application is something much different. I have not really sat down and spent time on trying to program something generic, so I thought this could be a good exercise.
I have a few ideas that might be good:
- Use events to handle stuff - connection failed, connection succeeded, perhaps even data received..
- Create some kind of an interface to add commands, using classes
- Use exception handling to deal with failed stuff, which then call the event handlers for that event.
I had a few more, I think, but they fell out. Any ideas, suggestions, etc? I don't want to start coding too much before I know what's good to do and how far I should go to implement stuff etc.
All input greatly appreciated.
Just to clarify, the hard part in this for me is knowing where to draw the line between application specific and class specific. Eg. I can't implement a method in the class that sends stuff to my WPF controls; I should rather let the user handle the events and then he can deal with the output himself - right?