Cross Platforms - Set Your Environment With Visual Studio And Xamarin - Part Two

Introduction

This article is a continuation of Cross Platforms - Reuse The Code And Reach Your Audience Of All Platforms - Part One
Here, I will be briefing you about Azure mobile back-end in C#, Android, iOS and Windows Phone Clients – Data, login and notifications.

Azure mobile back-end in C#

This is used to store our data. This is where we will be managing our logins, apply restrictions from the back-end and we will be throwing some push notifications.

Android, iOS and Windows Phone Clients

We will be building apps for Android, iOS and Windows Phone clients, using Xamarin. Xamarin  is a cross platform tool and you can surf my previous writings more in detail about Xamarin. We will be using Xamarin.Forms here, which provide the user interface for the code reuse and to work with the multiple leverages for the platforms.

Data, Login and Notifications

We will be providing the data and the login details here, which can walk through the other two phases and then allow the clients to work on login, data and send some push notifications, which will be more interesting for the clients.

Thus, Windows is going to talk to Mac and Windows is  also going to join with Android (Open Source platform), and yes, Microsoft has brought its openness to new heights.

Requirements

We will be using Visual Studio with Xamarin here to build the applications, which will allow us to work on all the platforms, where we do not need any Eclipse or any other SDK. For the different platforms, we will be developing all our things using this giant IDE Visual Studio with Xamarin extensions.

Tools needed are as follows

  1. Windows 10 OS.
  2. Visual Studio 2015 – Click here to download it.
  3. Xamarin for Visual Studio – Click here to download it.

Creating Clients using Xamarin

Make sure that you have made your environment ready with Visual Studio 2015 and Xamarin. Run Visual Studio, select Tools and check your  Xamarin account.

Xamarin

Analyze that your Xamarin account is signed in or sign up for a new account at the Xamarin Website, if you do not have an account.

Xamarin

Click New Project in Visual Studio 2015 and you can find Mobile apps with the extensions of Xamarin.Forms.

Xamarin

You can find different templates in the screen, shown above, where you can create a class library.

Let me select Blank app (Xamarin.Forms Portable) here and we will name the project. Select the location where it has to be saved and click OK.

Xamarin

Now, the project gets created in Visual Studio 2015.

Xamarin

We will be getting a new Window with help pane and a Window for adding Mac book with shared access.

Xamarin

We have two things here as Portable class libraries and shared project.

Portable Class Libraries

  • Builds a DLL compatible with all the target platforms.
  • Restricts some APIs to access the shareable code.
  • It will help in handling the refactoring better.
  • Gives better tool support from Xamarin.

Shared Project

  • The code files are included in each project here.
  • The compilers are the directives for the platforms.

You can find the Solution Explorer with the different platforms source code, as shown below with different extensions – .Droid, .iOS, .UWP, .Windows, .WinPhone.

Xamarin

Keynotes in Short

  1. About Azure mobile back-end in C#.
  2. About building apps for Android, iOS and Windows phone clients, using Xamarin.
  3. About Data, login and notifications.
  4. Requirements.
  5. Xamarin Extensions in Visual Studio 2015.


Similar Articles