Upload
eleksdev
View
1.356
Download
0
Embed Size (px)
Citation preview
eleks.com eleks.com
MVC / MVP / MVVM patternsDivide 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 layersDuring 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 creationThe 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.
AdaptorIf 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
MVCCONTROLLER
MVCMODEL
MVCVIEW
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
MVPVIEWdeclaration
MVPVIEWimplementation
MVPPRESENTER
MVPMODEL
MVVM SMAPLE
WPF demo project. Demonstrate basic principals of work with WPF in MVVM way
Main points:BindingsProgram initializationUsage samples of common used classes
GitHub:https://
github.com/mishani0x0ef/Wpf.Demo
MVVMMODEL
MVVMVIEWMODEL
MVVMVIEW
Thanks! Any Questions?
eleks.com
Inspired by Technology.Driven by Value.