I was thinking of this layout:
Presenter class that will handle interaction between model and view
ViewController class with methods to interact with the UI
Model package with:
- Repository that is going to contact the database and get me the needed information
- Dijkstra class that is going to handle calculating shortest path between 2 nodes.
Instantiating View => generating the UI
Instantiating Presenter => initializing the View with data that I get from the model, adding presenter as a button handler for view and adding presenter as an observer of Model
Instantiating Model => creating an instance of dijkstra and repository.
any idea how to optimize this ?