http://www.codeproject.com/Articles/228214/Understanding-Basics-of-UI-Design-Pattern-MVC-MVP
http://www.codeproject.com/Articles/66585/Comparison-of-Architecture-presentation-patterns-M
http://martinfowler.com/eaaDev/uiArchs.html
Basically, view (UI) and model (data) are the same for all these patterns. difference lies in the last part.
View
- does NOT bind to model
- simply renders, is completely stateless
- not have any logic
Controller
- be the first to be directed of the incoming request
- every action in the View basically calls to a controller along with an action; for example, each action is a call to a URL and for each such call there is a controller to respond to the call
- process request and forms a data model
- determine which view is displayed in response to any action including when application loads
- pass the model to the view
- view transforms model to output
P -> V and P -> M, V and M don't know each other directly
V:
- view binds to the model directly through data binding
- action routes through view to presenter
P:
- populate view with data: to pass off the model to the view so that it can bind to it
- react to input: logic for gestures like pressing a button, navigation
- provide validation
View -> ViewModel -> Model
Parts
- Model: business rules, data access, model classes
- View: user interfaces
- ViewModel : agent or middle man between view and model
V:
- binds its control value to properties on a VM (for example, a component is configured with a binding name referring a property of the VM)
- view will change is VM property value change, via binding and notification
- view action (click a button click), executes a command on VM
VM:
- interface between model and view
- holds state and implements behaviour of the view
- provide data binding between view and model
- handles all UI actions by using command
- does not need reference to a view (view binds to VM via binding)
- executes a command to perform a requested action
- modifies model data
Differences between MVVM and MVP
http://joel.inpointform.net/software-development/mvvm-vs-mvp-vs-mvc-the-differences-explained/