3. Introductions
Ross Dargan
@rossdargan
Ross.dargan@Waterstons.com
Work at Waterstons in Durham
New to keynote transitions (sorry!)
C# Developer for 10 years
Cross platform mobile for 2 years
Dad of 3
Husband to 1
Uses the 1Sec application
4. What we will cover
Quick overview of the problem MVVMCross solves
A look at alternative UI patterns
An intro to MVVM
A look at MVVMCross
5. “The difference between a Designer and
Developer, when it comes to design skills, is the
difference between shooting a bullet and throwing
it.”
–Scott Hanselman
6. Xamarin
iOS C# UI Android C# UI Windows C# UI
Shared App Logic
Shared App Logic in C#
9. Old School UI Updating
Very tedious code
Huge amounts of boiler plate
code duplication
Any Complex UI validation
code can’t be easily re-used
Very hard to test the UI code
11. UI Design Patterns
MVC more for stateless apps (and iOS :/)
MVP gives you testability, still needs a lot of boiler
plate code
MVVM boiler plate code replaced with bindings
12. A brief history of Mvvm
Introduced in 2005
Based on Martin Fowlers
presentation model
Created by John Gossman
(WPF and Silverlight
architect)
14. Mvvm
Views Tests
View Models
Models (Domain layer/services)
Exposes an event (defined in
an interface)
15. Mvvm
Views Tests
View Models
Models (Domain layer/services)
Subscribes to the event so it
knows when properties are
updated
16. Data context
Specifies the viewmodel to use for all bindings at
the top level
Data context is normally inherited (lists are the
exception)
17. Bindings
Specifies a mapping between a property on a UI
control, and a property on a VM
Can be one-way, two-way or several other
infrequently used options
Can have a fallback value
Can use a convertor (bool property on a VM, can
become a visibility)
18. Commands
Provides a way to notify the VM that something has
happened on the UI (button press for example)
Can accept a parameter
22. MvvmCross
Primary contributor is
@slodge (Stuart)
Started in December 2010
Now well into a stable 3rd
revision
Well supported for an open
source project
23. MvvmCross
Mvvm is support natively by
WPF
WinStore
WinPhone
Silverlight