As part of refreshing my skills I have started a Jpassion.com course ‘Design Patterns’.
So I can practice what I am learning I decided to update an unfinished project titled WhitestarMediaLibrary (2009). It was originally for a DVR project as WINTV, at the time, was unreliable. This is not an issue since I moved to Linux and Mythtv does everything I want with the exception of the music library. The name Whitestar comes from the Babylon5 universe and all my media centre pc’s have carried the name, I am now on Whitestar9.
Anyway, this media manager is to have the following functions:
- Manage 4 types of media; TV, Film, Music and Games
- Pull metadata from the internet
- Group classifications of genres. When I want to find Rock tracks I don’t want to search for every type of rock i.e soft metal, Hard Rock, thrash etc. I want to click on rock and it return all the tracks in that category.
- Provide facilities such as playlist creation.
Below is a class diagram of the current implementation.
There are some classes missing here. In particular, extended Whitestarmedia classes for music and game that have been created with attributes specific to those types.
So to begin with,and for the next few posts, I will take this back to basics and review this project using SOLID principles (Single Responsibility Principle (SRP), Open Closed Design Principle, Liskov Substitution Principle ,(LSP) Interface Segregation Principle, Dependency Inversion Principle).