SlideShare a Scribd company logo
Cross platform development
with C#
By Michele Scandura
Michele Scandura

Senior Software Developer at Compass Informatics (www.compass.ie)


EMAIL
michele.scandura@outlook.com


TWITTER
@mikescandy




BLOG
???
But… HTML5?

“I think the biggest mistake that we made as a company is
     betting too much on HTML5 as opposed to native”
                (Mark Zuckerberg, Sept. 2012)

 HTML5 is indeed a great technology and is here to stay
 Promise: write once, run everywhere
 JavaScript engines are getting faster, and you can use JavaScript
  on client and server
 But…
But… HTML5?


 You have to program in JavaScript 
 Write once, deploy everywhere not 100% true
 UI paradigms are different on each platform
 No access to native libraries
But… HTML5?




     iOS      Android   Windows Phone
C# as a multiplatform alternative

                                   Plus a few nice additions
 Mono makes it possible to run
  C# code on the most                Playstation Mobile (PS VITA)
  widespread platforms               The Unity 3d Engine uses C# as a
   All Windows variants              scripting language (and Unity runs
                                      on Wii and WiiU, PS3, XBOX, Flash)
   Linux
                                     PS4 will definitely run C# code
   OSX
                                     BSD, Solaris, Wii, PS3
   iOS
                                     CPU architecture is not an issue:
   Android                           x86, x64, IA64, PowerPC, SPARC,
                                      ARM…
Advantages in using C#

 Linq / Lamda, Parallel Linq, Tasks
 Memory management (no pointers, but leaks are still a problem)
 Strongly typed implicit variable declaration
 Extension methods
 Strongly typed
 Generics
 WCF
 Async/await
 (This applies only if using Visual Studio) ReSharper
C# as a multiplatform alternative



 “Between Windows, iOS and Android, your C# code can
             run on over 2.2 billion devices”
       Nat Friedman (CEO of Xamarin, Jan 2013)
