Refactoring – Dependency Inversion Principle (DIP) Applied To JobMan

Already in the previous posts I have moved the Database to an interface where JobDatabase interacts with abstract base classes of Job and SpawnableJob. Meaning that neither Databases are dependent of details of implementions of Job and SpawnableJob and conversely they are not dependent the JobDatabase class as this is declared through interfaces. So the resulting structure is now:

I also renamed the currently implemented JobDatabase to JobDataBaseDB4OEmbedded.

Leave a Reply

Your email address will not be published. Required fields are marked *