It seems like the MVC for TouchTracker is wrong. The view is interfacing directly with the model, and the controller isn’t doing much of anything. I understand this is a simple app, but I’ve always struggled with how to properly implement MVC with drawing code.
I created a BNRGeometryStorage class that stores the linesInProgress and finishedLines. This class will archive/unarchive the data. My question is shouldn’t the BNRDrawViewController be doing most of the work here (i.e. passing the data from storage to the BNRDrawView and creating new BNRLines to add to the BNRGeometryStorage as touch events come in)? I’m not sure what the proper pattern is though. Should the BNRDrawView event handling calls (e.g. touchesBegan:withEvent: call methods on BNRDrawViewController? Or should this use the Notification Pattern–where these events create notifications that the BNRDrawViewController responds to (i.e. so the view is loosely coupled from it’s controller).
If one were to implement this challenge using “proper” MVC patterns, how would the classes interact?