asp.net mvc vs ios mvc subtle difference

We all know what is the basic definition of MVC whose main aim is separate your application into three main components giving separation of concerns, ease of testing and maintainability.In short M stands for Model (domain object/ logic on the application data) , V(View) shows the UI to the user. This UI is typically created from the model data and C (Controllers) handle user interaction, work with both the model and view. The picture below is from a typical asp.net mvc app.

aspmvc

If you closely follow the arrow marks, it shows that controller has interaction with both View and a Model, View has interaction with a Model, and Model does not interact with anybody. So this means that you can have any backend database (oracle/sql server/mysql/nosql) and the V/C does not care.

Here is a similar diagram for the ios MVC . The variables M,V, C still mean the same thing as MVC is an architectural pattern. Once again if you closely follow the arrows (ignore the additional arrows since thats not relevant to our current discussion), you see that there is no arrow between a view and model in an ios app. The controller is the main central piece which does the talking with both model and the view through target/action.

iosmvc

Also if the model’s state changes, it notifies the controller and then the controller updates the view.Controller objects can also perform setup and coordinating tasks for an application and manage the life cycles of other objects.

Leave a comment