SlideShare a Scribd company logo
MVVM frameworks - MvvmCross
Flavius-Radu DEMIAN
A bit about me
• General Manager@Deventure
• Timisoara .Net Meetup organizer
• Mobile and Web developer
• Xamarin and Umbraco enthusiast
• In love with technology
flavius.demian@deventure.co @flaviusdemian
Agenda
Xamarin’s Unique Approach
What is MVVM?
Why MVVM?
The MvvmCross magic
Data-Binding, Commands, Navigation
Advantages
Disadvantages
Expectations
I wish to have an interactive presentation.
Please feel free to ask questions any time.
My ultimate goal is to make you
curios.
Go home and try it yourself!
Xamarin’s Unique Approach
Xamarin’s Unique Approach
Xamarin’s Unique Approach
• native user interface
• native performance
• shared code across platforms
• usage of C# & .NET framework
• full API coverage
• fewer developers
The Xamarin Magic
Write Everything in C#
The Xamarin Magic
Xamarin takes the C# code and it compiles it down to native on iOS
and Android.
The magic is that you can also use it on the Windows platform.
(Almost) everything you can do in Objective-C, Swift or Java can be
also done in C# with Xamarin.
Check the limitations on www.xamarin.com .
Since you use C# on all the platforms, code reuse varies from 60% to
90%.
Xamarin Architecture Guide
What is MVVM?
Model View ViewModel
MVVM Technical Details
It is derived from the Model View Controller Pattern.
• properties
• data binding
• INotifyPropertyChanged
• INotifyCollectionChanged
• IValueConverter
• ICommand
• UI thread
Why MVVM?
MVVM Pros and Cons
There is a reason why it’s called a pattern.
Pros:
• separation of concerns
• decoupling
• code reuse
• testability
Cons:
• MVVM is "overkill" for simple UI operations
The MvvmCross Magic
The MvvmCross Magic
It’s an open-source framework maintained by Stuart Lodge, Martijn
van Dijk & Co.
It has Dependency Injection built-in -> Interface Driven Design.
It has a lot of plugins already written such as location, emails, gallery,
network, SQLite, secure storage, phone calls etc.
#IF plugins -> less work for the developer, but also less control.
The MvvmCross Magic
The MvvmCross Magic
MvvmCross has support for:
• Xamarin.iOS
• Mac
• Xamarin.Android
• Windows Presentation Foundation
• Windows Phone
• Windows 8
• Universal Windows Platform
The MvvmCross Magic
It has huge popularity and the community is very active.
https://jabbr.net/#/rooms/mvvmcross
https://xamarinchat.slack.com/messages/mvvmcross/
https://github.com/MvvmCross/MvvmCross
Data Binding, Commands, Navigation
Data Binding - Properties
No C#, just XAML
<TextBox Text="{Binding Password, Mode=TwoWay}" />
Data Binding - Properties
No C#, just XML
xmlns:local="http://schemas.android.com/apk/res-auto"
<EditText local:MvxBind="Text Password"
Data Binding - Properties
Just C#
var set = this.CreateBindingSet<LoginViewController, LoginViewModel>();
set.Bind(textField_Password).To(vm => vm.Password);
Data Binding - Listviews
No C#, just XAML
<ListBox
ItemsSource="{Binding MyCollection}"
<ListBox.ItemTemplate>
<DataTemplate> …..
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Data Binding - Listviews
No C#, just XML
<Mvx.MvxListView local:MvxBind="ItemsSource MyCollection;
ItemClick ViewDetailsCommand"
local:MvxItemTemplate="@layout/item_template_row" />
Data Binding - Listviews
Just C#
var set = this.CreateBindingSet<XViewController, XViewModel>();
set.Bind(source).To(x => x.MyCollection);
set.Apply();
ViewModel Commands
No C#, just XAML
xmlns:i="clr-namespace:System.Windows.Interactivity;
assembly=System.Windows.Interactivity"
xmlns:commandbinding="clr-namespace:Cirrious.MvvmCross.WindowsPhone.Commands;
assembly=Cirrious.MvvmCross.WindowsPhone"
<TextBlock Text="{Binding Name}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Tap">
<commandbinding:MvxEventToCommand Command="{Binding
MyCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBlock>
ViewModel Commands
No C#, just XML
xmlns:local="http://schemas.android.com/apk/res-auto"
<Button local:MvxBind="Click LoginCommand" />
ViewModel Commands
Just C#
var set = this.CreateBindingSet<LoginViewController, LoginViewModel>();
set.Bind(btn_Login).To(x => x.LoginCommand);
set.Apply();
Navigation
Go forward:
CurrentViewModelInstance.ShowViewModel<NewViewModel>();
Navigation
Go back:
CurrentViewModelInstance.Close(this);
MvvmCross App Architecture
App Architecture
The project should be split in 2:
Common core which contains:
• models
• viewmodels
• business logic
• data access layer
UI-project per platform:
• each platform views
Small Demo Time
MvvmCross Pros & Cons
Pros:
• interchangeable code module
• supports Test Driven Development (TDD)
• it follows the Core pattern
• it has data binding
MvvmCross Pros & Cons
Cons:
• it is a non-native pattern for iOS -MVC- and Android -aprox MVC-
• core 3rd party dependency
• lot’s of glue code for custom bindings
Thank you very much.

