SlideShare a Scribd company logo
1 of 30
Xamarin & MvvmCross
in depth
Nicolas Milcoff (aka @nmilcoff)
Microsoft MVP - MvvmCross Maintainer
Agenda
▣ MVVM pattern recap
▣ Why to use an Open Source MVVM framework?
▣ MvvmCross
▣ Framework goodies
▣ Demos
▣ Q & A
The MVVM Pattern
MVVM benefits
▣ Highly decoupled components
▣ Code sharing ++
▣ Scalability
▣ Working in parallel made easy
▣ Stable and proven pattern
Open Source (MVVM) Frameworks
▣ Abstractions discussions --
▣ Barriers for new developers --
▣ Requirements focus ++
▣ Time saving ++
▣ Inputs from multiple developers / teams ++
App development
without compromise
MvvmCross
Supported Platforms
▣ Xamarin.Android, Xamarin.iOS
▣ Xamarin.Mac, Xamarin.tvOS
▣ UWP, WPF
▣ Tizen (WIP)
▣ Console!
▣ Xamarin.Forms
Features in a nutshell
▣ ViewModel first Navigation
▣ Data Bindings, Commands and Converters
▣ IoC Container / DI engine
▣ Platform specific widgets
▣ Unit Test Helpers
▣ Plugins
▣ Complete flexibility!
ViewModels
▣ Implement INotifyPropertyChanged
▣ Lifecycle:
□ void Prepare(MyObject parameter)
□ Task Initialize()
□ void Appearing(), void Appeared()
□ void Dissapearing(), void Dissapeared()
□ void ViewDestroyed()
□ void SaveStateToBundle(IMvxBundle bundle)
□ void ReloadFromBundle(IMvxBundle bundle)
Navigation in MvvmCross
Navigation in MvvmCross
▣ All logic remains in the shared code
▣ ViewPresenters for each platform
▣ Presentation attributes for declaration
▣ Presentation Hints for behavior
▣ 100% customizable
Navigation in MvvmCross
public class RootViewModel : MvxViewModel
{
private readonly IMvxNavigationService _navigationService;
public RootViewModel(IMvxNavigationService navigationService)
{
_navigationService = navigationService;
}
private async Task OpenModalAsync()
{
await _navigationService.Navigate<ModalViewModel>();
}
}
Navigation in MvvmCross
[MvxContentPagePresentation(WrapInNavigationPage = true)]
public partial class RootPage : MvxContentPage<RootViewModel>
{
// your code
}
[MvxModalPresentation]
public partial class ModalPage :
MvxContentPage<ModalViewModel>
{
// your code
}
DEMO!
Navigation & ViewPresenters
Data Bindings in MvvmCross
▣ Support for .cs, .xml, .axml, .xaml
▣ Value Converters
▣ Value Combiners
▣ OneWay, TwoWay, OneWayToSource, OneTime
▣ Multiple syntaxes
▣ Support for custom bindings
Data Bindings in MvvmCross
▣ Bindings in .axml (Tibet):
local:mvxBind=“Text MyTextProperty”
local:mvxBind=“Click MyAwesomeCommand”
local:mvxBind=“Checked Inverse(Prop), Mode=TwoWay,
Fallback=False”
Data Bindings in MvvmCross
▣ Bindings in xaml (Tibet):
mvx:Bi.nd="Text MyTextProperty”
mvx:Bi.nd=“Click MyAwesomeCommand”
mvx:Bi.nd=“Checked Inverse(Prop), Mode=TwoWay,
Fallback=False”
Data Bindings in MvvmCross
▣ Bindings in .cs (Fluent):
set.Bind(MyLabel).For(v => v.Text).To(vm => vm.MyProperty);
set.Bind(MyButton).To(vm => vm.MyAwesomeCommand);
set.Bind(MySwitch)
.For(v => v.On)
.To(vm => vm.Prop)
.WithConversion<InverseConverter>()
.WithFallback(false);
DEMO!
Data Binding
IoC Container and DI engine
▣ It’s optional
▣ Service Locator / IoC
▣ Constructor and Property Dependency Injection
▣ Singletons, dynamics, Open Generics, Child
Containers
▣ Bulk registrations
▣ What if I prefer to use $Lib$ instead? Also possible!
IoC Container and DI engine
Source: https://xamarinhelp.com/ioc-container-performance/
DEMO!
IoC Container / DI Engine
Platform specifics
▣ Support for Android.Support packages
▣ Polymorphic lists made easy
▣ Support for background services / push
notifications
▣ iOS Side Menu
▣ Abstraction plugins for most common features
Plugins
▣ Small code pieces that resolve specific situations
▣ Install from NuGet -> Run
▣ Official Plugins: Accelerometer, Visibility, Json,
Color, Localization, Messenger, Email, …
▣ Loads of 3rd party plugins
DEMO!
Plugins
Resources & Documentation
mvvmcross.com
Where our official
documentation lives
github.com/MvvmCross
Official samples and
source code
Slack
xamarinchat.herokuapp.
com. Then join
#mvvmcross
StackOverflow
Ask using the
#mvvmcross tag
Xamarin Forums
Use the official forums
Twitter
Follow and don’t
hesitate to contact
influencers
Get involved!
Support us on
OpenCollective
Contribute on
GitHub
Blog about your
experiences
Use the framework
in your apps
Questions?
Thanks!
Nico Milcoff
@nmilcoff
nicolas.milcoff@d-genix.com

