Skip to content
This repository has been archived by the owner on Jul 26, 2019. It is now read-only.

Logic is not closed for modification #75

Open
okkhoy opened this issue Mar 1, 2017 · 0 comments
Open

Logic is not closed for modification #75

okkhoy opened this issue Mar 1, 2017 · 0 comments

Comments

@okkhoy
Copy link
Contributor

okkhoy commented Mar 1, 2017

In the current implementation, logic is calling initializeStorage() method which creates the storage file object. For LO-DIP and later LO-OCP we explain the following:
Using DIP and making StorageFile extend Storage helps OCP as well, because, we can pass any object that is Storage and logic should pick it up.
As long as initializeStorage() is creating the correct type of storage object inside Logic, logic is not closed for modification.
I suggest we move creating the storage object to MainWindow and call Logic::setStorage from there to set the underlying storage.

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