Introducing Xamarin

 Newly released tools: Xamarin Studio,
  Xamarin.Android and Xamarin.iOS (formerly
  Mono for Android and MonoTouch
 Provide full access to platform SDK
 100% native
 Faster than native! (Mono vs. Dalvik,
  xobotos)
 Always in sync with native SDKs
 (iOS 6.1 released 28/1, MonoTouch update
 released the next day)
Reusable code


 Most non-UI code can be shared across platforms
   Core logic
   Entities, messages, interfaces
   Linq
   Network access


 File / Database access might be tricky
Reusable code: how to


 File linking
 Abstraction
 Observer pattern
 Partial classes
 Conditional compilation
 Portable class libraries
Useful C# libraries

 TinyIoC / TinyMessenger
 WaveEngine
 MonoGame (XNA)            We have IoC containers,
 EmguCv (open CV)          MVVM, 2D and 3D game
 NetTopologySuite          engines, ORM, Image
 MVVMCross                 processing library, Logging,
                            Web services, GIS tools…
 SQLite-Net
 ServiceStack
 Log4Net
 Many more
And native too


 Google Maps API V2
 Flurry
 OxyPlot.2DGraphLib
 Chipmunk Physics
 And many more
Tips and tricks


 Developing for iOS requires a Mac
 Emulators are good but:
     iOS provides an x86 simulator
     Android provides both ARM and x86 emulators
 iOS deployment still requires the usual certificates and some Xcode
 Memory leaks
 Git support in TFS / Xamarin Studio
Demo time (sort of!)
Conclusions


 It all sounds great, isn’t it?
 Sometimes is not straightforward as it seems
 Relying on semi-closed platform
 Specific platform knowledge is still a must: get ready to learn some
  Java and objective-c
 Mobile is not only coding, UI and UX are crucial for a successful app
Some links

Apache Cordova - http://cordova.apache.org/
Xamarin - http://xamarin.com/
iOS Dev Center - https://developer.apple.com/devcenter/ios/index.action
Android Developer - http://developer.android.com/index.html
Xamarin on GitHub - https://github.com/xamarin
The Mono Project - http://www.mono-project.com/Main_Page
TinyIoC - https://github.com/grumpydev/TinyIoC
TinyMessenger - https://github.com/grumpydev/TinyMessenger
WaveEngine - http://www.waveengine.net/
MonoGame (XNA) - http://monogame.net/
EmguCv (open CV) - http://www.emgu.com/wiki/index.php/Main_Page
NetTopologySuite - http://code.google.com/p/nettopologysuite/
MVVMCross - https://github.com/slodge/MvvmCross
SQLite-Net - https://github.com/praeclarum/sqlite-net
ServiceStack - http://www.servicestack.net/
Xamarin.iOS Bindings - https://github.com/mono/monotouch-bindings
OxyPlot.2DGraphLib - https://github.com/Emasoft/OxyPlot.2DGraphLib.MonoTouch
ShinobiControls - http://blog.xamarin.com/shinobicontrols-joins-the-xamarin-component-store-and-
evolve-speaker-lineup/

More Related Content

What's hot

Cross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with XamarinCross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with Xamarinbryan costanich
 
C++ in Windows Phone Apps - Overview
C++ in Windows Phone Apps - OverviewC++ in Windows Phone Apps - Overview
C++ in Windows Phone Apps - OverviewMirco Vanini
 
Deep Dive into WinRT
Deep Dive into WinRTDeep Dive into WinRT
Deep Dive into WinRT
Sasha Goldshtein
 
C++ in windows phone apps
C++ in windows phone appsC++ in windows phone apps
C++ in windows phone apps
Mirco Vanini
 
New rich text document
New rich text documentNew rich text document
New rich text document
AA Coaching Academy
 
Visual Studio for Mac (AltConf 2017)
Visual Studio for Mac (AltConf 2017)Visual Studio for Mac (AltConf 2017)
Visual Studio for Mac (AltConf 2017)
Craig Dunn
 
Flutter Tutorial For Beginners | Edureka
Flutter Tutorial For Beginners | EdurekaFlutter Tutorial For Beginners | Edureka
Flutter Tutorial For Beginners | Edureka
Edureka!
 
Compilation Of C/C++ program in Android
Compilation Of C/C++ program in AndroidCompilation Of C/C++ program in Android
Compilation Of C/C++ program in Android
rahulverma1080
 
Xamarin Best Cross Platform Mobile App Development Solution
Xamarin Best Cross Platform Mobile App Development SolutionXamarin Best Cross Platform Mobile App Development Solution
Xamarin Best Cross Platform Mobile App Development Solution
Ramin mohmaad hoseini
 
Software Developer's Journal - 02/2012
Software Developer's Journal - 02/2012Software Developer's Journal - 02/2012
Software Developer's Journal - 02/2012
Ricardo Peres
 
Cross-platform mobile dev with Mono
Cross-platform mobile dev with MonoCross-platform mobile dev with Mono
Cross-platform mobile dev with Mono
Craig Dunn
 
Building cross-platform mobile apps with Xamarin
Building cross-platform mobile apps with XamarinBuilding cross-platform mobile apps with Xamarin
Building cross-platform mobile apps with XamarinHajan Selmani
 
Windows Phone Apps Development overview
Windows Phone Apps Development overviewWindows Phone Apps Development overview
Windows Phone Apps Development overview
Pruthvi Reddy
 
Flutter study jam 2019
Flutter study jam 2019Flutter study jam 2019
Flutter study jam 2019
Ahmed Abu Eldahab
 
Best Platforms For Mobile App Development
Best Platforms For Mobile App DevelopmentBest Platforms For Mobile App Development
Best Platforms For Mobile App Development
Magneto IT Solutions
 
Silverlight 2 with Visual Studio 2008 and Expression Blend
Silverlight 2 with Visual Studio 2008 and Expression BlendSilverlight 2 with Visual Studio 2008 and Expression Blend
Silverlight 2 with Visual Studio 2008 and Expression Blend
Caleb Jenkins
 
Programming With WinRT And Windows8
Programming With WinRT And Windows8Programming With WinRT And Windows8
Programming With WinRT And Windows8
Rainer Stropek
 
Programming languages
Programming languagesProgramming languages
Programming languagesTammy London
 
Windows 10 & Raspberry Pi 2
Windows 10 & Raspberry Pi 2Windows 10 & Raspberry Pi 2
Windows 10 & Raspberry Pi 2
ByteMinded
 

What's hot (20)

Cross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with XamarinCross Platform Mobile Development with Xamarin
Cross Platform Mobile Development with Xamarin
 
C++ in Windows Phone Apps - Overview
C++ in Windows Phone Apps - OverviewC++ in Windows Phone Apps - Overview
C++ in Windows Phone Apps - Overview
 
Deep Dive into WinRT
Deep Dive into WinRTDeep Dive into WinRT
Deep Dive into WinRT
 
C++ in windows phone apps
C++ in windows phone appsC++ in windows phone apps
C++ in windows phone apps
 
New rich text document
New rich text documentNew rich text document
New rich text document
 
Visual Studio for Mac (AltConf 2017)
Visual Studio for Mac (AltConf 2017)Visual Studio for Mac (AltConf 2017)
Visual Studio for Mac (AltConf 2017)
 
Imaginecup
ImaginecupImaginecup
Imaginecup
 
Flutter Tutorial For Beginners | Edureka
Flutter Tutorial For Beginners | EdurekaFlutter Tutorial For Beginners | Edureka
Flutter Tutorial For Beginners | Edureka
 
Compilation Of C/C++ program in Android
Compilation Of C/C++ program in AndroidCompilation Of C/C++ program in Android
Compilation Of C/C++ program in Android
 
Xamarin Best Cross Platform Mobile App Development Solution
Xamarin Best Cross Platform Mobile App Development SolutionXamarin Best Cross Platform Mobile App Development Solution
Xamarin Best Cross Platform Mobile App Development Solution
 
Software Developer's Journal - 02/2012
Software Developer's Journal - 02/2012Software Developer's Journal - 02/2012
Software Developer's Journal - 02/2012
 
Cross-platform mobile dev with Mono
Cross-platform mobile dev with MonoCross-platform mobile dev with Mono
Cross-platform mobile dev with Mono
 
Building cross-platform mobile apps with Xamarin
Building cross-platform mobile apps with XamarinBuilding cross-platform mobile apps with Xamarin
Building cross-platform mobile apps with Xamarin
 
Windows Phone Apps Development overview
Windows Phone Apps Development overviewWindows Phone Apps Development overview
Windows Phone Apps Development overview
 
Flutter study jam 2019
Flutter study jam 2019Flutter study jam 2019
Flutter study jam 2019
 
Best Platforms For Mobile App Development
Best Platforms For Mobile App DevelopmentBest Platforms For Mobile App Development
Best Platforms For Mobile App Development
 
Silverlight 2 with Visual Studio 2008 and Expression Blend
Silverlight 2 with Visual Studio 2008 and Expression BlendSilverlight 2 with Visual Studio 2008 and Expression Blend
Silverlight 2 with Visual Studio 2008 and Expression Blend
 
Programming With WinRT And Windows8
Programming With WinRT And Windows8Programming With WinRT And Windows8
Programming With WinRT And Windows8
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Windows 10 & Raspberry Pi 2
Windows 10 & Raspberry Pi 2Windows 10 & Raspberry Pi 2
Windows 10 & Raspberry Pi 2
 

Similar to Cross platform development with C#

Minko - Creating cross-platform 3D apps with Minko
Minko - Creating cross-platform 3D apps with MinkoMinko - Creating cross-platform 3D apps with Minko
Minko - Creating cross-platform 3D apps with MinkoMinko3D
 
Paris Android LiveCode - Creating cross-platform 3D apps with Minko
Paris Android LiveCode - Creating cross-platform 3D apps with MinkoParis Android LiveCode - Creating cross-platform 3D apps with Minko
Paris Android LiveCode - Creating cross-platform 3D apps with Minko
Minko3D
 
WebGL games with Minko - Next Game Frontier 2014
WebGL games with Minko - Next Game Frontier 2014WebGL games with Minko - Next Game Frontier 2014
WebGL games with Minko - Next Game Frontier 2014Minko3D
 
Open Kode, Airplay And The New Reality Of Write Once Run Anywhere
Open Kode, Airplay And The New Reality Of Write Once Run AnywhereOpen Kode, Airplay And The New Reality Of Write Once Run Anywhere
Open Kode, Airplay And The New Reality Of Write Once Run Anywhere
guest991eb3
 
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Kai Koenig
 
Introduccion Xamarin Open Closed
Introduccion Xamarin Open ClosedIntroduccion Xamarin Open Closed
Introduccion Xamarin Open Closed
Ivan Martinez
 
Sviluppo x platform con xamarin
Sviluppo x platform con xamarin Sviluppo x platform con xamarin
Sviluppo x platform con xamarin
Dan Ardelean
 
Casual Engines 2009
Casual Engines 2009Casual Engines 2009
Casual Engines 2009
David Fox
 
Top 10 Essential Technologies For Every Full Stack .NET Developer!
Top 10 Essential Technologies For Every Full Stack .NET Developer!Top 10 Essential Technologies For Every Full Stack .NET Developer!
Top 10 Essential Technologies For Every Full Stack .NET Developer!
Aspire Techsoft Academy
 
Mobile Development with Visual Studio by Sergey Seletsky
Mobile Development with Visual Studio by Sergey SeletskyMobile Development with Visual Studio by Sergey Seletsky
Mobile Development with Visual Studio by Sergey Seletsky
SoftServe
 
Presentation1
Presentation1Presentation1
Presentation1kpkcsc
 
Mobile development with visual studio
Mobile development with visual studioMobile development with visual studio
Mobile development with visual studio
Sergey Seletsky
 
Native iOS and Android Development with Xamarin
Native iOS and Android Development with XamarinNative iOS and Android Development with Xamarin
Native iOS and Android Development with Xamarin
James Montemagno
 
Dev days 1 Introduction to Xamarin Taswar Bhatti
Dev days 1 Introduction to Xamarin Taswar BhattiDev days 1 Introduction to Xamarin Taswar Bhatti
Dev days 1 Introduction to Xamarin Taswar Bhatti
Taswar Bhatti
 
Flutter vs. MAUI - Techorama BE 2022
Flutter vs. MAUI - Techorama BE 2022Flutter vs. MAUI - Techorama BE 2022
Flutter vs. MAUI - Techorama BE 2022
Tobias Hoppenthaler
 
Advantages and Opportunities of Cross-Platform Development
Advantages and Opportunities of Cross-Platform DevelopmentAdvantages and Opportunities of Cross-Platform Development
Advantages and Opportunities of Cross-Platform Development
Jochen Kirstätter
 
TK2323 Lecture 1 - Introduction to Mobile Application.pdf
TK2323 Lecture 1 - Introduction to Mobile Application.pdfTK2323 Lecture 1 - Introduction to Mobile Application.pdf
TK2323 Lecture 1 - Introduction to Mobile Application.pdf
Lam Chun
 
Cross Platform Mobile Development with Visual Studio 2015 and C++
Cross Platform Mobile Development with Visual Studio 2015 and C++Cross Platform Mobile Development with Visual Studio 2015 and C++
Cross Platform Mobile Development with Visual Studio 2015 and C++
Richard Thomson
 
Dot Net Project Mini Game
Dot Net Project Mini GameDot Net Project Mini Game
Dot Net Project Mini Game
varun arora
 
Xcoders - iOS & Android Development in C# with Xamarin
Xcoders - iOS & Android Development in C# with XamarinXcoders - iOS & Android Development in C# with Xamarin
Xcoders - iOS & Android Development in C# with Xamarin
James Montemagno
 

Similar to Cross platform development with C# (20)

Minko - Creating cross-platform 3D apps with Minko
Minko - Creating cross-platform 3D apps with MinkoMinko - Creating cross-platform 3D apps with Minko
Minko - Creating cross-platform 3D apps with Minko
 
Paris Android LiveCode - Creating cross-platform 3D apps with Minko
Paris Android LiveCode - Creating cross-platform 3D apps with MinkoParis Android LiveCode - Creating cross-platform 3D apps with Minko
Paris Android LiveCode - Creating cross-platform 3D apps with Minko
 
WebGL games with Minko - Next Game Frontier 2014
WebGL games with Minko - Next Game Frontier 2014WebGL games with Minko - Next Game Frontier 2014
WebGL games with Minko - Next Game Frontier 2014
 
Open Kode, Airplay And The New Reality Of Write Once Run Anywhere
Open Kode, Airplay And The New Reality Of Write Once Run AnywhereOpen Kode, Airplay And The New Reality Of Write Once Run Anywhere
Open Kode, Airplay And The New Reality Of Write Once Run Anywhere
 
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
 
Introduccion Xamarin Open Closed
Introduccion Xamarin Open ClosedIntroduccion Xamarin Open Closed
Introduccion Xamarin Open Closed
 
Sviluppo x platform con xamarin
Sviluppo x platform con xamarin Sviluppo x platform con xamarin
Sviluppo x platform con xamarin
 
Casual Engines 2009
Casual Engines 2009Casual Engines 2009
Casual Engines 2009
 
Top 10 Essential Technologies For Every Full Stack .NET Developer!
Top 10 Essential Technologies For Every Full Stack .NET Developer!Top 10 Essential Technologies For Every Full Stack .NET Developer!
Top 10 Essential Technologies For Every Full Stack .NET Developer!
 
Mobile Development with Visual Studio by Sergey Seletsky
Mobile Development with Visual Studio by Sergey SeletskyMobile Development with Visual Studio by Sergey Seletsky
Mobile Development with Visual Studio by Sergey Seletsky
 
Presentation1
Presentation1Presentation1
Presentation1
 
Mobile development with visual studio
Mobile development with visual studioMobile development with visual studio
Mobile development with visual studio
 
Native iOS and Android Development with Xamarin
Native iOS and Android Development with XamarinNative iOS and Android Development with Xamarin
Native iOS and Android Development with Xamarin
 
Dev days 1 Introduction to Xamarin Taswar Bhatti
Dev days 1 Introduction to Xamarin Taswar BhattiDev days 1 Introduction to Xamarin Taswar Bhatti
Dev days 1 Introduction to Xamarin Taswar Bhatti
 
Flutter vs. MAUI - Techorama BE 2022
Flutter vs. MAUI - Techorama BE 2022Flutter vs. MAUI - Techorama BE 2022
Flutter vs. MAUI - Techorama BE 2022
 
Advantages and Opportunities of Cross-Platform Development
Advantages and Opportunities of Cross-Platform DevelopmentAdvantages and Opportunities of Cross-Platform Development
Advantages and Opportunities of Cross-Platform Development
 
TK2323 Lecture 1 - Introduction to Mobile Application.pdf
TK2323 Lecture 1 - Introduction to Mobile Application.pdfTK2323 Lecture 1 - Introduction to Mobile Application.pdf
TK2323 Lecture 1 - Introduction to Mobile Application.pdf
 
Cross Platform Mobile Development with Visual Studio 2015 and C++
Cross Platform Mobile Development with Visual Studio 2015 and C++Cross Platform Mobile Development with Visual Studio 2015 and C++
Cross Platform Mobile Development with Visual Studio 2015 and C++
 
Dot Net Project Mini Game
Dot Net Project Mini GameDot Net Project Mini Game
Dot Net Project Mini Game
 
Xcoders - iOS & Android Development in C# with Xamarin
Xcoders - iOS & Android Development in C# with XamarinXcoders - iOS & Android Development in C# with Xamarin
Xcoders - iOS & Android Development in C# with Xamarin
 

Cross platform development with C#

  • 1. Cross platform development with C# By Michele Scandura
  • 2. Michele Scandura Senior Software Developer at Compass Informatics (www.compass.ie) EMAIL michele.scandura@outlook.com TWITTER @mikescandy BLOG ???
  • 3. But… HTML5? “I think the biggest mistake that we made as a company is betting too much on HTML5 as opposed to native” (Mark Zuckerberg, Sept. 2012)  HTML5 is indeed a great technology and is here to stay  Promise: write once, run everywhere  JavaScript engines are getting faster, and you can use JavaScript on client and server  But…
  • 4. But… HTML5?  You have to program in JavaScript   Write once, deploy everywhere not 100% true  UI paradigms are different on each platform  No access to native libraries
  • 5. But… HTML5? iOS Android Windows Phone
  • 6. C# as a multiplatform alternative  Plus a few nice additions  Mono makes it possible to run C# code on the most Playstation Mobile (PS VITA) widespread platforms The Unity 3d Engine uses C# as a All Windows variants scripting language (and Unity runs on Wii and WiiU, PS3, XBOX, Flash) Linux PS4 will definitely run C# code OSX BSD, Solaris, Wii, PS3 iOS CPU architecture is not an issue: Android x86, x64, IA64, PowerPC, SPARC, ARM…
  • 7. Advantages in using C#  Linq / Lamda, Parallel Linq, Tasks  Memory management (no pointers, but leaks are still a problem)  Strongly typed implicit variable declaration  Extension methods  Strongly typed  Generics  WCF  Async/await  (This applies only if using Visual Studio) ReSharper
  • 8. C# as a multiplatform alternative “Between Windows, iOS and Android, your C# code can run on over 2.2 billion devices” Nat Friedman (CEO of Xamarin, Jan 2013)
  • 9. Introducing Xamarin  Newly released tools: Xamarin Studio, Xamarin.Android and Xamarin.iOS (formerly Mono for Android and MonoTouch  Provide full access to platform SDK  100% native  Faster than native! (Mono vs. Dalvik, xobotos)  Always in sync with native SDKs  (iOS 6.1 released 28/1, MonoTouch update released the next day)
  • 10. Reusable code  Most non-UI code can be shared across platforms Core logic Entities, messages, interfaces Linq Network access  File / Database access might be tricky
  • 11. Reusable code: how to  File linking  Abstraction  Observer pattern  Partial classes  Conditional compilation  Portable class libraries
  • 12. Useful C# libraries  TinyIoC / TinyMessenger  WaveEngine  MonoGame (XNA) We have IoC containers,  EmguCv (open CV) MVVM, 2D and 3D game  NetTopologySuite engines, ORM, Image  MVVMCross processing library, Logging, Web services, GIS tools…  SQLite-Net  ServiceStack  Log4Net  Many more
  • 13. And native too  Google Maps API V2  Flurry  OxyPlot.2DGraphLib  Chipmunk Physics  And many more
  • 14. Tips and tricks  Developing for iOS requires a Mac  Emulators are good but:  iOS provides an x86 simulator  Android provides both ARM and x86 emulators  iOS deployment still requires the usual certificates and some Xcode  Memory leaks  Git support in TFS / Xamarin Studio
  • 16. Conclusions  It all sounds great, isn’t it?  Sometimes is not straightforward as it seems  Relying on semi-closed platform  Specific platform knowledge is still a must: get ready to learn some Java and objective-c  Mobile is not only coding, UI and UX are crucial for a successful app
  • 17. Some links Apache Cordova - http://cordova.apache.org/ Xamarin - http://xamarin.com/ iOS Dev Center - https://developer.apple.com/devcenter/ios/index.action Android Developer - http://developer.android.com/index.html Xamarin on GitHub - https://github.com/xamarin The Mono Project - http://www.mono-project.com/Main_Page TinyIoC - https://github.com/grumpydev/TinyIoC TinyMessenger - https://github.com/grumpydev/TinyMessenger WaveEngine - http://www.waveengine.net/ MonoGame (XNA) - http://monogame.net/ EmguCv (open CV) - http://www.emgu.com/wiki/index.php/Main_Page NetTopologySuite - http://code.google.com/p/nettopologysuite/ MVVMCross - https://github.com/slodge/MvvmCross SQLite-Net - https://github.com/praeclarum/sqlite-net ServiceStack - http://www.servicestack.net/ Xamarin.iOS Bindings - https://github.com/mono/monotouch-bindings OxyPlot.2DGraphLib - https://github.com/Emasoft/OxyPlot.2DGraphLib.MonoTouch ShinobiControls - http://blog.xamarin.com/shinobicontrols-joins-the-xamarin-component-store-and- evolve-speaker-lineup/