More Related Content

What's hot

Deploying Rails on EC2 using Rubber (Slides Only)
Deploying Rails on EC2 using Rubber (Slides Only)Deploying Rails on EC2 using Rubber (Slides Only)
Deploying Rails on EC2 using Rubber (Slides Only)wr0ngway
 
Mo' servers Mo' problems: Using containers at GetPantheon.com
Mo' servers Mo' problems: Using containers at GetPantheon.comMo' servers Mo' problems: Using containers at GetPantheon.com
Mo' servers Mo' problems: Using containers at GetPantheon.comNick Stielau
 
What the heck is a Umbraco property editor value converter?
What the heck is a Umbraco property editor value converter?What the heck is a Umbraco property editor value converter?
What the heck is a Umbraco property editor value converter?Jeavon Leopold
 
WordPress Meetup at HUBBA Thailand
WordPress Meetup at HUBBA ThailandWordPress Meetup at HUBBA Thailand
WordPress Meetup at HUBBA ThailandTakayuki Miyauchi
 
WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?Alexandr Skachkov
 
Virtualizing MongoDB: Cloud, EC2, OpenStack, VMs...or Dedicated?
Virtualizing MongoDB: Cloud, EC2, OpenStack, VMs...or Dedicated?Virtualizing MongoDB: Cloud, EC2, OpenStack, VMs...or Dedicated?
Virtualizing MongoDB: Cloud, EC2, OpenStack, VMs...or Dedicated?MongoDB
 
WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?Alexandr Skachkov
 
The Evolution Of JavaScript
The Evolution Of JavaScriptThe Evolution Of JavaScript
The Evolution Of JavaScriptMostafa Zaki
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...Tom Croucher
 
Create a RESTful API with NodeJS, Express and MongoDB
Create a RESTful API with NodeJS, Express and MongoDBCreate a RESTful API with NodeJS, Express and MongoDB
Create a RESTful API with NodeJS, Express and MongoDBHengki Sihombing
 
Rocking mongo db on the cloud
Rocking mongo db on the cloudRocking mongo db on the cloud
Rocking mongo db on the cloudMongoDB
 
Knock out Introduction with samples (jsfiddle.net)
Knock out Introduction with samples (jsfiddle.net)Knock out Introduction with samples (jsfiddle.net)
Knock out Introduction with samples (jsfiddle.net)Balakrishnanan Ganesan
 
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migratingWordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migratingJames Stone
 
Server Side Apocalypse, JS
Server Side Apocalypse, JSServer Side Apocalypse, JS
Server Side Apocalypse, JSMd. Sohel Rana
 
Extreme Javascript Minification
Extreme Javascript MinificationExtreme Javascript Minification
Extreme Javascript MinificationDavid Goemans
 
An Introduction to node.js
An Introduction to node.jsAn Introduction to node.js
An Introduction to node.jsnodejsbcn
 
Node.js rulz! JavaScript takes over the full Stack
Node.js rulz! JavaScript takes over the full StackNode.js rulz! JavaScript takes over the full Stack
Node.js rulz! JavaScript takes over the full StackAdron Hall
 

What's hot (20)

Deploying Rails on EC2 using Rubber (Slides Only)
Deploying Rails on EC2 using Rubber (Slides Only)Deploying Rails on EC2 using Rubber (Slides Only)
Deploying Rails on EC2 using Rubber (Slides Only)
 
Mo' servers Mo' problems: Using containers at GetPantheon.com
Mo' servers Mo' problems: Using containers at GetPantheon.comMo' servers Mo' problems: Using containers at GetPantheon.com
Mo' servers Mo' problems: Using containers at GetPantheon.com
 
