Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Cross-Platform Mobile Development with C# (2012...
Search
Greg Shackles
September 17, 2012
Technology
680
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Cross-Platform Mobile Development with C# (2012-09-17)
Greg Shackles
September 17, 2012
More Decks by Greg Shackles
See All by Greg Shackles
Building Modern Services with .NET Core 3 and gRPC
gshackles
0
210
Observability-Driven Development: What DevOps is Really About
gshackles
1
340
Monitoring Your Mobile Apps in the Wild
gshackles
1
130
Building Scalable Applications with the Actor Model
gshackles
0
690
Creating a Voice-Driven TV Remote with Azure and Alexa
gshackles
0
160
Build 2017 Recap for Xamarin Developers
gshackles
0
160
Going Serverless: Event-Driven Architecture Without The Infrastructure
gshackles
0
230
Evolve 2016 Redux
gshackles
0
170
Instrumenting Your Mobile Monitoring Strategy
gshackles
0
4.8k
Other Decks in Technology
See All in Technology
あけおめLINE 傾向とその対策
nasa9084
0
180
Azure Serverless 2026:Production-ready な AI エージェント基盤 / Azure Serverless 2026: Production-Ready AI Agent Platform
miyake
2
450
beyond jj: config & tools ecosystem
indirect
0
5.6k
Minecraft JavaのMODをSwiftで作る
1mash0
0
190
CLIライブラリ開発を支える技術
htnabe
0
140
アプリログインとWeb認証基盤をつなぐ ASWebAuthenticationSession 作法
shimastripe
1
360
すぐできる衛星通信対応 あとは山奥に行くだけ
tatetate55
0
140
2026-09-18 gotanda.sre Terraformで複数環境作ったり、複数Stateに分割したりそれとTerragrunt / Terraform multi envs and multi states
masasuzu
4
680
データ_AIの事業の勝敗をわけるもの
nek0128
1
470
安心して変更できるWebフロントエンドの作り方
pirosikick
5
2.8k
Railsのように考える: See through the Master
snoozer05
PRO
4
1.2k
Genieを崇めよ
kameitomohiro
0
170
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.9k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
The Limits of Empathy - UXLibs8
cassininazir
1
680
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
530
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
430
Unsuck your backbone
ammeep
672
58k
Fireside Chat
paigeccino
43
4k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
330
A designer walks into a library…
pauljervisheath
211
25k
Transcript
Greg Shackles Cross-platform mobile development with c# Sunday, September 16,
12
About Me Greg Shackles Senior Software Engineer OLO Online Ordering
email
[email protected]
twitter @gshackles github github.com/gshackles blog gregshackles.com Slides speakerdeck.com/u/gshackles Sunday, September 16, 12
the Book oreil.ly/Lp5smR Discount Code: AUTHD Print Book: 40% Off
E-Book: 50% Off Sunday, September 16, 12
Market Share (US): July 2012 Google Apple RIM Microsoft Symbian
52.2% Android 33.4% Apple 9.5% RIM 3.6% Microsoft Source: comScore Sunday, September 16, 12
native platform Languages Objective-C Java C# Sunday, September 16, 12
Write once, run anywhere Sunday, September 16, 12
"The biggest mistake we made as a company was betting
too much on HTML5 instead of native." - Mark Zuckerberg Sunday, September 16, 12
platform differences != != Sunday, September 16, 12
c# Everywhere MonoTouch Mono for Android Native Sunday, September 16,
12
The Power of C# Sunday, September 16, 12
The Power of C# •Base Class Library Sunday, September 16,
12
The Power of C# •Base Class Library •LINQ Sunday, September
16, 12
The Power of C# •Base Class Library •LINQ •Parallel LINQ
Sunday, September 16, 12
The Power of C# •Base Class Library •LINQ •Parallel LINQ
•Memory Management Sunday, September 16, 12
The Power of C# •Base Class Library •LINQ •Parallel LINQ
•Memory Management •Task Parallel Library Sunday, September 16, 12
The Power of C# •Base Class Library •LINQ •Parallel LINQ
•Memory Management •Task Parallel Library •Dynamic Sunday, September 16, 12
xamarin Tools xamarin.com Sunday, September 16, 12
xamarin Tools xamarin.com •Access to full platform SDKs Sunday, September
16, 12
xamarin Tools xamarin.com •Access to full platform SDKs •100% Native
Sunday, September 16, 12
xamarin Tools xamarin.com •Access to full platform SDKs •100% Native
•Linker Sunday, September 16, 12
xamarin Tools xamarin.com •Access to full platform SDKs •100% Native
•Linker •frequent releases Sunday, September 16, 12
xamarin Tools xamarin.com •Access to full platform SDKs •100% Native
•Linker •frequent releases •active community Sunday, September 16, 12
xamarin Tools xamarin.com •Access to full platform SDKs •100% Native
•Linker •frequent releases •active community •Improved API Sunday, September 16, 12
CFStringRef keys[] = { kCTFontAttributeName,
kCTForegroundColorAttributeName }; CFTypeRef bval[] = { cfListLineCTFontRef, CGColorGetConstantColor(kCGColorBlack) }; attr = CFDictionaryCreate ( kCFAllocatorDefault, (const void **) &keys, (const void **) &bval, sizeof(keys) / sizeof(keys[0]), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); astr = CFAttributedStringCreate( kCFAllocatorDefault, CFSTR("Hello World"), attr); obj-c Sunday, September 16, 12
C# CFStringRef keys[] = { kCTFontAttributeName,
kCTForegroundColorAttributeName }; CFTypeRef bval[] = { cfListLineCTFontRef, CGColorGetConstantColor(kCGColorBlack) }; attr = CFDictionaryCreate ( kCFAllocatorDefault, (const void **) &keys, (const void **) &bval, sizeof(keys) / sizeof(keys[0]), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); astr = CFAttributedStringCreate( kCFAllocatorDefault, CFSTR("Hello World"), attr); obj-c var attr = new CFStringAttributes { Font = listLineCTFont, ForegroundColor = UIColor.Black.CGColor }; var astr = new NSAttributedString ("Hello World", attrs); Sunday, September 16, 12
<activity android:name=".SampleActivity" android:label="@string/app_name"> <intent-‐filter>
<action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-‐filter> </activity> findViewById(R.id.button).setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { // handle click } } ); Java Sunday, September 16, 12
C# <activity android:name=".SampleActivity" android:label="@string/app_name">
<intent-‐filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-‐filter> </activity> findViewById(R.id.button).setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { // handle click } } ); Java [Activity(Label="@string/AppName", MainLauncher=true)] FindViewById<Button>(Resource.Id.Button).Click += delegate { // handle click }; Sunday, September 16, 12
Environment: iOS Mac OS X MonoDevelop Xcode Integration Sunday, September
16, 12
Environment: android Mac OS X Windows MonoDevelop Visual Studio Sunday,
September 16, 12
UI Designer: MonoDevelop and Visual Studio Environment: android Sunday, September
16, 12
Environment: windows phone Windows Visual Studio Sunday, September 16, 12
Benefits Sunday, September 16, 12
•Powerful and mature language Benefits Sunday, September 16, 12
•Powerful and mature language •Skill reuse Benefits Sunday, September 16,
12
•Powerful and mature language •Skill reuse •Native apps Benefits Sunday,
September 16, 12
•Powerful and mature language •Skill reuse •Native apps •Code reuse
across platforms Benefits even non-mobile platforms! Sunday, September 16, 12
app Architecture UI# C## Run)me# Pla/orm# Silverlight# Business#Logic# .NET# WP7#
iOS# Mono# Android# MonoTouch# Mono#for# Android# Sunday, September 16, 12
What code can be shared? Sunday, September 16, 12
What code can be shared? •Most non-UI or platform code
Sunday, September 16, 12
What code can be shared? •Most non-UI or platform code
•Core application logic Sunday, September 16, 12
What code can be shared? •Most non-UI or platform code
•Core application logic •Entities Sunday, September 16, 12
What code can be shared? •Most non-UI or platform code
•Core application logic •Entities •LINQ (objects, XML) Sunday, September 16, 12
What code can be shared? •Most non-UI or platform code
•Core application logic •Entities •LINQ (objects, XML) •Network access Sunday, September 16, 12
What code can be shared? * with some limitations •Most
non-UI or platform code •Core application logic •Entities •LINQ (objects, XML) •Network access •File / Database Access * Sunday, September 16, 12
sharing techniques Sunday, September 16, 12
sharing techniques •File Linking Sunday, September 16, 12
sharing techniques •File Linking •Abstraction Sunday, September 16, 12
sharing techniques •File Linking •Abstraction •Observer Pattern Sunday, September 16,
12
sharing techniques •File Linking •Abstraction •Observer Pattern •Partial Classes and
Methods Sunday, September 16, 12
sharing techniques •File Linking •Abstraction •Observer Pattern •Partial Classes and
Methods •Conditional Compilation Sunday, September 16, 12
sharing techniques * currently in development •File Linking •Abstraction •Observer
Pattern •Partial Classes and Methods •Conditional Compilation •portable class libraries * Sunday, September 16, 12
library: xamarin.mobile Supports iOS, Android and Windows Phone xamarin.com/mobileapi Sunday,
September 16, 12
Case Study: iCircuit Sunday, September 16, 12
Case Study: iCircuit http://praeclarum.org/post/15789866032/icircuit-code-reuse-part-trois 19% 81% Shared Platform 31% 69%
13% 87% iOS WP7 Mac Sunday, September 16, 12
Case Study: TouchDraw Sunday, September 16, 12
Case Study: TouchDraw http://lipsky.me/2012/9/11/touchdraw-code-reuse-updated 39% 61% Shared Platform 24% 76%
28% 72% iOS Mac Android Sunday, September 16, 12
Demo Time Sunday, September 16, 12
Questions? Sunday, September 16, 12