Hybrid mobile apps in 2018: React Native vs Xamarin
By: The Software House
Tags: Mobile App Development, Software Development, Xamarin, Hybrid App Development, React Native

What’s on the market

Business-wise, software must work, as well as be user-friendly and future-proof. Technology plays a second role. However, some technology choices have business consequences. Below, we’ve listed a couple of major decisions you can make when it comes to hybrid mobile apps.

Websites & progressive web apps (PWA)

Today’s websites are no longer just static content with a bunch of forms and links. Contemporary web apps compete with desktop and mobile software in fields of UX and functionality. And yet, not everything works the same way on a mobile phone. When it comes to working in the background, Bluetooth, battery information or iOS FaceID, web apps are a no-go.

A progressive web app (PWA) is a new concept which, to some extent, combines web and native approaches. It’s a web application that can work offline to some degree, with an icon visible on the home screen. Its limitations, however, stay the same. The app’s behaviour and capabilities depend heavily on the platform. It’s an interesting concept that can evolve and improve, but, first, it needs time to mature (iOS has just started supporting PWAs as of version 11.3).

You need to remember that PWA is nothing more but a website with push notifications pretending to be a mobile app (source: easternpeak.com)

Traditional (web) hybrids

For years, traditional hybrids have been the first choice for a quick MVP or very simple products. There are many tools to choose from: the most popular Apache Cordova, its cousin PhoneGap, Angular-based Ionic, and more. The pros of this approach are: a single code base plus a lower cost of development and maintenance. What’s more, such a product can have a web version out of the box. The cons are less obvious and not everybody talks about them point-blank.

But, the truth is, you can’t 100% mimic native apps with traditional hybrid mobile apps, no matter what their creators say.

You’ll experience worse performance, inferior UX, and a narrow set of ready-to-use features to implement. There will be myriads of little things working noticeably strange or slower. Even if you’re not able to put your finger on it, the app will always seem a bit off.

Fortunately, the supremacy of traditional hybrids has ended, as the recent months brought us superior alternatives. At least, that’s what we think.

Xamarin

With Xamarin, you can build native apps for many platforms. It allows C# and .NET developers to create native apps for Android, iOS and Windows. There are 2 ways of doing it in Xamarin. The first one is Xamarin Forms, which creates a single code base which is shared among the platforms with almost no changes. But there’s a cost: Xamarin.Forms is good for building simple MVPs, rapid prototyping or very, very simple apps. Even Xamarin states in its documentation files:

Xamarin.Forms allows for rapid prototyping of applications that can evolve over time to complex applications.

So, using Xamarin.Forms for more demanding projects might be difficult.

For complex hybrid mobile app development, there’s the Xamarin Native approach. Using Xamarin Native, you get the look and feel of a native app, plus you can work with only one technology (C# and .NET). It means you can have just one team of developers to pay. Drawbacks? There’s no longer a single code base, so you end up with two separate projects to create and maintain — one for each platform. Only portions of the code base can be shared (like business logic or communication services). UI implementations must remain separate.

If you have .NET developers, Xamarin Native is a great tool as you can assign available resources to mobile development. It’ll also work on Windows, perform well and provide good users experience. In conclusion, it’s better than traditional hybrids. So what’s the cost? Time. Mobile apps created with Xamarin Native will take more time to develop compared to a traditional.

React Native

Facebook has created React Native (RN) for JavaScript (JS) developers. Using RN, you can build iOS and Android mobile apps in React (JS library for building user interfaces). Smart move, as React is very popular and battle-tested.

If this sounds like a traditional hybrid description, JS is the only link here. In RN, you don’t build websites inside a native wrapper. You develop native applications in JavaScript (technically, React and a markup HTML-like language). RN translates the code into instructions for both iOS and Android. So, you “speak” React/JavaScript, and RN translates it on the fly. This way, mobile devices can easily display e.g. an Android-specific button. This is a modern hybrid — one code for all operating systems.

This results in a better user experience and the feeling of a native app. Hybrid mobile apps made with RN run more smoothly, and the user is quite often unable to tell the difference (unlike with traditional hybrids).

Disadvantages? Some platform-specific functionalities might be difficult to achieve. Not everything available for native apps is provided off-the-shelf by RN. On the other hand, developers can add a piece of native code for missing extensions, or use one of the thousands built by the RN community. RN is used even by big players, like Microsoft or Wix, which contributes to the community’s impressive size.

In the end, RN hybrid mobile apps can’t compete with native ones in some aspects. But, usually, the final effect is more than satisfactory. The framework is a huge improvement over traditional hybrids in terms of both user experience and performance. At The Software House, we believe that it offers good value for money.

NativeScript

NativeScript is a hybrid mobile app framework similar to RN but based on Angular (another JS framework). It tackles the hybrid problem like RN does — by using native components and classes based on your JavaScript code. There’s a bunch of ready-to-use multi-platform components available inside the framework and, just like with RN, it’s possible to extend it when needed.

If you have a team of JS developers who are experienced with Angular, NativeScript is definitely something to consider. Just keep in mind that, as for now, it has a significantly smaller community in comparison with RN. This equals fewer ready-to-use plugins and libraries.