What the heck is a Umbraco property editor value converter?
What the heck is a Umbraco property editor value converter?What the heck is a Umbraco property editor value converter?
What the heck is a Umbraco property editor value converter?
 
WordPress Meetup at HUBBA Thailand
WordPress Meetup at HUBBA ThailandWordPress Meetup at HUBBA Thailand
WordPress Meetup at HUBBA Thailand
 
WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?
 
Virtualizing MongoDB: Cloud, EC2, OpenStack, VMs...or Dedicated?
Virtualizing MongoDB: Cloud, EC2, OpenStack, VMs...or Dedicated?Virtualizing MongoDB: Cloud, EC2, OpenStack, VMs...or Dedicated?
Virtualizing MongoDB: Cloud, EC2, OpenStack, VMs...or Dedicated?
 
Build App with Nodejs - YWC Workshop
Build App with Nodejs - YWC WorkshopBuild App with Nodejs - YWC Workshop
Build App with Nodejs - YWC Workshop
 
WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?
 
The Evolution Of JavaScript
The Evolution Of JavaScriptThe Evolution Of JavaScript
The Evolution Of JavaScript
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
 
Create a RESTful API with NodeJS, Express and MongoDB
Create a RESTful API with NodeJS, Express and MongoDBCreate a RESTful API with NodeJS, Express and MongoDB
Create a RESTful API with NodeJS, Express and MongoDB
 
Rocking mongo db on the cloud
Rocking mongo db on the cloudRocking mongo db on the cloud
Rocking mongo db on the cloud
 
Knock out Introduction with samples (jsfiddle.net)
Knock out Introduction with samples (jsfiddle.net)Knock out Introduction with samples (jsfiddle.net)
Knock out Introduction with samples (jsfiddle.net)
 
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migratingWordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
 
Node intro
Node introNode intro
Node intro
 
Server Side Apocalypse, JS
Server Side Apocalypse, JSServer Side Apocalypse, JS
Server Side Apocalypse, JS
 
Extreme Javascript Minification
Extreme Javascript MinificationExtreme Javascript Minification
Extreme Javascript Minification
 
An Introduction to node.js
An Introduction to node.jsAn Introduction to node.js
An Introduction to node.js
 
Node.js rulz! JavaScript takes over the full Stack
Node.js rulz! JavaScript takes over the full StackNode.js rulz! JavaScript takes over the full Stack
Node.js rulz! JavaScript takes over the full Stack
 
MongoDB + Node.JS + EPAM ROAD
MongoDB + Node.JS + EPAM ROADMongoDB + Node.JS + EPAM ROAD
MongoDB + Node.JS + EPAM ROAD
 

Similar to Xamarin & MvvmCross in depth

MVP Mix 2015 Leveraging MVVM on all Platforms
MVP Mix 2015  Leveraging MVVM on all PlatformsMVP Mix 2015  Leveraging MVVM on all Platforms
MVP Mix 2015 Leveraging MVVM on all PlatformsJames Montemagno
 
Is OSGi Modularity Always Worth It? - Glyn Normington
Is OSGi Modularity Always Worth It? - Glyn NormingtonIs OSGi Modularity Always Worth It? - Glyn Normington
Is OSGi Modularity Always Worth It? - Glyn Normingtonmfrancis
 
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCrossC# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCrossFlavius-Radu Demian
 
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCrossC# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCrossFlavius-Radu Demian
 
Is OSGi modularity always worth it?
Is OSGi modularity always worth it?Is OSGi modularity always worth it?
Is OSGi modularity always worth it?glynnormington
 
Css3 transitions and animations + graceful degradation with jQuery
Css3 transitions and animations + graceful degradation with jQueryCss3 transitions and animations + graceful degradation with jQuery
Css3 transitions and animations + graceful degradation with jQueryAndrea Verlicchi
 
Geographically Distributed Multi-Master MySQL Clusters
Geographically Distributed Multi-Master MySQL ClustersGeographically Distributed Multi-Master MySQL Clusters
Geographically Distributed Multi-Master MySQL ClustersContinuent
 
Planning to Fail #phpne13
Planning to Fail #phpne13Planning to Fail #phpne13
Planning to Fail #phpne13Dave Gardner
 
Born in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupBorn in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupAmazon Web Services
 
How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..
How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..
How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..Matt Walters
 
