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
550
Creating a Voice-Driven TV Remote with Azure and Alexa
gshackles
0
88
Build 2017 Recap for Xamarin Developers
gshackles
0
84
Going Serverless: Event-Driven Architecture Without The Infrastructure
gshackles
0
160
Evolve 2016 Redux
gshackles
0
120
Instrumenting Your Mobile Monitoring Strategy
gshackles
0
4.6k
Other Decks in Technology
See All in Technology
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
220
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
170
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
3
490
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
150
Lambdaと地方とコミュニティ
miu_crescent
2
370
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.3k
The Role of Developer Relations in AI Product Success.
giftojabu1
0
120
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
410
Can We Measure Developer Productivity?
ewolff
1
150
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
5
540
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
信頼性に挑む中で拡張できる・得られる1人のスキルセットとは?
ken5scal
2
520
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Scaling GitHub
holman
458
140k
We Have a Design System, Now What?
morganepeng
50
7.2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Documentation Writing (for coders)
carmenintech
65
4.4k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
How STYLIGHT went responsive
nonsquared
95
5.2k
Optimizing for Happiness
mojombo
376
70k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
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