eleks.comeleks.com
MVC / MVP / MVVM patterns
Divide et impera
MV* FAMILY
Model-View-Controller (MVC)
View
Controller Model
User Input
Modifies
Updates
Model-View-Presenter (MVP)
View
Presenter Model
Passes control
Manipulates
Fires events
Updates
Model-View-ViewModel (MVVM)
ViewModel
View Model
Data binding
Data binding
Contains
Where
Why
Separation into layers
During the development process,
developers and designers can
work more independently and
concurrently on their components.
The designers can concentrate on
the view they can easily generate
sample data to work with, while
the developers can work on the
view model/controller/presenter
and model components.
Easy test creation
The developers can create unit
tests for the view model and the
model without using the view.
The unit tests for the view model
can exercise exactly the same
functionality as used by the view.
UI independency from
business logic (MVVM)
It is easy to redesign the UI
of the application without
touching the code because
the view is implemented
separately. A new version of
the view should work with
the existing view model.
Adaptor
If there is an existing
implementation of the model that
encapsulates existing business
logic, it may be difficult or risky to
change. In this scenario, the view
model acts as an adapter for the
model classes and enables you to
avoid making any major changes
to the model code.
MVС SMAPLE
MVC sample is basic app which stores and display all stranger
that come.
For more information about ASP.NET MVC follow here:
http://www.asp.net/mvc
MVC
CONTROLLER
MVC
MODEL
MVC
VIEW
MVP SMAPLE
MVP sample used form msdn.
Describes step by step MVP implementation
For full description follow here:
https://msdn.microsoft.com/en-us/library/ff649571.aspx
MVP
VIEW
declaration
MVP
VIEW
implementation
MVP
PRESENTER
MVP
MODEL
MVVM SMAPLE
WPF demo project. Demonstrate basic
principals of work with WPF in MVVM way
Main points:
Bindings
Program initialization
Usage samples of common used classes
GitHub:
https://github.com/mishani0x0ef/Wpf.Demo
MVVM
MODEL
MVVM
VIEWMODEL
MVVM
VIEW
Thanks! Any Questions?
eleks.com
Inspired by Technology.
Driven by Value.

Mvvw patterns