Cross Platforms - Reuse The Code And Reach Your Audience On All Platforms - Part One

Introduction

This article is about working in cross platforms and reusing the same code to reach a wide audience who works with different platforms like Android, iOS and Windows. Here, we will be walking through the gates of C#, Xamarin, and Azure.

I will be walking through the very basic steps of why we need cross platform, why we need Xamarin, why we should go for C# and finally, why we should use Azure Mobile Service. 

Why should you go for cross platforms?

In spite of building separate apps for each platforms, why should I move towards cross platform? Let me be brief! Cross platforms are simple. We will be using the same code for all the platforms of the apps which we need. We don’t want to swap for multiple programming regions to code for the different platforms when we work here. For example, we don't need to worry about Java or JAR files, Eclipse or Android Studio, if we are building an Android app using cross platform here. You don't  need to worry about Objective C or XCode, when you build apps for iOS, and you don't have to worry about C# in the back-end for Windows Phone Applications. Cross platforms supports us a lot in code reuse between iOS and Java.

Why should I go for Xamarin here?

Xamarin is the best cross platform tool that I have ever come across. It provides cross platform app development in C#, so we don't need to write Java or Objective C. We can just use C# and leverage the same for all the platforms. Xamarin also helps us by providing the designers with the different platforms like Android, iOS, etc. The storyboards for the different platforms and controllers for iOS will help us to write our Applications in a rich royal way for a particular platform and use it for all. Xamarin also supports us with accessing the native API’s, if I am writing an Application in C#. Still, I can access the native API’s of iOS, which are of Objective C and the same for Java in an Android.

Working with development, we have two gates to walk through – Xamarin Studio and Visual Studio.

Xamarin Studio supports for Windows or Mac.

Visual Studio supports only Windows, provided you can build and debug on Mac.

Why should I use C#?

Again, this is a good  question, that I used to think about in my earlier days and am now happy to write about in C# Corner. This is an easy language that we can move through, using the same patterns of C with the curly braces {} - semicolons and this not much different from Java. This C# also supports us for cross platform and helps a lot in working with synchronization such as sending the request in the networks, working with native API’s etc. 

Why do we need Azure Mobile Services?

Azure Mobile Service is an important segment of the Azure Cloud from Microsoft and this provides a back-end for our mobile Applications. Here is where we will be storing the data which we created and will reuse it. We have plenty of support from Azure Mobile Services for things like Facebook, Azure active directory, etc., just plug-in with your configuration in mobile services and it works in a way which is easier in Azure mobile Services. The most powerful feature I can name here is Azure Push Notification, which is built on Azure Service Bus, which you can register with your clients and can send the messages in all the platforms with a push notification, which will help with a pop-up on the device top screen. The back-end will be built in C# or JS and you can choose the same in Azure portal when you work with Azure Cloud portal.

Keynotes in Short

  1. Why should I go for cross platforms?
  2. Why should I go for Xamarin here?
  3. Why should I use C#?
  4. Why do we need Azure mobile Services?

Keep following my articles for my next topics on Azure mobile back-end in C#, Android, iOS, and Windows phone clients – Data, Login and Notifications.

Up Next
    Ebook Download
    View all
    Learn
    View all