I have designed a radio channel monitoring system in .net which updates a playlist at spotify with songs recognized from the broadcast. Now, I'm a little skeptical about the way I designed the system. my current design looks like this:
BaseChannel - abstract base class that is responsible for monitoring a channel (must be inherited from in order to provide data about a channel)
SpotifyChannel - this class is inheriting from BaseChannel in order to provide an abstraction for the spotify playlist support. All spotify logic is inside this class. (soon I would want to add support for apple music service, so another inherited class)
BBCChannel - a radio channel that inherits from SpotifyChannel in order to start monitoring the channel and update a spotify playlist.
The BaseChannel class has three protected properties which define it as a channel, so the whole oop concept here is to inherit from SpotifyChannel and provide these three properties and initialize the class in order to start working.
I tried multiple ways to redesign with no luck, i'm looking for a design pattern that could simplify things.
Aucun commentaire:
Enregistrer un commentaire