More Related Content

What's hot

Xamarin: The Future of App Development
Xamarin: The Future of App DevelopmentXamarin: The Future of App Development
Xamarin: The Future of App Development
James Montemagno
 
Cross platform development with c# and xamarin
Cross platform development with c# and xamarinCross platform development with c# and xamarin
Cross platform development with c# and xamarin
Luca Zulian
 
.Net Standard Libraries and Xamarin
.Net Standard Libraries and Xamarin.Net Standard Libraries and Xamarin
.Net Standard Libraries and Xamarin
James Montemagno
 
Ui Testing on Windows Phone
Ui Testing on Windows PhoneUi Testing on Windows Phone
Ui Testing on Windows Phone
Stuart Lodge
 
Build Cross Platform Mobile Apps for iOS & Android with Xamarin & MvvmCross
Build Cross Platform Mobile Apps for iOS & Android with Xamarin & MvvmCrossBuild Cross Platform Mobile Apps for iOS & Android with Xamarin & MvvmCross
Build Cross Platform Mobile Apps for iOS & Android with Xamarin & MvvmCross
Ishai Hachlili
 
Xamarin.forms Shell + Navigation
Xamarin.forms Shell + NavigationXamarin.forms Shell + Navigation
Xamarin.forms Shell + Navigation
James Montemagno
 
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
James Montemagno
 
Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...
Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...
Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...
James Montemagno
 
What's new in Xamarin.Forms?
What's new in Xamarin.Forms?What's new in Xamarin.Forms?
What's new in Xamarin.Forms?
James Montemagno
 
Xamarin Traditional Approach & Xamarin.Forms
Xamarin Traditional Approach & Xamarin.FormsXamarin Traditional Approach & Xamarin.Forms
Xamarin Traditional Approach & Xamarin.Forms
William S. Rodriguez
 
Xamarin Dev Days - Xamarin.Forms
Xamarin Dev Days -  Xamarin.FormsXamarin Dev Days -  Xamarin.Forms
Xamarin Dev Days - Xamarin.Forms
Javier Suárez Ruiz
 
Xamarin Forms: O caminho para 100% de código compartilhado em aplicativos móveis
Xamarin Forms: O caminho para 100% de código compartilhado em aplicativos móveisXamarin Forms: O caminho para 100% de código compartilhado em aplicativos móveis
Xamarin Forms: O caminho para 100% de código compartilhado em aplicativos móveis
akamud
 
Into to Webassmbly
Into to WebassmblyInto to Webassmbly
Into to Webassmbly
cliffzhaobupt
 
Evovle 2016 - Everyone Can Create Beautiful Apps with Material Design
Evovle 2016 - Everyone Can Create Beautiful Apps with Material DesignEvovle 2016 - Everyone Can Create Beautiful Apps with Material Design
Evovle 2016 - Everyone Can Create Beautiful Apps with Material Design
James Montemagno
 
Xamarin 4 - the future of apps
Xamarin 4  - the future of appsXamarin 4  - the future of apps
Xamarin 4 - the future of apps
James Montemagno
 
[Cordova] Empezando con Ionic
[Cordova] Empezando con Ionic[Cordova] Empezando con Ionic
[Cordova] Empezando con Ionic
Moises Alexander Salazar Vila
 
Mobile apps with Umbraco and Phonegap
Mobile apps with Umbraco and PhonegapMobile apps with Umbraco and Phonegap
Mobile apps with Umbraco and Phonegap
Theo Paraskevopoulos
 
End to-end native iOS, Android and Windows apps wtih Xamarin
End to-end native iOS, Android and Windows apps wtih XamarinEnd to-end native iOS, Android and Windows apps wtih Xamarin
End to-end native iOS, Android and Windows apps wtih Xamarin
James Montemagno
 
Bienvenido .Net MAUI - la evolución de Xamarin.Forms
Bienvenido .Net MAUI - la evolución de Xamarin.FormsBienvenido .Net MAUI - la evolución de Xamarin.Forms
Bienvenido .Net MAUI - la evolución de Xamarin.Forms
Vicente Gerardo Guzman Lucio
 
MAUI Blazor - One App that runs everywhere
MAUI Blazor - One App that runs everywhereMAUI Blazor - One App that runs everywhere
MAUI Blazor - One App that runs everywhere
Jose Javier Columbie
 

What's hot (20)

Xamarin: The Future of App Development
Xamarin: The Future of App DevelopmentXamarin: The Future of App Development
Xamarin: The Future of App Development
 
Cross platform development with c# and xamarin
Cross platform development with c# and xamarinCross platform development with c# and xamarin
Cross platform development with c# and xamarin
 
.Net Standard Libraries and Xamarin
.Net Standard Libraries and Xamarin.Net Standard Libraries and Xamarin
.Net Standard Libraries and Xamarin
 
Ui Testing on Windows Phone
Ui Testing on Windows PhoneUi Testing on Windows Phone
Ui Testing on Windows Phone
 
Build Cross Platform Mobile Apps for iOS & Android with Xamarin & MvvmCross
Build Cross Platform Mobile Apps for iOS & Android with Xamarin & MvvmCrossBuild Cross Platform Mobile Apps for iOS & Android with Xamarin & MvvmCross
Build Cross Platform Mobile Apps for iOS & Android with Xamarin & MvvmCross
 
Xamarin.forms Shell + Navigation
Xamarin.forms Shell + NavigationXamarin.forms Shell + Navigation
Xamarin.forms Shell + Navigation
 
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
 
Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...
Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...
Extending, optimizing, and accelerating Xamarin and Xamarin.Forms app develop...
 
What's new in Xamarin.Forms?
What's new in Xamarin.Forms?What's new in Xamarin.Forms?
What's new in Xamarin.Forms?
 
Xamarin Traditional Approach & Xamarin.Forms
Xamarin Traditional Approach & Xamarin.FormsXamarin Traditional Approach & Xamarin.Forms
Xamarin Traditional Approach & Xamarin.Forms
 
Xamarin Dev Days - Xamarin.Forms
Xamarin Dev Days -  Xamarin.FormsXamarin Dev Days -  Xamarin.Forms
Xamarin Dev Days - Xamarin.Forms
 
Xamarin Forms: O caminho para 100% de código compartilhado em aplicativos móveis
Xamarin Forms: O caminho para 100% de código compartilhado em aplicativos móveisXamarin Forms: O caminho para 100% de código compartilhado em aplicativos móveis
Xamarin Forms: O caminho para 100% de código compartilhado em aplicativos móveis
 
Into to Webassmbly
Into to WebassmblyInto to Webassmbly
Into to Webassmbly
 
Evovle 2016 - Everyone Can Create Beautiful Apps with Material Design
Evovle 2016 - Everyone Can Create Beautiful Apps with Material DesignEvovle 2016 - Everyone Can Create Beautiful Apps with Material Design
Evovle 2016 - Everyone Can Create Beautiful Apps with Material Design
 
Xamarin 4 - the future of apps
Xamarin 4  - the future of appsXamarin 4  - the future of apps
Xamarin 4 - the future of apps
 
[Cordova] Empezando con Ionic
[Cordova] Empezando con Ionic[Cordova] Empezando con Ionic
[Cordova] Empezando con Ionic
 
Mobile apps with Umbraco and Phonegap
Mobile apps with Umbraco and PhonegapMobile apps with Umbraco and Phonegap
Mobile apps with Umbraco and Phonegap
 
End to-end native iOS, Android and Windows apps wtih Xamarin
End to-end native iOS, Android and Windows apps wtih XamarinEnd to-end native iOS, Android and Windows apps wtih Xamarin
End to-end native iOS, Android and Windows apps wtih Xamarin
 
Bienvenido .Net MAUI - la evolución de Xamarin.Forms
Bienvenido .Net MAUI - la evolución de Xamarin.FormsBienvenido .Net MAUI - la evolución de Xamarin.Forms
Bienvenido .Net MAUI - la evolución de Xamarin.Forms
 
MAUI Blazor - One App that runs everywhere
MAUI Blazor - One App that runs everywhereMAUI Blazor - One App that runs everywhere
MAUI Blazor - One App that runs everywhere
 

Similar to MVVM frameworks - MvvmCross

Xamarin Introduction for Xamarin DevDays Seville
Xamarin Introduction for Xamarin DevDays SevilleXamarin Introduction for Xamarin DevDays Seville
Xamarin Introduction for Xamarin DevDays Seville
Josué Yeray Julián Ferreiro
 
Dia 4.1 mvvm cross
Dia 4.1   mvvm crossDia 4.1   mvvm cross
Dia 4.1 mvvm cross
Hernan Zaldivar
 
Xamarin Dev Days - Intro to Xamarin
Xamarin Dev Days - Intro to XamarinXamarin Dev Days - Intro to Xamarin
Xamarin Dev Days - Intro to Xamarin
Swaminathan Vetri
 
Hybrid Mobile Development
Hybrid Mobile DevelopmentHybrid Mobile Development
Hybrid Mobile Development
Shai Raiten
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
Nicolò Carandini
 
What's New in Xamarin? - Santo Domingo
What's New in Xamarin? - Santo DomingoWhat's New in Xamarin? - Santo Domingo
What's New in Xamarin? - Santo Domingo
James Montemagno
 
Sugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a timeSugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a time
Einar Ingebrigtsen
 
State of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
State of Union: Xamarin & Cross-Platform .NET in 2016 and BeyondState of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
State of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
Nick Landry
 
MS Experiences 17 - Xamarin: Future of Mobile Development
MS Experiences 17 - Xamarin: Future of Mobile DevelopmentMS Experiences 17 - Xamarin: Future of Mobile Development
MS Experiences 17 - Xamarin: Future of Mobile Development
James Montemagno
 
20140207 xamarin-red fabriq-microsoft-techdays-nativemobileappdevelopmentwith...
20140207 xamarin-red fabriq-microsoft-techdays-nativemobileappdevelopmentwith...20140207 xamarin-red fabriq-microsoft-techdays-nativemobileappdevelopmentwith...
20140207 xamarin-red fabriq-microsoft-techdays-nativemobileappdevelopmentwith...
RedFabriQ
 
Reasons to migrate to modern web development with JavaScript
Reasons to migrate to modern web development with JavaScriptReasons to migrate to modern web development with JavaScript
Reasons to migrate to modern web development with JavaScript
David Amend
 
Pole web pp
Pole web ppPole web pp
Visual studio + Xamarin equals love
Visual studio + Xamarin equals loveVisual studio + Xamarin equals love
Visual studio + Xamarin equals love
Adam Hill
 
Community day mvvmcross
Community day mvvmcrossCommunity day mvvmcross
Community day mvvmcross
Qframe
 
Visual studio + Xamarin == Love
Visual studio + Xamarin == LoveVisual studio + Xamarin == Love
Visual studio + Xamarin == Love
Adam Hill
 
Xamarin Dev Days 2016 introduction to xamarin
Xamarin Dev Days 2016   introduction to xamarinXamarin Dev Days 2016   introduction to xamarin
Xamarin Dev Days 2016 introduction to xamarin
Dan Ardelean
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
Alejandro Ruiz Varela
 
Build 2017 - B8099 - What's new in Xamarin.Forms
Build 2017 - B8099 - What's new in Xamarin.FormsBuild 2017 - B8099 - What's new in Xamarin.Forms
Build 2017 - B8099 - What's new in Xamarin.Forms
Windows Developer
 
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
Robert 'Bob' Reyes
 
Xamarin Cross-Platform with Xamarin.Form, MvvmCross
Xamarin Cross-Platform with Xamarin.Form, MvvmCrossXamarin Cross-Platform with Xamarin.Form, MvvmCross
Xamarin Cross-Platform with Xamarin.Form, MvvmCross
Tri Nguyen
 

Similar to MVVM frameworks - MvvmCross (20)

Xamarin Introduction for Xamarin DevDays Seville
Xamarin Introduction for Xamarin DevDays SevilleXamarin Introduction for Xamarin DevDays Seville
Xamarin Introduction for Xamarin DevDays Seville
 
Dia 4.1 mvvm cross
Dia 4.1   mvvm crossDia 4.1   mvvm cross
Dia 4.1 mvvm cross
 
Xamarin Dev Days - Intro to Xamarin
Xamarin Dev Days - Intro to XamarinXamarin Dev Days - Intro to Xamarin
Xamarin Dev Days - Intro to Xamarin
 
Hybrid Mobile Development
Hybrid Mobile DevelopmentHybrid Mobile Development
Hybrid Mobile Development
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
 
What's New in Xamarin? - Santo Domingo
What's New in Xamarin? - Santo DomingoWhat's New in Xamarin? - Santo Domingo
What's New in Xamarin? - Santo Domingo
 
Sugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a timeSugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a time
 
State of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
State of Union: Xamarin & Cross-Platform .NET in 2016 and BeyondState of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
State of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
 
MS Experiences 17 - Xamarin: Future of Mobile Development
MS Experiences 17 - Xamarin: Future of Mobile DevelopmentMS Experiences 17 - Xamarin: Future of Mobile Development
MS Experiences 17 - Xamarin: Future of Mobile Development
 
20140207 xamarin-red fabriq-microsoft-techdays-nativemobileappdevelopmentwith...
20140207 xamarin-red fabriq-microsoft-techdays-nativemobileappdevelopmentwith...20140207 xamarin-red fabriq-microsoft-techdays-nativemobileappdevelopmentwith...
20140207 xamarin-red fabriq-microsoft-techdays-nativemobileappdevelopmentwith...
 
Reasons to migrate to modern web development with JavaScript
Reasons to migrate to modern web development with JavaScriptReasons to migrate to modern web development with JavaScript
Reasons to migrate to modern web development with JavaScript
 
Pole web pp
Pole web ppPole web pp
Pole web pp
 
Visual studio + Xamarin equals love
Visual studio + Xamarin equals loveVisual studio + Xamarin equals love
Visual studio + Xamarin equals love
 
Community day mvvmcross
Community day mvvmcrossCommunity day mvvmcross
Community day mvvmcross
 
Visual studio + Xamarin == Love
Visual studio + Xamarin == LoveVisual studio + Xamarin == Love
Visual studio + Xamarin == Love
 
Xamarin Dev Days 2016 introduction to xamarin
Xamarin Dev Days 2016   introduction to xamarinXamarin Dev Days 2016   introduction to xamarin
Xamarin Dev Days 2016 introduction to xamarin
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
 
