30
T01 Building Mobile CrossPlatform Apps with C# and Xamarin Nick Landry © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin Nick Landry Microsoft Senior Technical Evangelist [email protected] @ActiveNick – AgeofMobility.com Session T01 Level: Intermediate http://www.bigbaldapps.com www.AgeofMobility.com @ActiveNick Who is ActiveNick? 2005-2014 2013-2014

Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

Nick LandryMicrosoft Senior Technical Evangelist

[email protected]@ActiveNick – AgeofMobility.com

Session T01Level: Intermediate

http://www.bigbaldapps.com

www.AgeofMobility.com @ActiveNick

Who is ActiveNick?

2005-20142013-2014

Page 2: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Session Agenda

Audience poll…

Page 3: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Architecting Mobile Apps

Silo Approach:

Build the Same Apps Multiple Times

Page 4: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

The Siloed approach: Build native apps multiple timesMultiple teams and multiple code bases are expensive and slow

+

+

-

Write Once,Run AnywhereApproach

Lowest Common Denominator

Browser Fragmentation

• App Generation.• Web Browser in a

Native Wrapper + Platform APIs.

Page 5: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

The write-once-run-anywhere approachHTML Hybrid scenarios (Semi-native apps) like PhoneGap (i.e. Cordova)

C# + XIB C# + XML C# + XAMLNative UI Native UI Native UI

Optional Remote Services(ASP.NET Web API

or any server technology)

Page 6: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

C# and Xamarin’s unique approachThe best of all worlds

How Xamarin Works

Page 7: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

How Does Xamarin Run C# on iOS or Android?

Xamarin in 2015

Page 8: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Windows APIs

iOSAPIs

100% coverage

Page 9: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

AndroidAPIs

100% coverage

Demo:Building a Basic Native Cross-Platform App in C#

Page 10: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

All 3 characteristics are required for a truly native app

Xamarin is native in all 3 ways

Native User InterfaceApps are built with standard, native user interface controls for easy and familiar interactions

Apps have access to the full spectrum of functionality exposed by the underlying platform and device

Apps leverage platform-specific hardware acceleration, and are compiled as native binaries, not interpreted at runtime.

High-fidelity API Access

Native Performance

Xamarin exposes 100% of the native APIs for iOS, Android and Windows

Page 11: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Anything you can do in Objective-C or Java can be done in C# with Xamarin using Visual Studio

Native Performance

Xamarin.iOS does full Ahead Of Time (AOT) compilation to produce an ARM binary for Apple’s App Store.

Xamarin.Android takes advantage of Just In Time (JIT) compilation on the Android device.

Page 12: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Always Up-to-Date

Full support for:Google Glass, Android Wear, Amazon Fire TV

Xamarin Productsand Tools

Page 13: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Xamarin: How much?

Starter Edition (free)

Indie Edition ($299)

Business Edition ($999)

Enterprise Edition ($1899)

Integration with Visual Studio in Business Edition & above

Xamarin: How much?

Page 14: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Xamarin.Mac

Xamarin Studio

Xamarin Test Cloud

Component Store

Xamarin.iOS

Xamarin.Android

Xamarin for Visual Studio

.NET Mobility Scanner

Development Environment

Xamarin StudioPC or Mac

Visual Studio PluginVS 2010/2012/2013

Page 15: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Xamarin Studio

Visual Studio Integration

Page 16: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Visual Studio Integration

Android Designer

Page 17: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

iOS Designer

Page 18: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Xamarin + Xamarin.FormsWith Xamarin.Forms:

more code-sharing, native controlsTraditional Xamarin approach

Shared UI Code

Xamarin + Xamarin.Forms

Shared UI Code

Page 19: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

What’s Included in Xamarin.Forms

Shared UI Code

How Xamarin.Forms works

Shared App Logic in C#

At runtime, each Xamarin.Forms page and its controls are mapped to platform-specific native user interface elements

iOS C# UI Android C# UI

Shared App Logic

Windows C# UI

Use a single API to generate native, platform-specific user interfaces

Page 20: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Xamarin.Forms: Build Native User InterfacesUsing Shared Code

Shared App Logic in C#

Xamarin.Forms comes with over 40 common controls, pages and layouts to make app UI creation fast and easy

Even basic animations are supported

Xamarin.Forms is Fully Extensible:

• Subclass included controls and customize behavior

• Define and add your own controls, layouts, pages and cells

• Expose your own platform-specific controls in Xamarin.Forms pages

Demo:Sharing UI Code with Xamarin.Forms

Page 21: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Use Decide Screen-by-Screen