Day 4 - Cloud Migration - But How?
Day 4 - Cloud Migration - But How?Day 4 - Cloud Migration - But How?
Day 4 - Cloud Migration - But How?Amazon Web Services
 
Planning to Fail #phpuk13
Planning to Fail #phpuk13Planning to Fail #phpuk13
Planning to Fail #phpuk13Dave Gardner
 
Automating the Entire PostgreSQL Lifecycle
Automating the Entire PostgreSQL Lifecycle Automating the Entire PostgreSQL Lifecycle
Automating the Entire PostgreSQL Lifecycle anynines GmbH
 
Advanced #6 clean architecture
Advanced #6  clean architectureAdvanced #6  clean architecture
Advanced #6 clean architectureVitali Pekelis
 
Loadbalancers: The fabric for your micro services
Loadbalancers: The fabric for your micro servicesLoadbalancers: The fabric for your micro services
Loadbalancers: The fabric for your micro servicesChiradeep Vittal
 
Building WebLogic Domains With WLST
Building WebLogic Domains With WLSTBuilding WebLogic Domains With WLST
Building WebLogic Domains With WLSTC2B2 Consulting
 
Threads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java editionThreads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java editionOvidiu Dimulescu
 
Hazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMSHazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMSuzquiano
 

Similar to Xamarin & MvvmCross in depth (20)

MVP Mix 2015 Leveraging MVVM on all Platforms
MVP Mix 2015  Leveraging MVVM on all PlatformsMVP Mix 2015  Leveraging MVVM on all Platforms
MVP Mix 2015 Leveraging MVVM on all Platforms
 
Is OSGi Modularity Always Worth It? - Glyn Normington
Is OSGi Modularity Always Worth It? - Glyn NormingtonIs OSGi Modularity Always Worth It? - Glyn Normington
Is OSGi Modularity Always Worth It? - Glyn Normington
 
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCrossC# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCrossC# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
C# everywhere - Building Cross-Platform Apps with Xamarin and MvvmCross
 
Is OSGi modularity always worth it?
Is OSGi modularity always worth it?Is OSGi modularity always worth it?
Is OSGi modularity always worth it?
 
Css3 transitions and animations + graceful degradation with jQuery
Css3 transitions and animations + graceful degradation with jQueryCss3 transitions and animations + graceful degradation with jQuery
Css3 transitions and animations + graceful degradation with jQuery
 
Geographically Distributed Multi-Master MySQL Clusters
Geographically Distributed Multi-Master MySQL ClustersGeographically Distributed Multi-Master MySQL Clusters
Geographically Distributed Multi-Master MySQL Clusters
 
Planning to Fail #phpne13
Planning to Fail #phpne13Planning to Fail #phpne13
Planning to Fail #phpne13
 
Born in the Cloud, Built like a Startup
Born in the Cloud, Built like a StartupBorn in the Cloud, Built like a Startup
Born in the Cloud, Built like a Startup
 
How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..
How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..
How to CQRS in node: Eventually Consistent, Distributed Microservice Systems..
 
Day 4 - Cloud Migration - But How?
Day 4 - Cloud Migration - But How?Day 4 - Cloud Migration - But How?
Day 4 - Cloud Migration - But How?
 
Planning to Fail #phpuk13
Planning to Fail #phpuk13Planning to Fail #phpuk13
Planning to Fail #phpuk13
 
Automating the Entire PostgreSQL Lifecycle
Automating the Entire PostgreSQL Lifecycle Automating the Entire PostgreSQL Lifecycle
Automating the Entire PostgreSQL Lifecycle
 
Wcf Overview
Wcf OverviewWcf Overview
Wcf Overview
 
Advanced #6 clean architecture
Advanced #6  clean architectureAdvanced #6  clean architecture
Advanced #6 clean architecture
 
Loadbalancers: The fabric for your micro services
Loadbalancers: The fabric for your micro servicesLoadbalancers: The fabric for your micro services
Loadbalancers: The fabric for your micro services
 
Building WebLogic Domains With WLST
Building WebLogic Domains With WLSTBuilding WebLogic Domains With WLST
Building WebLogic Domains With WLST
 
Threads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java editionThreads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java edition
 
Hazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMSHazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMS
 

More from Nicolas Milcoff

Mobile security recipes for xamarin
Mobile security recipes for xamarinMobile security recipes for xamarin
Mobile security recipes for xamarinNicolas Milcoff
 
Mobile dev ops demystified
Mobile dev ops demystifiedMobile dev ops demystified
Mobile dev ops demystifiedNicolas Milcoff
 
