BackingStore Has Too Many Responsibilities ⟶ Interface

BackingStore, while now maintained in isolation from UserDB, still has many responsibilities - it is used to write both “binary” and “CSV” file formats.

This is a violatin of the “Open/Closed Principle”!

Create an interface, and move the branches from the two switch statements into the respective methods of the two implementations.

../../../../../../../_images/backingstore-interface.png