@slodge
MvvmCross
Gitte Vermeiren
@gittetitter
proq.blogspot.com
@slodge
@slodge
Can we do this?
Portable
Class
Libraries
Xamarin MvvmCross
@slodge
Portable Class Libraries
@slodge
@slodge
Profile 104
• WPF – 4.5+
• Windows Store (WinRT)
• Windows Phone – 7.1+
• Xamarin.Android
• Xamarin.iOS
@slodge
Xamarin
@slodge
Xamarin for Android/iOS
Business Logic
UI Logic
WP iOS Droid Win8
Data Access
Business Logic
Service Interface
Service Consumption Local Data/Services
Xamarin
@slodge
Xamarin for Android/iOS
Code
Completion
for Native
APIs
Visual Studio
Integration
Advanced
Debugging
Support
Point and
click UI
design
@slodge
Xamarin for Android/iOS
@slodge
MvvmCross
@slodge
View
ViewModel
Model
get/set
Properties
call Commands
notify changes
some messaging
Whatever C# you
like …
… messages work
well!
View
View
ViewModel
ViewModel
Model
Model
Cross Platform
Platform
Specific
@slodge
Separation
of Concerns
Designable
(Blend)
More
structured
code
TestableDatabinding
Code reuse
@slodge
Data Binding
@slodge
INotifyPropertyChanged
@slodge
Typical ViewModel Property
@slodge
One Way Binding
PersonViewModel
FirstName
LastName
DateOfBirth
First Name
Jon
Last Name
Doe
Date of birth
12/07/1989
@slodge
UI Syntax
@slodge
Two Way Binding
PersonViewModel
FirstName
LastName
DateOfBirth
First Name
Jon
Last Name
Doe
Date of birth
12/07/1989
@slodge
UI Syntax
@slodge
Interface Driven Development
@slodge
MyViewModel
Needs Location
Needs SQL
Needs Calculator
The
Container
My Tax
Calculator
Windows Phone
Location
Inversion of Construction
(Inversion of Control)
Windows Phone
SQL
@slodge
MyViewModel
Needs Location
Needs SQL
Needs Calculator
The
Container
My Tax
Calculator
iOS Location
Inversion of Construction
(Inversion of Control)
iOS SQL
@slodge
Mvx.Register<T>
The
Container
(Mvx)
@slodge
Automatic Registration
@slodge
Mvx.Resolve<T>
@slodge
Mvx Construction
• Constructor resolution
@slodge
Nuget packages
@slodge
TipCalc Demo

Mvvm crossevent basics

Editor's Notes

  • #2 Hi, a verygoodmorning, I hope you’reall ready for a daypackedwith demo’s on howtobuild cross platform mobile applicationswithmvvmcross. I am Gitte, and I work as a software consultant in Belgium. I have been writing mobile applicationsforsome time now and have been playingaroundwithXamarinforabout 2 years.A couplemonths back I alsodiscoveredmvvmcross as a great way touse the mvvmpatternacross multiple platforms. Using mvvmwhenyoubuildapplicationsfor multiple platforms is, in my opinion, a goodchoice, and mvvmcrossgivesyou a big part of the plumbingyouwillneedto get startedquickly. I spoke on thisduringthisyearstechdaysbe event, hostedby Microsoft. And we alsowrote the official techdaysbeappforthis event forwindowsphone, windows 8 and android, with the use of mvvmcross of course. Now, today I willbetalkingtoyouabout the basics of gettingstartedwithboth the mvvmpattern and mvvmcrossspecifically. As Stuart justtoldyou, later today we will go into more of a deepdivewithtalksabout more advanced user interfaces, navigation, using and writingplugins and so on. But let me first giveyou the basics.
  • #3 Let me first askyou the following question, who of you is familiarwithmvvm? As in: yup, I’vedone a project usingthispattern.Who of you is familiarwithmvvmcross? As in, yup, I’vebuildanappwithmvvmcross.
  • #4 Let me first askyou the following question, who of you is familiarwithmvvm? As in: yup, I’vedone a project usingthispattern.Who of you is familiarwithmvvmcross? As in, yup, I’vebuildanappwithmvvmcross.
  • #7 Other profile = 78
  • #9 Point and click UI designCode Completion for Native APIsAdvanced Debugging SupportVisual Studio Integration
  • #10 AccountsAddressBookAdSupportAudioToolboxAnimationBluetoothGraphicsCoreImageLocationsMediaCoreMotionSqlLiteDrmGesturesGoogleMapsHardwareUsbNfcOpenglSaxSpeechWallpaperTextServiceWidgetNet.HttpNet.WifiTelephonyCoreVideoGameKit
  • #11 Separation of ConcernsDesignable (Blend)TestableCode ReuseComplexityMore Code