iOS & Android Dev in C# & Visual Studio using Xamarin
-
Upload
nish-anil -
Category
Technology
-
view
1.233 -
download
12
description
Transcript of iOS & Android Dev in C# & Visual Studio using Xamarin
iOS & Android Development in C# & Visual Studio
Native Platform Languages
Write Once, Run Anywhere?
!= !=
C# to the rescue!
How?
What is Mono?
• Open source implementation of the .NET platform created by Ximian (ECMA 334/335)
• 2001: Created to bring Windows applications to Linux
• 2003: Acquired by Novell with Ximian
• Matured at Novell in research mode; now a world-class runtime.
C#
IronRuby
IronPython
Visual Basic
F#
C# everywhere…
Xamarin
• Founded in May 2011
• Xamarin has a perpetual license to all Mono IP: Copyrights, patents and trademarks
• Focused on mobile app development
Write 100% native iOS, Android and
C#
Write 100% native iOS, Android and Windows apps in C#
Anything you can do in Objective-C or Java can be done in C# with Xamarin.
Modern language C#
Shared code
High performance
How does it work?
• Mono
• “Bindings”
• exposes underlying SDKs as C#
C# 5 .NET 4.5
You
Us
Them
iOS Development
iOS Development
iOS Apps in Visual Studio !?
Android Development
Mac OS X Windows
IDE
iOS
Android
Mac
Windows/Phone
Xamarin Business Edition
+
Mac+
C# Development Environments
Building for Cross Platform
• File Linking
• Portable Class Library
• Conditional Compilation
• Other frameworks..
• Easy/Avoids complexities of PCL
• Can use conditional compilation
File Linking
Portable Class Libraries
• Pre-defined Symbols
• #if __iOS__
• #if __ANDROID__
• #if __MOBILE__
• #if __NETFX_CORE__
Conditional Compilation
Other Frameworks…• MVVMCross
• https://github.com/MvvmCross/MvvmCross
• MonoCross
• http://monocross.net
• http://ifactr.com
• Reactive Extensions / Reactive UI
• http://www.reactiveui.net/
• Vernacular (Localization)
• https://github.com/rdio/vernacular
Maximize Shared Code• SQLite-NET
• Web Services
• Business Logic
• Input Validation
• File Operations (& caching)
• Background Tasks
• Localization
Links• DietCalculator
• https://github.com/nishanil/DietCalculatorPCL
• https://github.com/nishanil/DietCalculatorVS
• iOS
• https://github.com/xamarin/monotouch-samples
• Android
• https://github.com/xamarin/monodroid-samples
• Pre-built Apps
• https://github.com/xamarin/prebuilt-apps
Cloudy Cross-Platform Apps
XamarinC# on iOS and Android
Azure
Parse
Azure Component
Azure Demo
Cloudy Cross-Platform Apps
XamarinC# on iOS and Android
Azure
Parse
Parse Component
Parse Demo
https://github.com/xamarin/mobile-samples/tree/master/TaskyPortable
https://github.com/conceptdev/TaskCloud (Azure & Parse)
Links