Download - 4 steps to great xplat apps (M
4 steps to great x-plat
appsAlexey Strakh
Alex Sorokoletov
Hey, we’re Alexey and Alex
• Certified Xamarin Developers
• Microsoft MVP
• Multiple apps with Xamarin and MvvmCross
• Recent example - one solution with
iOS/Android/WindowsPhone/WPF
Alexey Strakh @AlexeyStrakh
Alex Sorokoletov @AlexSorokoletov
Step 1. Use MVVM
MvvmCross is the way
1.Crossplatform
2.Lots of components baked in
3.Proven solution
4.Extendable and opensource
5.Crossplatform glue between view and
viewmodels
Step 2. Reuse the code
1. PCL
2.Solution structure
3.App structure
Use PCL
• Lots of 3rd party components (nuget)
• Flexibility
• One place
• Less efforts to maintain code
Proven solution structure
• App.Core project (Shared code)
• App.Android project (sometimes App.Droid)
• App.iOS project
• App.OtherPlatform projects
Mvx app structure
• Components
• Startup
• Navigation
• Presentation layer
App.cs code
MvxSetup.cs
AppDelegate.cs
Maximize shared code
Top reused things in crossplatform applications:
• Icon
• Splash
• Title
• Description
Wait!… What about code?
Demo 1Hello, x-platform world
Step 3. Databind your UI
Views and ViewModels
Mvx bindings
1.Declarative
2.Code-behind
3.iOS/Android/WP/WPF/Mac/Silverlight
Demo 2Bindings
Step 4. Use platform features
• Facebook native authentication
• Photos and camera access
• Push notifications
• Mail composer
• Background execution
Platform-specific services
1.Register
2.Resolve
MvvmCross plugins
• Location
• Phone dial
• Picture chooser
• Compose email
• Vibrate
• Sqlite
• Social authentication
• Many other at drmtm.us/mvxplugins
Demo 3Real API integration
Advanced topics
• View presenters
• Custom views
• Custom bindings
• Mvx app lifecycle
Stay in touch
@AlexeyStrakh
@AlexSorokoletov
MvvmCross:
github.com/MvvmCross
stackoverflow.com/questions/tagged/mvvmcross