Saturday 14 November 2015

What is Xamarin And how to install


Xamarin is a San Francisco, California based software company created in May 2011 by the engineers that created Mono, MonoTouch and Mono for Android which are cross-platform implementations of the Common Language Infrastructure (CLI) and Common Language Specifications (often called Microsoft .NET).

With a C# shared codebase, developers can use Xamarin tools to write native iOS, Android, and Windows apps with native user interfaces and share code across multiple platforms. Xamarin has over 1 million developers in more than 120 countries around the world as of May 2015, it is updated now i don't know the real amount .  

Xamarin is a framework to develop a cross platform mobile application using C#.
There are a number of frameworks that offer cross platform app development. They typically use HTML and JavaScript. Using these frameworks, apps are developed like a website for a mobile app using JS libraries, then the website is packed in a container which gives the feel of a native app. There are some disadvantages of this framework: first, you will not be able to access native UI elements. Second, the app runs slowly and does not give the feel of a native app.
Xamarin is different because it offers a single language C# and runtime that works on three mobile platforms (Android, iOS and Windows). From Xamarin we get a mobile app which looks and feels completely native. Here we write one C# code base which will have access to all features which are available for native SDK.



How Does Xamarin Work?


Xamarin gives the flexibility to write core logic using C# and gives the flexibility to design native user interface specifically for each platform. The amount of code re-use will depend on how much code is kept in core and how much moves into user-interface.

    C# source compiled into a native app in very different for each platform

  • iOS - C# source code is compiled using Xamarin.iOS. It uses a special subset of the mono framework. This subset version of the mono framework has additional libraries. The framework itself allows access to iOS platform specific features. The Xamarin.iOS compiler compiles source code into an intermediate language that is known as ECMA CIL (common intermediate language). After compilation of Xamarin.iOS application code into CIL there is needs to compile it again into native machine code that can run on an iOS device. The process of converting CIL into native code is carried out by the SDK tool “Mtouch.” “Mtouch” returns an application bundle that can be deployed to either the iOS simulator or an actual iOS device, such as an iPhone or iPad. The iOS kernel will not allow programs to generate code at runtime. This restriction is placed by Apple iOS kernel. This restriction has great implications for software systems that run inside a virtual machine using just-in-time compilation. This type of compilation coverts code into intermediate language and at runtime this is converted into machine code. The converted machine code becomes compatible with devices on which it is running. To work around this restriction the “Mtouch” tool compiles the CIL ahead of time.
  • Android - Code of C# is compiled to intermediate language with a package of MonoVM + JIT. If there are any unused classes of framework then in linking it is stripped out. The application runs interact with the java native types through JNI (Java Native Invoke)
  • Windows - Code of C# is compiled to intermediate language which will be executed by the built in runtime. This compiled code does not require Xamarin tools.
 How to install Xamarin?


 we just need four steps to install  Xamarin


  • Download the Xamarin installer
  • Run the installer
  • Configuration
  • Activation
  1. Download the Xamarin installe
         First, download Xamarin from here.



Fill the required information to download the Xamarin installer.


After download the Xamarin installer, run the installer.


2. Run the installer










3.Configuration

After installing Xamarin, we need to configure the Xamarin to tell them (Xamarin and VS IDE) the location of Java and Android SDK.

When we install the installer places the installed component in their default location and configure the development environment with these default path. But if we already have these components in our system, then we need to change the path.

To configure SDK locations in Xamarin, go to Xamarin studio, select tool->options-> SDK location


Configure Visual Studio

To configure the Visual Studio, go to Visual Studio.

Path is tool->options->Xamarin

4. Activation
It’s time to activate your account, go to Xamarin studio, click on login and create your free trail account, now you can login your account.




     Here we go ..................
     We are successfully  installed and configure xamarin in to pc
     Now your turn make your contribution to change the world
     Happy coding (:
     

2 comments:

  1. Thanks for sharing this valuable informative post on what is Xamarin and how to install it. Helpful for Xamarin Apps Development.

    ReplyDelete