Thursday 6 April 2017

What is Xamarin.

                   
Xamarin is a Microsoft-owned SanFrancisco, California-based software company founded in May 2011 by the engineers that created Mono, Mono for Android and MonoTouch, which are cross-platform implementations of the Common Language Infrastructure (CLI) and Common Language Specification (CLS) (often called Microsoft .NET). CLI describes executable code and a runtime environment that allows multiple high-level languages to be used on different computer platforms without being rewritten for specific architecture.

Xamarin is a commercial software development tools that allow a user to develop applications for Android, iOS, and Windows using C# language and the .NET framework.
Xamarin allows us to code application logic once and then share it across both iOS and Android. Compare this to working in the native environments of the two platforms where the logic must be implemented once in Java for Android then the same logic implemented a second time in Objective-C for iOS.

            Xamarin Studio or Visual Studio is used to develop the applications. Basically, Xamarin Studio is for Mac users and the Visual Studio for windows platforms. In Xamarin Studio we have Xamarin.iOS and Xamarin.Android for different platforms to use native APIs. To build UI for the application we use Xamarin.Forms. It has a property that the code can share on Android and iOS as well.



Xamarin Products:
1.    Xamarin platform
2.    Xamarin.Forms
3.    Xamarin Test Cloud
4.    Xamarin for Visual Studio
5.    Xamarin.Mac (Xamarin Studio)

Why we use Xamarin:

  • Xamarin allows us to code application logic once and then share it across both iOS and Android.
  • Using Xamarin, we only need to learn one language, C#. No need of java (Android) and Objective-C (iOS).
  • The combination of the core .NET classes with the platform-specific classes allow applications to share core logic across both iOS and Android while taking advantage of the each platform's unique features.
  • Readiness for the future
  • Faster time to market
  • One technology stack to code for various platforms










Platforms to develop applications:

We Use Visual Studio for developing the applications. Generally, we use the C# programming language to write the business logic. To create UI we use XAML file.
To develop UI we can also use Xamarin.Forms. Xamarin.Forms code can be shared among android, iOS and windows. For Mac users Xamarin.Studio is the best platform to develop the applications.

Windows       –   Visual Studio
Mac                  –   Xamarin.Studio

PREREQUISITE:
  • ·         One should have a good understanding of code written in C# programming language.
  • ·         One should aware of which programming language used in Android and iOS.
  • ·         Should have good knowledge on android and iOS.
  • ·         Experience in Xamarin platform with .Net coding skills
  • ·         Development experience with C#, Dot Net, SQL Server
  • ·         Experience developing applications (iOS and Android)



How it works:



Xamarin architecture contains

·         UI
·         Business logic
·         Runtime
·         Share the code





What is C#?

C# is pronounced as "C-Sharp". It is an object-oriented programming language provided by Microsoft that runs on .Net Framework. By the help of C# programming language, we can develop different types of secure and robust applications:
  • Window applications
  • Web applications
  • Distributed applications
  • Web service applications
  • Database applications etc.

Xamarin.Forms
Xamarin.Forms is a framework that allows developers to rapidly create cross-platform user interfaces. It provides its own abstraction for the user interface that will be rendered using native controls on iOS, Android, Windows, or Windows Phone. This means that applications can share a large portion of their user interface code and still retain the native look and feel of the target platform. It allows us to use native APIs.





Pros and Cons of Xamarin.Forms:
Pros
  • ·         Create one UI for all platforms
  • ·   Use basic components that are available on all platforms (like Buttons, Textfields, Spinner etc...)
  • ·         No need to learn all the native UI frameworks
  • ·         Fast cross-platform development process
  • ·     Custom native renderers give you the ability to adjust the appearance and feeling of controls

Cons
  • ·         It's still a new framework and still contains bugs
  • ·         Especially Windows RT is not yet stable
  • ·         It's sometimes slower than accessing the native controls directly
  • ·         Custom native renderers have boundaries and are poorly documented
  • ·         Xamarin.Android, Xamarin.iOS, Windows Phone, Windows RT


Xamarin.Forms is best for:
  • ·         Data entry apps
  • ·         Prototypes and proofs-of-concept
  • ·         Apps that require little platform-specific functionality
  • ·         Apps where code sharing is more important than custom UI

Xamarin.iOS & Xamarin.Android are best for:
  • ·         Apps that require specialized interactions
  • ·         Apps with highly polished design
  • ·         Apps that use many platform-specific APIs
  • ·         Apps where custom UI is more important than code sharing


Limitations of Xamarin:
  • ·         Xamarin Studio and Visual Studio are not open sourced.
  • ·         Code developed in Xamarin will not transfer and cannot be reused for native or HTML5 applications for iOS or Android.
  • ·         It's still a new framework and still contains bugs.
  • ·         Xamarin doesn’t come for free.
  • ·         Limited Generics Support.
  • ·         No Dynamic Code Generatio

What did I understand from this research?

Xamarin is a platform to build applications for both the platforms Android and iOS. Mono project which is led by the Xamarin is an open source, we can implement our code. The single C# programming language is needed to learn and we can share the code in both the platforms iOS and Android.

            To build applications in Xamarin we should aware about Xamarin and C# programming language. Also aware about .NET framework. How to code on Visual studio.

Xamarin Studio and Visual Studio are not open sourced. But will be freely available for non-enterprise customers as part of Visual Studio Community and Xamarin Studio Community.