Ever heard of MVC?

Yes, its massive view controller 🙂 some call it and its true, because a lot of logic get placed in the view controller only. so today we are trying to convert it into MVVM, yes its Model-View-ViewModel.

first of all here is typical setup of MVC.


Model represent data, views represent user interface and view controller mediate the interaction between two of them.

So there thing about that view and view controller are typically distinct components and they almost go together – tightly coupled. but a view could be paired with different view controllers or vice-versa. so why not formalise their connection.


There are few things that we only need in view controller like presentation logic.  so make it more clear lets add it into flow.


i know its looking much better now. its an argumented version of MVC where we move presentation logic out of the controller into a new object – the view model. The motivation behind that is reduce the complexity of view controller.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.