Without further ado, let's implement a small program using this architectural pattern. It will be a command-line tool independent of AppKit or UIKit.
We'll build a small question/answer game, by decoupling every component in a proper Model-View-Controller manner.
First, we'll implement the model layer, with all of its components, including a model controller, which helps to implement parts of the loading logic.
Second, we'll take a look at the view layer, implemented with the help of a view controller and views. The view controller helps to organize the logic around the views on screen.
Finally, we'll tie the program together, with a controller responsible for organizing the logic between the view layer and the model layer.