Open Source for you

It’s Easy to Build and Install Mobile Apps with Xamarin

-

Xamarin is a popular choice these days for mobile applicatio­n developmen­t. It provides the key advantages of platform independen­ce, code reusabilit­y, easy testing and maintainab­ility. This article discusses how to install and develop a mobile applicatio­n using the Xamarin platform.

Xamarin is a crossplatf­orm mobile app, the developmen­t of which started in 2011. It was acquired by Microsoft in

2016. Xamarin allows developers to rapidly create cross-platform user interfaces. This framework is based on .NET architectu­re and is used for building iOS, Android and Windows apps. The working architectu­re of Xamarin is based on a single, shared codebase system, which has access to all the features of the native software developmen­t kit (SDK).

When should you consider using the Xamarin platform?

Xamarin is a very powerful mobile applicatio­n developmen­t platform with a comprehens­ive set of features such as enriched collection­s of class library files, easy testing, and robust compiletim­e checking. It is easy to use and has few runtime errors. The following are use cases of mobile applicatio­ns where Xamarin is the best choice.

ƒ For applicatio­ns with a simple user interface: In Xamarin, built-in properties such as layout, material theme, and Android controls are used to set up a simple user interface.

For single language applicatio­n platforms: Xamarin enables the developmen­t of mobile applicatio­ns with the C# programmin­g language and .NET framework. This is helpful for developers who are familiar with this programmin­g language.

For small budget applicatio­ns:

In Xamarin, the code base for the same logic can be reused using features such as portable class libraries (PCL). Thus, the Xamarin

framework is the most preferred to develop a small budget applicatio­n. ƒ For applicatio­ns with shared logic: Another popular feature of Xamarin is sharing of logic source code. The logic for modules such as ‘input validation’, ‘Web service calls’, ‘database interactio­ns’ and ‘backend enterprise­s’, can be written once and shared across the life cycle model.

Installing Xamarin on Windows

To install Xamarin on Windows, the system requiremen­ts are:

ƒ 2GB of RAM

ƒ 800MB to 200GB of hard disk space

ƒ Visual Studio 2012 or higher version

To begin installati­on, download the dump file of Xamarin and Visual Studio 2019 software.

During the installati­on process, select the mobile developmen­t with .NET workload as depicted in Figure 1. This is used to build a cross-platform applicatio­n for iOS, Android, or Windows using Xamarin.

The installati­on process can be monitored using progress bars, as

shown in Figure 2.

Developing a mobile app using Xamarin

To develop a mobile app using Xamarin, first start a new instance of Visual Studio. This can be done using File>New->Project. We have created a new project with ‘first App’ as its name, as shown in Figure 3.

After successful configurat­ion of the project name, the Xamarin.form home page will open, as shown in Figure 4. This will be used to start the process of building your mobile applicatio­n.

Once the Xamarin platform is ready, a mobile applicatio­n can be developed using the following two sub-steps: i)

 ??  ??
 ??  ??
 ??  ?? Figure 1: Select mobile developmen­t with .NET workload
Figure 1: Select mobile developmen­t with .NET workload
 ??  ?? Figure 3: Configurin­g project name and path location
Figure 3: Configurin­g project name and path location
 ??  ?? Figure 2: Monitoring the progress of Visual Studio installer
Figure 2: Monitoring the progress of Visual Studio installer
 ??  ?? Figure 4: Xamarin.form home page view
Figure 5: Configurin­g the content page for the mobile app
Figure 4: Xamarin.form home page view Figure 5: Configurin­g the content page for the mobile app
 ??  ?? Figure 6: ‘Hello world’ applicatio­n deployed using Xamarin
Figure 6: ‘Hello world’ applicatio­n deployed using Xamarin

Newspapers in English

Newspapers from India