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
140
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
87
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
データの信頼性を支える仕組みと技術
chanyou0311
4
1.6k
GraphRAGを用いたLLMによるパーソナライズド推薦の生成
naveed92
0
190
地理情報データをデータベースに格納しよう~ GPUを活用した爆速データベース PG-Stromの紹介 ~
sakaik
1
100
今、始める、第一歩。 / Your first step
yahonda
2
680
AI長期記憶システム構築のための LLMマルチエージェントの取り組み / Awarefy-LLM-Multi-Agent
iktakahiro
2
340
オーティファイ会社紹介資料 / Autify Company Deck
autifyhq
9
120k
Fargateを使った研修の話
takesection
0
170
私はこうやってマインドマップでテストすることを出す!
mineo_matsuya
0
190
Windows Autopilot Deployment by OSD Guy
tamaiyutaro
0
300
End of Barrel Files: New Modularization Techniques with Sheriff
rainerhahnekamp
0
280
Spring Frameworkの新標準!? ~ RestClientとHTTPインターフェース入門 ~
ogiwarat
2
250
ZOZOTOWNのホーム画面をパーソナライズすることの難しさと裏話を語る
f6wbl6
1
470
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
180
21k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Done Done
chrislema
181
16k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
505
140k
Side Projects
sachag
452
42k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
A Tale of Four Properties
chriscoyier
156
23k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
7
560
Six Lessons from altMBA
skipperchong
26
3.5k
Thoughts on Productivity
jonyablonski
67
4.3k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Visualization
eitanlees
145
15k
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