November 2019
Beginner
804 pages
20h 1m
English
Now that we have created our implementations, we need to leverage those.
We first need to instantiate the view:
const view = new HTMLTodoListView();
Then, we also need to create an instance of our controller, TodoIt:
const todoIt = new TodoIt(view);
Here, we pass a concrete implementation of the view interface, but our controller doesn't know and doesn't care. All it cares about is that it gets something that is compatible with the interface.
Read now
Unlock full access