Skip to content
This repository has been archived by the owner on Oct 31, 2018. It is now read-only.

Remove Interface Abuse - Rise of the Services #38

Open
khionu opened this issue Dec 19, 2016 · 0 comments
Open

Remove Interface Abuse - Rise of the Services #38

khionu opened this issue Dec 19, 2016 · 0 comments
Assignees
Milestone

Comments

@khionu
Copy link

khionu commented Dec 19, 2016

The IMessageAction interface approach is inefficient. A service would be much more clean. .Enable(string key) being one example of what can be done with a service. This will also allow MessageHandlers to be toggled via command.

Also, I suggest turning the ContactsBot class back into the Program class, while breaking everything out of it, turning AsyncMain into a function that does nothing more than initialize all the services of the bot. Turning the root functionality into a class seems useless, without the bot being a component of a greater whole.

The bot should be, in essence, a collection of services that work with each other and for each other. The root should reflect that. If it becomes "too large", it can be broken down into stages, each stage it's own method in Program

@ObsidianMinor ObsidianMinor self-assigned this Dec 20, 2016
@ObsidianMinor ObsidianMinor added this to the v3.0 milestone Dec 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants