Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Building Multi-Platform Native Apps with MVVM a...
Search
Greg Shackles
June 21, 2014
Technology
1
410
Building Multi-Platform Native Apps with MVVM and C#
Greg Shackles
June 21, 2014
Tweet
Share
More Decks by Greg Shackles
See All by Greg Shackles
Building Modern Services with .NET Core 3 and gRPC
gshackles
0
150
Observability-Driven Development: What DevOps is Really About
gshackles
1
270
Monitoring Your Mobile Apps in the Wild
gshackles
1
78
Building Scalable Applications with the Actor Model
gshackles
0
560
Creating a Voice-Driven TV Remote with Azure and Alexa
gshackles
0
90
Build 2017 Recap for Xamarin Developers
gshackles
0
89
Going Serverless: Event-Driven Architecture Without The Infrastructure
gshackles
0
160
Evolve 2016 Redux
gshackles
0
130
Instrumenting Your Mobile Monitoring Strategy
gshackles
0
4.6k
Other Decks in Technology
See All in Technology
【re:Invent 2024 アプデ】 Prompt Routing の紹介
champ
0
140
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
300
OpenShift Virtualizationのネットワーク構成を真剣に考えてみた/OpenShift Virtualization's Network Configuration
tnk4on
0
130
kargoの魅力について伝える
magisystem0408
0
200
Wantedly での Datadog 活用事例
bgpat
1
410
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
160
新機能VPCリソースエンドポイント機能検証から得られた考察
duelist2020jp
0
210
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
260
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
20241220_S3 tablesの使い方を検証してみた
handy
3
240
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
110
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
540
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
The Pragmatic Product Professional
lauravandoore
32
6.3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Unsuck your backbone
ammeep
669
57k
Mobile First: as difficult as doing things right
swwweet
222
9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Transcript
Building Multi-Platform Native Apps with MVVM and C# Greg Shackles
Senior Software Engineer Olo @gshackles
[email protected]
github.com/gshackles
gonemobile.io @GoneMobileCast
Google Apple RIM Microsoft Symbian 52.5% Android 41.4% Apple 3.3%
Microsoft 2.5% RIM Source: comScore US Market Share: April 2014
Write Once, Run Anywhere
Write Once, Run Anywhere BUSTED
Xamarin: C# All The Things! * * and F# too!
Xamarin: C# All The Things! * * and F# too!
•100% Native
Xamarin: C# All The Things! * * and F# too!
•100% Native •Full access to platform SDKs
Xamarin: C# All The Things! * * and F# too!
•100% Native •Full access to platform SDKs •BCL, Async, LINQ, etc
Xamarin: C# All The Things! * * and F# too!
•100% Native •Full access to platform SDKs •BCL, Async, LINQ, etc •Improved API
Xamarin: C# All The Things! * * and F# too!
•100% Native •Full access to platform SDKs •BCL, Async, LINQ, etc •Improved API •Shared code across platforms
Xamarin: C# All The Things! * * and F# too!
•100% Native •Full access to platform SDKs •BCL, Async, LINQ, etc •Improved API •Shared code across platforms •Garbage collection
Xamarin: C# All The Things! * * and F# too!
•100% Native •Full access to platform SDKs •BCL, Async, LINQ, etc •Improved API •Shared code across platforms •Garbage collection •Visual Studio / Xamarin Studio
Xamarin: C# All The Things! * * and F# too!
•100% Native •Full access to platform SDKs •BCL, Async, LINQ, etc •Improved API •Shared code across platforms •Garbage collection •Visual Studio / Xamarin Studio •Frequent Releases
MVVM
MVVM View
MVVM View Model
MVVM View View Model Model
MVVM View Binder View Model Model
MVVM Click Me View Binder View Model Model
MVVM Click Me 1. action View Binder View Model Model
MVVM Click Me 1. action 2. event handling View Binder
View Model Model
MVVM Click Me 1. action 2. event handling 3. command
View Binder View Model Model
MVVM Click Me 1. action 2. event handling 3. command
4. access data View Binder View Model Model
MVVM Click Me 1. action 2. event handling 3. command
4. access data 5. notify change View Binder View Model Model
MVVM Click Me 1. action 2. event handling 3. command
4. access data 5. notify change 6. get changed data View Binder View Model Model
MVVM Click Me Hello World! 1. action 2. event handling
3. command 4. access data 5. notify change 6. get changed data 7. update UI View Binder View Model Model
MvvmCross
MvvmCross
MvvmCross: Highlights
• Shared behavior, not presentation MvvmCross: Highlights
• Shared behavior, not presentation • Bind all the platforms!
MvvmCross: Highlights
• Shared behavior, not presentation • Bind all the platforms!
• Powerful binding options MvvmCross: Highlights
• Shared behavior, not presentation • Bind all the platforms!
• Powerful binding options • Convention over configuration MvvmCross: Highlights
• Shared behavior, not presentation • Bind all the platforms!
• Powerful binding options • Convention over configuration • Pluggable architecture MvvmCross: Highlights
• Shared behavior, not presentation • Bind all the platforms!
• Powerful binding options • Convention over configuration • Pluggable architecture • PCL MvvmCross: Highlights
• Shared behavior, not presentation • Bind all the platforms!
• Powerful binding options • Convention over configuration • Pluggable architecture • PCL • Inversion of Control MvvmCross: Highlights
• Shared behavior, not presentation • Bind all the platforms!
• Powerful binding options • Convention over configuration • Pluggable architecture • PCL • Inversion of Control • Testable MvvmCross: Highlights
MvvmCross: Resources
•Source: github.com/slodge/MvvmCross MvvmCross: Resources
•Source: github.com/slodge/MvvmCross •Stuart’s Blog: slodge.blogspot.com MvvmCross: Resources
•Source: github.com/slodge/MvvmCross •Stuart’s Blog: slodge.blogspot.com •N+1: mvvmcross.wordpress.com MvvmCross: Resources
•Source: github.com/slodge/MvvmCross •Stuart’s Blog: slodge.blogspot.com •N+1: mvvmcross.wordpress.com •Chat: jabbr.net/#/rooms/mvvmcross MvvmCross:
Resources
Presenters
• Customize view presentation Presenters
• Customize view presentation • Platform-specific Presenters
• Customize view presentation • Platform-specific • Still retain View
Model logic Presenters
• Customize view presentation • Platform-specific • Still retain View
Model logic Presenters •Tabs / Panorama
• Customize view presentation • Platform-specific • Still retain View
Model logic Presenters •Tabs / Panorama •Split View / Master-Detail
• Customize view presentation • Platform-specific • Still retain View
Model logic Presenters •Tabs / Panorama •Split View / Master-Detail •Fragments
• Customize view presentation • Platform-specific • Still retain View
Model logic Presenters •Tabs / Panorama •Split View / Master-Detail •Fragments •Modals
• Customize view presentation • Platform-specific • Still retain View
Model logic Presenters •Tabs / Panorama •Split View / Master-Detail •Fragments •Modals •Hamburger menu
Presenters
Presenters
Presenters
Presenters
Plugins
Plugins • Accelerometer • Download Cache • Email • File
• Json • Localization • Location • Messenger • Phone Call • Picture Chooser • SQLite • Visibility • Web Browser • Many More!
Xamarin.Forms Shared C# App Logic Shared C# User Interface Code
None
Pages Content MasterDetail Navigation Tabbed Carousel
Pages Layouts Content MasterDetail Navigation Tabbed Carousel Stack Absolute Relative
Grid Content Scroll Frame
Controls
Controls • ActivityIndicator • BoxView • Button • DatePicker •
Editor • EntryImage • Label • ListView • Map • OpenGLView • PickerProgressBar • SearchBar • SliderStepper • TableView • TimePicker • WebView • EntryCell • ImageCell • SwitchCell • TextCell • ViewCell
None