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
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
540
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
10
1.3k
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
210
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
390
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
"とにかくやってみる"で始めるAWS Security Hub
maimyyym
2
100
SSMRunbook作成の勘所_20241120
koichiotomo
3
170
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
3
160
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
430
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
610
心が動くエンジニアリング ── 私が夢中になる理由
16bitidol
0
100
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
4
240
Featured
See All Featured
Building Adaptive Systems
keathley
38
2.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
For a Future-Friendly Web
brad_frost
175
9.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Designing for humans not robots
tammielis
250
25k
Writing Fast Ruby
sferik
627
61k
Designing Experiences People Love
moore
138
23k
Gamification - CAS2011
davidbonilla
80
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