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
220
Observability-Driven Development: What DevOps is Really About
gshackles
1
350
Monitoring Your Mobile Apps in the Wild
gshackles
1
130
Building Scalable Applications with the Actor Model
gshackles
0
700
Creating a Voice-Driven TV Remote with Azure and Alexa
gshackles
0
170
Build 2017 Recap for Xamarin Developers
gshackles
0
160
Going Serverless: Event-Driven Architecture Without The Infrastructure
gshackles
0
240
Evolve 2016 Redux
gshackles
0
170
Instrumenting Your Mobile Monitoring Strategy
gshackles
0
4.8k
Other Decks in Technology
See All in Technology
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
8
2.4k
Browser Spec: Testing Hotwire with Ruby
takahashim
1
120
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
330
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
0
170
NDIでApple Vision Proにリアルタイム映像送信
jyouryuusui
0
120
その Valkey 使いこなしていますか?
onk
PRO
5
1.5k
無理せず続ける、子育てエンジニアの学び
codmoninc
PRO
0
860
1つのリクエストを追って理解する - llm-dのP/D分離
akhino
1
160
しろおびから始める!ログ活用の第一歩
shumei_ito
0
950
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
4
1k
継続的なAIコスト最適化
bgpat
1
340
re:Invent初参加で変わったこと、2回目にやってみたいこと(JAWS-UG彩の国埼玉 #12)
mhrtech
2
220
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
280
Designing Experiences People Love
moore
143
24k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
HDC tutorial
michielstock
2
960
Abbi's Birthday
coloredviolet
4
10k
Being A Developer After 40
akosma
92
590k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Navigating Team Friction
lara
192
16k
The agentic SEO stack - context over prompts
schlessera
0
970
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