Four Steps How to Succeed with Xamarin

Anastasia Zakrevskaya
HeadWorks
Published in
6 min readFeb 13, 2017

Xamarin is a powerful cross-platform framework, that becomes more and more popular. And if you like Xamarin, but don’t know how to start to develop with it or if you have some difficulty — the following information will be useful to you.

We propose you to consider the four main steps that will lead you to the dream development process.

Step 1. LEARN

To become a professional developer you need to acquire knowledge, so to say, pave the way. Xamarin University is a good chance to do it.

Xamarin University is live, online training led by Xamarin experts. This training provides introductions to iOS and Android development, for example, memory management, backend integrations, caching and synchronization. Classes are divided into eight learning tracks, so you can choose one area or learn many of them.

The Xamarin Certified Mobile Developer badge is only for those students who have completed course, demonstrated good skills in cross-platform mobile development using the Xamarin platform and then passed a certification exam. Xamarin Certification is valid for one year from the date of issue, and it can be renewed by taking required classes and completing a short exam.

With Xamarin University you will be not just C# developer, but also skilled mobile developer with best practices.

Step 2. DEVELOP

All we know that knowledge is a treasure, but practice is the key to it. So we are moving from theory to practice.

In order to start creating Xamarin apps, you need to install Xamarin Studio (for Windows and OS X) or Visual Studio (for Windows).

Visual Studio allows developers to create Android, iOS, and Windows apps within the IDE with the use of code completion and IntelliSense. It provides the building, deploying, and debugging of apps on a simulator or a device.

Xamarin Studio provides code completion in C#, an Android UI builder for creating UIs without XML, a debugger and integration with Xcode Interface Builder for iOS app design.

Xamarin offers two products — Xamarin.iOS and Xamarin.Android. These products built on Mono (a software platform, which allows developers to create cross-platform apps with the .NET Foundation). If you create an iOS app, it will be compiled by Xamarin’s compiler to native ARM assembly code. If you create an Android app, it will be compiled down to Intermediate Language, which is then compiled to native assembly code.

Xamarin Studio and Visual Studio contain visual designers for iOS and Android. Such design tools provide drag-and-drop UIs, which are integrated with the Component Store and NuGet. These tools provide the opportunity to add great features, for example, UI controls, charts, and graphs, popular .NET libraries, and other features, which you can add to your app with just a few clicks.

Xamarin is a unique framework because of its possibility to share code on different platforms. You can use the same language, APIs and data structures to share about 75% of app code across all mobile development platforms. But you also have the opportunity to build UIs with Xamarin.Forms and share nearly 100%.

There are two ways how to share code:

  • Shared Projects. You should use the Shared Asset Project type to organize your source code, and then use #if compiler directives to manage platform-specific requirements.
  • Portable Class Libraries. You should create a Portable Class Library for the target platforms and use Interfaces to provide platform-specific functionality.

And what about Application Output? When your app is compiled, you will have an Application Package: an .app file in iOS, or .apk file on Android. These files are the same as the application packages, which are built with the platform’s default IDEs.

As a result, we obtain apps, that look and act as native because they have:

  • Native UIs
  • Native API Access
  • Native Performance

Step 3. TEST

Your application is created and it is good, as you think. But! It needs to be tested. The most effective way to verify how your app works is by running it and using it. To do this, Xamarin provides a good opportunity — Xamarin Test Cloud.

This cloud-based service provides the opportunity to automatically do UI Acceptance Testing of mobile apps on hundreds of different devices.

To write automated UI test you need to use Xamarin.UITest (a framework that allows tests to be written in C# with the use of the popular NUnit testing library). This automated test will run the application’s UI and verify if the application works correctly.

Test Cloud works in the following way: you upload a mobile app and tests to Test Cloud. It will install the app and run the tests on different devices. Test Cloud peculiarity consists in the fact that it separates test runs and executes them across several identical devices simultaneously. This feature considerably increases testing speed and frequency. When all the tests are completed, Test Cloud will send you a notification of the test results.

Step 4. MONITOR

Well, your app is tested. If bugs have been found — fix them, and if the app works correctly, we proceed to the next stage — monitoring.

If you want your application to be successful, you need to be aware of:

  • how users interact with your apps
  • crash reporting and analytics
  • key errors that users are experiencing

Xamarin Insights coped with all of this well. This was a real-time monitoring system that enabled to identify and track issues, and provided resolution of issues for live users. With Xamarin Insights you could significantly increase user satisfaction because issues could be resolved before they impact users.

But a short time later Xamarin Insights functionality was absorbed by HockeyApp. HockeyApp is a tool to get timely information about app behavior at the stage of beta testing and in the app distribution mode in the store.

How does HockeyApp work?

Distribution. All installable apps are located on Dashboard, be it on desktop or mobile. You have full access to device statistics, as an admin. Users can install apps from mobile website or client apps. In addition, you can notify your test users about new versions on all supported platforms. It also helps developers greatly: desktop apps gather all the necessary information about your latest build automatically.

Crash reports. Since open source SDK is integrated with Android, iOS, Mac OS X and Windows, your application sends crash reports to HockeyApp, so it does not require any additional code. HockeyApp processes all crash reports on its servers. It means you get significant stack traces with class names, methods, and accurate line numbers. Also, HockeyApp gathers similar crashes in order to show you which of them has the most influence on your app’s customer experience.

Feedback. You can use feedback for all builds of your app. HockeyApp allows users to create support requests, file bugs, or post ideas right from within your app. All feedback is processed as discussions. You have the opportunity to answer them via email, also you can search either new or old discussion.

Track. As well as crash reporting, HockeyApp offers you a possibility to track any event, which occurs in your app. For example, you can see which features of your application are being used or not.

Integration. HockeyApp is integrated with Visual Studio Team Services. Thus, you get a strong Mobile DevOps process. It provides source code management, continuous integration and agile planning.

Сonclusion

Before starting to develop apps, you need to study and gain necessary skills. For this purpose, there is a good opportunity — Xamarin University. This training not only helps you to learn more quickly than studying on your own, it also will teach you to fluently solve any task with the Xamarin framework.

After studying theory, you can safely proceed to development. To develop with Xamarin means build native apps for multiple platforms on a shared C# codebase and using the same IDE, language, and APIs everywhere.

Any application should be tested. Test Cloud is a good way to build quality mobile apps quickly and with confidence. Test Cloud provides a good opportunity — automate your app testing on 2,000 real devices in the cloud.

You can bring mobile DevOps to your apps with HockeyApp. This is your helper for the mobile app analysis. It is very useful for app developers and allows to obtain benefits such as distribution, crash reports, feedback, powerful workflow integrations.

Each of the steps is very effective, but together, they’re the most powerful solution for delivering amazing apps.

--

--