ios & android dev in c# & visual studio using xamarin

Post on 07-May-2015

1.233 Views

Category:

Technology

12 Downloads

Preview:

Click to see full reader

DESCRIPTION

Rarely does a developer have the luxury of building mobile apps for a single mobile platform. The fact is, the smartphone and tablet space is dominated by three big platforms: iOS, Android and Windows. Traditionally, this means using each platform's provided technology and SDK, i.e. Objective-C for iOS, Java for Android and .NET for Windows, or choosing a write-once/run-anywhere cross-platform toolkit which provides a lowest-common-denominator experience on all platforms, and prevents developers from going "to the metal" on any given platform to take advantage of the native features that make a mobile platform great. With Xamarin, however, this limitation does not exist. Not only do you get a single, modern language (C#) and framework (.NET) across all three platforms, but you also get a native experience on each, giving your code direct access to the underlying SDK and device metal, including platform-specific UI and device capabilities, so that you can deliver a truly amazing native experience on every platform you target.

TRANSCRIPT

iOS & Android Development in C# & Visual Studio

Nishanth AnilDeveloper Evangelist Xamarin

nish@xamarin.com @nishanil

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 Portal

http://windowsazure.com

Azure DemoInitialize

await a list of data

await inserting a new object

Azure Demo

Cloudy Cross-Platform Apps

XamarinC# on iOS and Android

Azure

Parse

Parse Component

Parse Portal

http://parse.com

Parse DemoInitialize

await a list of data

await inserting a new object

Parse Demo

https://github.com/xamarin/mobile-samples/tree/master/TaskyPortable

https://github.com/conceptdev/TaskCloud (Azure & Parse)

Links

Nishanth AnilDeveloper Evangelist Xamarin

nish@xamarin.com @nishanil

top related