Xamarin.Forms is great for forms-based screens. You can mix Xamarin.Forms with the full power of Xamarin.iOS and Xamarin.Android in the same app for complete control over your app’s look and feel.

Xamarin.Forms: Mix-and-Match Screen-by-Screen, Element-by-Element

Call Platform APIs via Shared Services

Need platform-specifc functionality within a Xamarin.Forms page, such as querying the accelerometer? We’ve included services that quickly and easily abstract platform-specific API calls to keep you writing as much shared code as possible.

Embed Custom Views Anywhere

Not only are Xamarin.Forms pages mixable with custom screens, you can embed custom views built directly against Xamarin.iOS and Xamarin.Android into Xamarin.Formspages.

Sharing Code

Page 22: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Shared Projects

NuGet

Page 23: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Portable Class Libraries

Choosing a Code Sharing Option

Page 24: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Demo:Sharing Code PCLs

Page 25: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Native Dev: Platform Tools or Xamarin?Platform Tools (Windows, iOS, Android)

• Default native method to build apps• Free development tools & SDKs• Requires learning at least one language &

SDK per platform (C#, Java, Objective-C)• Design, develop & maintain completely

separate apps for each platform• More learning resources available

• Books, web sites, blogs, training, StackOverflow, videos, larger community, etc.

• Yet, iOS developers are (kinda) starting all over with Swift

Xamarin / Mono

• Reuse existing C# skills & source code (but you have to know C#)

• Need to buy an additional tool: extra cost• Need to learn new tools & techniques• Still need to learn the specifics of each

platform SDK, app architecture & lifecycle• Fewer third-party libraries available• Built-in GUI designer for iOS and Android• Xamarin.Forms provides native shared Uis,

but there is no XAML designer (yet)• Vendor lock-in / dependency

Mobile Strategy Considerations

Audience

• General Consumer Market

• Niche Consumer Market

• Enterprise Users• BYOD

Objectives

• Marketing “Checklist” Apps

• Brand “Reach” Apps• Weekend Warrior Apps• Apps for Profit• Mobile Revolution

Apps

Other Considerations

• Mobile Population Coverage Target & Desired Reach

• Expertise• Resources• Timeframe

Page 26: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Summary

github.com/ActiveNick/MyWeatherNUI github.com/ActiveNick/MyWeather github.com/ActiveNick/BingTranslateDemo

Session Demos

Page 27: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

http://channel9.msdn.com/events/Build/2015/3-770

http://aka.ms/ch9xam2015-1

http://aka.ms/ch9xam2015-2

http://aka.ms/ch9xam2015-3

http://aka.ms/ch9xam2015-4

http://channel9.msdn.com/Search?term=xamarin#ch9Search&lang-en=en

Xamarin Videos for Developers

http://xamarin.com/download

http://docs.xamarin.com

http://evolve.Xamarin.com

http://xamarin.com/university

http://blog.xamarin.com

http://motzcod.es

http://weblogs.asp.net/wallym

http://www.gregshackles.com

Xamarin Resources

Page 28: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Xamarin Developer Certifications:Be part of an Elite Developer Community

Students have the option to take a certification test and become Xamarin certified. Xamarin skills are increasingly in demand – certifications let the market know you represent top talent.

Page 29: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Online Microsoft training delivered by experts to help technologists continually learn

Hundreds of courses for developers, IT Pros, students, entrepreneurs and enthusiasts

11 different languages

More than 2.1M students registered

Build your own Learning Plan

All free!

Cross-Platform Development withXamarin & Visual Studioaka.ms/MVAxamarin

http://www.microsoftvirtualacademy.com

Recommended Xamarin Books

http://aka.ms/Xs5v48

Xamarin Mobile Application Development for Android(Mark Reynolds)

http://aka.ms/Ndl0jn

iOS Development with Xamarin Cookbook(Dimitris Tavlikos)http://aka.ms/S8akz1

Xamarin Cross-Platform Application Development(Jonathan Peppers)

http://aka.ms/Sl5aj9

Page 30: Who is ActiveNick?redmondevents.com/virtual/vslive/2015/austin/pdf/T01...Visual Studio Live! Austin 2015 Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

T01 ‐ Building Mobile Cross‐Platform Apps with C# and Xamarin ‐ Nick Landry© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio Live! Austin 2015

Thank You!Slides will be posted in the conference repository. Demos are on GitHub.

Slideshare: www.slideshare.net/ActiveNick

Blog: www.AgeofMobility.comTwitter: @ActiveNick

Mobile Apps: www.bigbaldapps.comLinkedIn: www.linkedin.com/in/activenickGitHub: github.com/ActiveNick

Email: [email protected]