Build 2017 - B8099 - What's new in Xamarin.Forms
Build 2017 - B8099 - What's new in Xamarin.FormsBuild 2017 - B8099 - What's new in Xamarin.Forms
Build 2017 - B8099 - What's new in Xamarin.Forms
 
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
 
Xamarin Cross-Platform with Xamarin.Form, MvvmCross
Xamarin Cross-Platform with Xamarin.Form, MvvmCrossXamarin Cross-Platform with Xamarin.Form, MvvmCross
Xamarin Cross-Platform with Xamarin.Form, MvvmCross
 

More from Flavius-Radu Demian

Mobile growth with Xamarin
Mobile growth with XamarinMobile growth with Xamarin
Mobile growth with Xamarin
Flavius-Radu Demian
 
ALM on the shoulders of Giants - Visual Studio Online
ALM on the shoulders of Giants - Visual Studio OnlineALM on the shoulders of Giants - Visual Studio Online
ALM on the shoulders of Giants - Visual Studio Online
Flavius-Radu Demian
 
Universal apps
Universal appsUniversal apps
Universal apps
Flavius-Radu Demian
 
Security in windows azure
Security in windows azureSecurity in windows azure
Security in windows azure
Flavius-Radu Demian
 
Building a chat app with windows azure mobile
Building a chat app with windows azure mobileBuilding a chat app with windows azure mobile
Building a chat app with windows azure mobile
Flavius-Radu Demian
 
Building a chat app with windows azure mobile
Building a chat app with windows azure mobileBuilding a chat app with windows azure mobile
Building a chat app with windows azure mobile
Flavius-Radu Demian
 
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
Flavius-Radu Demian
 
Building a chat app with windows azure mobile services
Building a chat app with windows azure mobile servicesBuilding a chat app with windows azure mobile services
Building a chat app with windows azure mobile services
Flavius-Radu Demian
 

More from Flavius-Radu Demian (8)

Mobile growth with Xamarin
Mobile growth with XamarinMobile growth with Xamarin
Mobile growth with Xamarin
 
ALM on the shoulders of Giants - Visual Studio Online
ALM on the shoulders of Giants - Visual Studio OnlineALM on the shoulders of Giants - Visual Studio Online
ALM on the shoulders of Giants - Visual Studio Online
 
Universal apps
Universal appsUniversal apps
Universal apps
 
Security in windows azure
Security in windows azureSecurity in windows azure
Security in windows azure
 
Building a chat app with windows azure mobile
Building a chat app with windows azure mobileBuilding a chat app with windows azure mobile
Building a chat app with windows azure mobile
 
Building a chat app with windows azure mobile
Building a chat app with windows azure mobileBuilding a chat app with windows azure mobile
Building a chat app with windows azure mobile
 
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
 
Building a chat app with windows azure mobile services
Building a chat app with windows azure mobile servicesBuilding a chat app with windows azure mobile services
Building a chat app with windows azure mobile services
 

Recently uploaded

Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 

Recently uploaded (20)

Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 