Visual Studio App Center: Nuestro centro de operaciones
Visual Studio App Center: Nuestro centro de operacionesVisual Studio App Center: Nuestro centro de operaciones
Visual Studio App Center: Nuestro centro de operacionesNicolas Milcoff
 
Desarrolla tu próxima app con Xamarin & MvvmCross
Desarrolla tu próxima app con Xamarin & MvvmCrossDesarrolla tu próxima app con Xamarin & MvvmCross
Desarrolla tu próxima app con Xamarin & MvvmCrossNicolas Milcoff
 
Guia de supervivencia mobile para el desarrollador .NET
Guia de supervivencia mobile para el desarrollador .NETGuia de supervivencia mobile para el desarrollador .NET
Guia de supervivencia mobile para el desarrollador .NETNicolas Milcoff
 
Build your next app with MvvmCross 6
Build your next app with MvvmCross 6Build your next app with MvvmCross 6
Build your next app with MvvmCross 6Nicolas Milcoff
 
Tech Day Rosario 2017: Open Source for the win!
Tech Day Rosario 2017: Open Source for the win!Tech Day Rosario 2017: Open Source for the win!
Tech Day Rosario 2017: Open Source for the win!Nicolas Milcoff
 
Open Source for the win!
Open Source for the win!Open Source for the win!
Open Source for the win!Nicolas Milcoff
 
ViewPresenters in MvvmCross
ViewPresenters in MvvmCrossViewPresenters in MvvmCross
ViewPresenters in MvvmCrossNicolas Milcoff
 
Going pixel perfect with Xamarin and MvvmCross
Going pixel perfect with Xamarin and MvvmCrossGoing pixel perfect with Xamarin and MvvmCross
Going pixel perfect with Xamarin and MvvmCrossNicolas Milcoff
 

More from Nicolas Milcoff (11)

Mobile security recipes for xamarin
Mobile security recipes for xamarinMobile security recipes for xamarin
Mobile security recipes for xamarin
 
Mobile dev ops demystified
Mobile dev ops demystifiedMobile dev ops demystified
Mobile dev ops demystified
 
GraphQL en .NET
GraphQL en .NETGraphQL en .NET
GraphQL en .NET
 
Visual Studio App Center: Nuestro centro de operaciones
Visual Studio App Center: Nuestro centro de operacionesVisual Studio App Center: Nuestro centro de operaciones
Visual Studio App Center: Nuestro centro de operaciones
 
Desarrolla tu próxima app con Xamarin & MvvmCross
Desarrolla tu próxima app con Xamarin & MvvmCrossDesarrolla tu próxima app con Xamarin & MvvmCross
Desarrolla tu próxima app con Xamarin & MvvmCross
 
Guia de supervivencia mobile para el desarrollador .NET
Guia de supervivencia mobile para el desarrollador .NETGuia de supervivencia mobile para el desarrollador .NET
Guia de supervivencia mobile para el desarrollador .NET
 
Build your next app with MvvmCross 6
Build your next app with MvvmCross 6Build your next app with MvvmCross 6
Build your next app with MvvmCross 6
 
Tech Day Rosario 2017: Open Source for the win!
Tech Day Rosario 2017: Open Source for the win!Tech Day Rosario 2017: Open Source for the win!
Tech Day Rosario 2017: Open Source for the win!
 
Open Source for the win!
Open Source for the win!Open Source for the win!
Open Source for the win!
 
ViewPresenters in MvvmCross
ViewPresenters in MvvmCrossViewPresenters in MvvmCross
ViewPresenters in MvvmCross
 
Going pixel perfect with Xamarin and MvvmCross
Going pixel perfect with Xamarin and MvvmCrossGoing pixel perfect with Xamarin and MvvmCross
Going pixel perfect with Xamarin and MvvmCross
 

Recently uploaded

Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 

Recently uploaded (20)

Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 

