devintersection 2014 ios and android development for c# developers
DESCRIPTION
As the mobile landscape continues to expand and evolve managing multiple code bases in different programming languages and development tools can become a nightmare fast. In this session you will learn how to leverage the awesome features of C# and combine them with Xamarin technology to design and develop beautiful native cross platform mobile apps for iOS, Android, and Windows from a shared C# code base with the tools that you love. We will even see how to share more code with Xamarin.Forms, which enables you to build native UIs for iOS, Android and Windows Phone from a single, shared C# codebase.TRANSCRIPT
DEVintersec+on Session DEV213
iOS and Android Development!
for the C# Developer with Xamarin!James Montemagno
[email protected] @JamesMontemagno
#Xamarin
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com 2
Who is this guy?!
James Montemagno!Developer Evangelist, Xamarin!
MyStepCounterApp.com!
The best language for Windows development. Modern Features • Advanced Tools • Proven Libraries • Large Community • Statically Typed
Windows Developer in Phoenix
I had an opportunity.
Xamarin makes C# the best language for mobile development. Native Code Generation • Platform API Bindings • Code Sharing • Visual Studio
+
What is native?!
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com 9
The Anatomy of a Native App!
Native User Interfaces! Native API Access! Native Performance!
?! ?!?!
Architecting !Mobile Apps!
Silo!Approach!
Build Apps!Multiple Times!
Write Once,!Run Anywhere!Approach!
Lowest !Common!Denominator!
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com 13
Xamarin’s Unique Approach!
Native With !Code Sharing!
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com 14
Windows APIs!
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com 15
iOS APIs | 100% Coverage!
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com 16
Android APIs | 100% Coverage!
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com 17
Anything you can do in Objective-C, Swift, or Java !can be done in C# with Xamarin using Visual Studio!
How!Xamarin!Works!
§ C# + .NET Runtime!§ Native UI!§ Native Performance!
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com 19
Always Up to Date!
Android Develop on:!• Mac or PC!• Xamarin Studio or Visual Studio!
Run on:!• Google Emulators!• Xamarin Android Player!• Physical Device!
Xamarin Android Player Super High Speed Android Emulator!• Mac or PC!• Runs Side-by-side WP Emulator!
Free for Xamarin Subscribers:!• Xamarin.com/Android-Player!
Develop on:!• Mac in Xamarin Studio!• or!• PC in Visual Studio (connected to Mac “Build Host”)!
Run on:!• iOS Simulators on Mac!• iOS Device plugged into
a Mac!
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com
Let’s build an app!
iOS Photo Sharing!"Live coding adventure part 1!
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com 24
Code Sharing!
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com 25
Code Sharing Statistics!
Android
iOS
Mac
WP
Portable Class Libraries!
• 1 Assembly!• Target Multiple
Platforms!• Easy to
distribute!
NuGet!
Shared Projects!
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com
Let’s share some code!
Code sharing strategies Live coding adventure part 2
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com 30
What about !the UI?!
Xamarin + Xamarin.Forms!
With Xamarin.Forms: !more code-sharing, native controls!Traditional Xamarin approach!
Shared UI Code!
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com
Let’s take a quick look!
Travel Expenses + Azure Mobile Services!
Create native iOS, Android, Mac and Windows apps in Visual Studio and C#
Automatically test your app on thousands of real devices in the cloud.
Real-time monitoring. Track crashes and exceptions to understand what is
happening with live users
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com 37
Unrivaled Mobile Development Training!Live unlimited mobile development training from mobile experts, !in your time-zone, on your schedule and as often as you'd like.!
xamarin.com/university
38 © DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com
Awesome Announcements!
39 © DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com
Awesome Announcements!§ Visual Studio 2015 Preview Release
o Built in templates
§ Visual Studio Community Edi+on Support § Free Xamarin Starter Edi+on for Visual Studio Users
o Doubled size limit
o hBp://www.xamarin.com/starter
o Available in Xamarin Studio Today, Visual Studio in next few weeks
§ Special offers for MSDN Subscribers o hBp://www.xamarin.com/msdn
40 © DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com
Review!
§ Re-use your C# and .NET skill to develop iOS and Android mobile apps with Xamarin!
§ Xamarin apps look and feel native, because they are native!
§ Xamarin gives you 100% API Coverage!§ Use the tools you love like Visual Studio!§ Use the .NET libraries you know and love!
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com 41
References!
§ Get Started!
o Xamarin.com!
§ Get your free C# Shirt!
o Xamarin.com/Shirt!§ Me:!
o [email protected]!o http://github.com/jamesmontemagno!o @JamesMontemagno!
§ Slides: !
© DEVintersec-on. All rights reserved. h6p://www.DEVintersec-on.com
Ques+ons?
Thank you! #Xamarin
Don’t forget to enter your evalua+on of this session using EventBoard!