MVVM frameworks - MvvmCross

  • 1. MVVM frameworks - MvvmCross Flavius-Radu DEMIAN
  • 2. A bit about me • General Manager@Deventure • Timisoara .Net Meetup organizer • Mobile and Web developer • Xamarin and Umbraco enthusiast • In love with technology flavius.demian@deventure.co @flaviusdemian
  • 3. Agenda Xamarin’s Unique Approach What is MVVM? Why MVVM? The MvvmCross magic Data-Binding, Commands, Navigation Advantages Disadvantages
  • 4. Expectations I wish to have an interactive presentation. Please feel free to ask questions any time. My ultimate goal is to make you curios. Go home and try it yourself!
  • 7. Xamarin’s Unique Approach • native user interface • native performance • shared code across platforms • usage of C# & .NET framework • full API coverage • fewer developers
  • 8. The Xamarin Magic Write Everything in C#
  • 9. The Xamarin Magic Xamarin takes the C# code and it compiles it down to native on iOS and Android. The magic is that you can also use it on the Windows platform. (Almost) everything you can do in Objective-C, Swift or Java can be also done in C# with Xamarin. Check the limitations on www.xamarin.com . Since you use C# on all the platforms, code reuse varies from 60% to 90%.
  • 13. MVVM Technical Details It is derived from the Model View Controller Pattern. • properties • data binding • INotifyPropertyChanged • INotifyCollectionChanged • IValueConverter • ICommand • UI thread
  • 15. MVVM Pros and Cons There is a reason why it’s called a pattern. Pros: • separation of concerns • decoupling • code reuse • testability Cons: • MVVM is "overkill" for simple UI operations
  • 17. The MvvmCross Magic It’s an open-source framework maintained by Stuart Lodge, Martijn van Dijk & Co. It has Dependency Injection built-in -> Interface Driven Design. It has a lot of plugins already written such as location, emails, gallery, network, SQLite, secure storage, phone calls etc. #IF plugins -> less work for the developer, but also less control.
  • 19. The MvvmCross Magic MvvmCross has support for: • Xamarin.iOS • Mac • Xamarin.Android • Windows Presentation Foundation • Windows Phone • Windows 8 • Universal Windows Platform
  • 20. The MvvmCross Magic It has huge popularity and the community is very active. https://jabbr.net/#/rooms/mvvmcross https://xamarinchat.slack.com/messages/mvvmcross/ https://github.com/MvvmCross/MvvmCross
  • 22. Data Binding - Properties No C#, just XAML <TextBox Text="{Binding Password, Mode=TwoWay}" />
  • 23. Data Binding - Properties No C#, just XML xmlns:local="http://schemas.android.com/apk/res-auto" <EditText local:MvxBind="Text Password"
  • 24. Data Binding - Properties Just C# var set = this.CreateBindingSet<LoginViewController, LoginViewModel>(); set.Bind(textField_Password).To(vm => vm.Password);
  • 25. Data Binding - Listviews No C#, just XAML <ListBox ItemsSource="{Binding MyCollection}" <ListBox.ItemTemplate> <DataTemplate> ….. </DataTemplate> </ListBox.ItemTemplate> </ListBox>
  • 26. Data Binding - Listviews No C#, just XML <Mvx.MvxListView local:MvxBind="ItemsSource MyCollection; ItemClick ViewDetailsCommand" local:MvxItemTemplate="@layout/item_template_row" />
  • 27. Data Binding - Listviews Just C# var set = this.CreateBindingSet<XViewController, XViewModel>(); set.Bind(source).To(x => x.MyCollection); set.Apply();
  • 28. ViewModel Commands No C#, just XAML xmlns:i="clr-namespace:System.Windows.Interactivity; assembly=System.Windows.Interactivity" xmlns:commandbinding="clr-namespace:Cirrious.MvvmCross.WindowsPhone.Commands; assembly=Cirrious.MvvmCross.WindowsPhone" <TextBlock Text="{Binding Name}"> <i:Interaction.Triggers> <i:EventTrigger EventName="Tap"> <commandbinding:MvxEventToCommand Command="{Binding MyCommand}" /> </i:EventTrigger> </i:Interaction.Triggers> </TextBlock>
  • 29. ViewModel Commands No C#, just XML xmlns:local="http://schemas.android.com/apk/res-auto" <Button local:MvxBind="Click LoginCommand" />
  • 30. ViewModel Commands Just C# var set = this.CreateBindingSet<LoginViewController, LoginViewModel>(); set.Bind(btn_Login).To(x => x.LoginCommand); set.Apply();
  • 34. App Architecture The project should be split in 2: Common core which contains: • models • viewmodels • business logic • data access layer UI-project per platform: • each platform views
  • 36. MvvmCross Pros & Cons Pros: • interchangeable code module • supports Test Driven Development (TDD) • it follows the Core pattern • it has data binding
  • 37. MvvmCross Pros & Cons Cons: • it is a non-native pattern for iOS -MVC- and Android -aprox MVC- • core 3rd party dependency • lot’s of glue code for custom bindings
  • 38. Thank you very much.