Xamarin & MvvmCross in depth

  • 1. Xamarin & MvvmCross in depth Nicolas Milcoff (aka @nmilcoff) Microsoft MVP - MvvmCross Maintainer
  • 2. Agenda ▣ MVVM pattern recap ▣ Why to use an Open Source MVVM framework? ▣ MvvmCross ▣ Framework goodies ▣ Demos ▣ Q & A
  • 4. MVVM benefits ▣ Highly decoupled components ▣ Code sharing ++ ▣ Scalability ▣ Working in parallel made easy ▣ Stable and proven pattern
  • 5. Open Source (MVVM) Frameworks ▣ Abstractions discussions -- ▣ Barriers for new developers -- ▣ Requirements focus ++ ▣ Time saving ++ ▣ Inputs from multiple developers / teams ++
  • 8. Supported Platforms ▣ Xamarin.Android, Xamarin.iOS ▣ Xamarin.Mac, Xamarin.tvOS ▣ UWP, WPF ▣ Tizen (WIP) ▣ Console! ▣ Xamarin.Forms
  • 9. Features in a nutshell ▣ ViewModel first Navigation ▣ Data Bindings, Commands and Converters ▣ IoC Container / DI engine ▣ Platform specific widgets ▣ Unit Test Helpers ▣ Plugins ▣ Complete flexibility!
  • 10. ViewModels ▣ Implement INotifyPropertyChanged ▣ Lifecycle: □ void Prepare(MyObject parameter) □ Task Initialize() □ void Appearing(), void Appeared() □ void Dissapearing(), void Dissapeared() □ void ViewDestroyed() □ void SaveStateToBundle(IMvxBundle bundle) □ void ReloadFromBundle(IMvxBundle bundle)
  • 12. Navigation in MvvmCross ▣ All logic remains in the shared code ▣ ViewPresenters for each platform ▣ Presentation attributes for declaration ▣ Presentation Hints for behavior ▣ 100% customizable
  • 13. Navigation in MvvmCross public class RootViewModel : MvxViewModel { private readonly IMvxNavigationService _navigationService; public RootViewModel(IMvxNavigationService navigationService) { _navigationService = navigationService; } private async Task OpenModalAsync() { await _navigationService.Navigate<ModalViewModel>(); } }
  • 14. Navigation in MvvmCross [MvxContentPagePresentation(WrapInNavigationPage = true)] public partial class RootPage : MvxContentPage<RootViewModel> { // your code } [MvxModalPresentation] public partial class ModalPage : MvxContentPage<ModalViewModel> { // your code }
  • 16. Data Bindings in MvvmCross ▣ Support for .cs, .xml, .axml, .xaml ▣ Value Converters ▣ Value Combiners ▣ OneWay, TwoWay, OneWayToSource, OneTime ▣ Multiple syntaxes ▣ Support for custom bindings
  • 17. Data Bindings in MvvmCross ▣ Bindings in .axml (Tibet): local:mvxBind=“Text MyTextProperty” local:mvxBind=“Click MyAwesomeCommand” local:mvxBind=“Checked Inverse(Prop), Mode=TwoWay, Fallback=False”
  • 18. Data Bindings in MvvmCross ▣ Bindings in xaml (Tibet): mvx:Bi.nd="Text MyTextProperty” mvx:Bi.nd=“Click MyAwesomeCommand” mvx:Bi.nd=“Checked Inverse(Prop), Mode=TwoWay, Fallback=False”
  • 19. Data Bindings in MvvmCross ▣ Bindings in .cs (Fluent): set.Bind(MyLabel).For(v => v.Text).To(vm => vm.MyProperty); set.Bind(MyButton).To(vm => vm.MyAwesomeCommand); set.Bind(MySwitch) .For(v => v.On) .To(vm => vm.Prop) .WithConversion<InverseConverter>() .WithFallback(false);
  • 21. IoC Container and DI engine ▣ It’s optional ▣ Service Locator / IoC ▣ Constructor and Property Dependency Injection ▣ Singletons, dynamics, Open Generics, Child Containers ▣ Bulk registrations ▣ What if I prefer to use $Lib$ instead? Also possible!
  • 22. IoC Container and DI engine Source: https://xamarinhelp.com/ioc-container-performance/
  • 24. Platform specifics ▣ Support for Android.Support packages ▣ Polymorphic lists made easy ▣ Support for background services / push notifications ▣ iOS Side Menu ▣ Abstraction plugins for most common features
  • 25. Plugins ▣ Small code pieces that resolve specific situations ▣ Install from NuGet -> Run ▣ Official Plugins: Accelerometer, Visibility, Json, Color, Localization, Messenger, Email, … ▣ Loads of 3rd party plugins
  • 27. Resources & Documentation mvvmcross.com Where our official documentation lives github.com/MvvmCross Official samples and source code Slack xamarinchat.herokuapp. com. Then join #mvvmcross StackOverflow Ask using the #mvvmcross tag Xamarin Forums Use the official forums Twitter Follow and don’t hesitate to contact influencers
  • 28. Get involved! Support us on OpenCollective Contribute on GitHub Blog about your experiences Use the framework in your apps