Understanding XAMARIN – Create iOS, Android, Mac and Windows apps in C#.


Introduction to XAMARIN

This is a continuation of the Windows 8 App Factor challenge material. See https://www.windows8appfactor.com


Image288

Key Facts In short, XAMARIN is about writing code in one language to support the major mobile platforms.

  1. Created by the engineers that created Mono and MonoTouch
  2. Leverages cross-platform implementations of .NET
  3. Consists of a community of 314,588 developers.
  4. All about cross-platform
    • Support iOS, Android, Mac and Windows all in C#.
  5. Reuse existing code
    • Use your favorite .NET libraries in Xamarin apps.
    • Easily use third-party native libraries and frameworks.
  6. 2 IDEs
    • Visual Studio or Xamarin Studio
      • Xamarin Studio is a fully-featured IDE that is built for mobile app development.
  7. Access to native APIs
    • Allows you to create native apps with device-specific experiences.

Image289 
One language, not 3 is the goal of XAMARIN Traditionally this means using each platform’s provided technology and SDK, i.e. Objective-C for iOS, Java for Android and .NET for Windows.

  1. Reasons why you should care
    • Realize tremendous code sharing across mobile platforms
    • Reduce your time to market
    • Leverage existing talent
    • Meet customer demand for multiple device mobile access
    • Reduce cross-platform complexity
  2. You can do both productivity apps and game apps
    • Works best when the focus is on productivity and utility (non-game applications).
  3. Core strength of XAMARIN
    • Implement native user interfaces specifically for each platform
    • But still be able to share most of the non-user interface code and get the best of both worlds
      • Write your data storage and business logic code once
      • Leverage native UIs on each platform

Image291

Key Facts Each of the core platforms that are supported has custom tooling.

Windows Phone Use the XAML/Silverlight presentation layer, using Visual Studio or Blend’s UI designer
Windows 8 Use the Windows Store APIs to create a native user experience.
iOS Use the MonoTouch.UIKit APIs to create native-looking applications, optionally utilizing Apple’s Interface Builder.
Android Use Android.Views to create native-looking applications, taking advantage of Xamarin’s UI designer

Image292

The major pieces The interesting news here is that XAMARIN is capable of creating a native app.

C# language Allows you to use a familiar syntax and sophisticated features like Generics, Linq and the Parallel Task Library.
Mono .NET framework Provides a cross-platform implementation of the extensive features in Microsoft’s .NET framework.
Compiler Depending on the platform, produces a native app (eg. iOS) or an integrated .NET application and runtime (eg. Android). The compiler also performs many optimizations for mobile deployment such as linking away un-used code.
IDE tools The Xamarin Studio IDE and the Xamarin plug-in for Visual Studio allow you to create, build and deploy Xamarin projects.

More to come I will take this a step or 2 further in the next few days.