Im currently developing software as an intern at a VoIP company. I'm creating a VoIP Client for iOS using the MVC pattern.
I've a pretty good grasp on MVC, and I'm aware of the fact that this question is asked a million of times, but I'm stumped as to where "intelligence" in my example should go.
Example: App ask for user credentials, stores these in model, lets say (bool)setUsername(string usr). Model saves username to NSUserDefaults, password to Keychain. Controller couldn't be bothered where Model persists this data. Controller acts as latch for View and Model and also handles input events (eg button press). Now, using this information, the app would like to register on a server and some time later make a call.
Where in the MVC would this functionality ( registerUser(), makeCall() ) go? My guess would be Controller, since Model is for persisting and computing on data and not for any other intelligent behaviour, but I'm still in doubt.
My answer is also Controller. But sometimes you may feel confused when you use MVC pattern, because there is some code you do not know where to put. You can try MOVE pattern, Models (model), Operations (operations), Views (View) Events (event).Conrad Irwin's blog shared some views on this pattern.http://cirw.in/blog/time-to-move-on