Decoding Mobile Development Options

Mike Cerny Mobile, Technology Snapshot, Xamarin Leave a Comment

Mobile Engagement Is Critical For Your Business

The importance of the mobile phone to modern life is hard to understate. It’s the one thing we have with us everywhere! It’s also the most convenient way to stay in touch with the people and companies with whom we interact with on a regular basis.

Between 2012 and 2018, the amount of time we spend accessing the internet through our phones jumped from just 88 minutes to a whopping 203 minutes per day (source). 35% of US consumers now use their mobile devices to shop and purchase online (source). By 2021, experts estimate that US mobile commerce sales will eclipse $420 billion (ibid). If your business relies on engagement with customers and users through the internet, then it’s not just a good idea to have a mobile strategy, it’s imperative!

However, it can be challenging to decide on the right strategy for reaching the mobile audience. If you decide an app is what you need, the next question is “what are my options?” In general terms, the types of mobile applications you could choose to build can be divided into three groups:

In this post, we give an overview of the various mobile development strategies on our shortlist for enterprise clients to consider; for example, Xamarin, Flutter, React Native, and Ionic. For each tool, we give a brief introduction and highlight the key advantages and disadvantages found in implementing each mobile development approach.

Vendor-Native Mobile Applications

“Vendor-native” is a term invented by this author and is not a standard industry term. If you were to ask Apple or Google how to create a mobile application, this approach would be recommended as “the right way.”

  • For Android, this means writing your app in Kotlin or Java using Android Studio (which runs on macOS, Windows, Linux, and ChromeOS).
  • For iOS, this means writing your app in Swift of Objective-C using Apple’s Xcode IDE which is only available on macOS.

Advantages and Disadvantages:

There are two key advantages to choosing the vendor-native path. First, you’ll find excellent documentation and support from both Apple and Google if you go this route. Second, the majority of mobile app developers create and maintain apps using vendor-native tooling, which means it won’t be as hard to find developers to hire for your project.

A significant disadvantage of this approach is that vendor-native applications for Android and iOS can share almost nothing beyond images and media files. This means the application would either need to be written by two completely different, platform-specific teams or by a team of programmers who know how to write vendor-native apps for both iOS and Android (but such talent is rare and expensive!).

In either case, writing the application twice results both in a duplication of effort as well as an opportunity to introduce subtle differences in implementation.

Cross-Platform Mobile Applications

Because of the significant duplication of cost or effort incumbent in the vendor-native approach, many businesses are looking to cross-platform solutions as a way to leverage a single team to create applications for both major mobile operating systems.

There are several contenders in this space. The primary difference between them generally has to do with how the tool kits render their user interface; some use OS-native widgets, others rely on the operating system’s web browser, and the third group brings their own 2D graphics compositing layer with them.

React Native & Xamarin

Among those that rely on the mobile operating system’s widgets and controls, the most popular tools are Xamarin and React Native. The primary difference between these two is the language in which the business logic is written and the execution environment for the code.

React Native was created by engineers at Facebook as a means of applying the popular, component-based model of web development to the creation of mobile applications. With React Native, the business logic is written in JavaScript and is executed by the JavaScript engine of the mobile operating system’s web browser.

See Also:  Part 1: JavaScript Application Introduction

By contrast, Xamarin applications are written primarily in C# (though F# is an alternative option) and are compiled to binary code for iOS and to Dalvik bytecode for Android.

Both React Native and Xamarin have access to all of the UI widgets and controls of Android and iOS, as well as the ability to access all of the APIs of both operating systems. Making use of third-party and custom widgets, UI widgets, and third-party code libraries are possible, though the degree of complexity for the latter can be quite significant.

Advantages and Disadvantages:

The significant advantage of selecting either React Native or Xamarin is that a single team can not only create applications for both Android and iOS, but a significant portion — if not all — of the business logic can be shared between the applications for both operating systems.

A significant disadvantage of using these cross-platform toolkits is that in order to solve a bug or implement a feature, there can be circumstances where a deep understanding of what is happening in the underlying mobile operating system is required. Error messages referencing Java APIs in Android that make perfect sense to a vendor-native developer can be significant slow-downs for JavaScript or C# developers who are new to mobile development.

Hybrid Web Mobile Applications

In the group of toolkits that rely on the Android/iOS web browser to render an application’s UI, there are two big names: Cordova and Ionic.

Cordova

Cordova is a toolkit for creating mobile applications in which the user interface is rendered in CSS, HTML, and JavaScript, and the application’s business logic is written entirely in JavaScript. Applications written with this framework are frequently called “hybrid” applications since they combine elements of web applications with elements of native mobile applications.

The Cordova framework is an Apache 2 licensed project that emerged from the PhoneGap team (after its acquisition by Adobe). Cordova provides a number of plugins that allow a hybrid application to easily make use of the Android or iOS system APIs (eg: Bluetooth communication or access to the local file system) as well as the hardware and sensors of a device (eg: the camera).

Advantages and Disadvantages:

The significant advantage of Cordova is that any web developer can become a mobile application developer quickly.

The associated disadvantage is that unless you’re an expert with visual design and CSS, the applications created with Cordova won’t “look right” on a smartphone. Instead, they will appear to be mobile websites masquerading as applications. This visual disadvantage was the inspiration for the creation of Ionic.

Ionic

Ionic was built on Cordova with an expanded set of UI and widget styles that were specifically designed to give a Cordova application the look and feel of a vendor-native operating system.

In recent years, the Ionic team has created the Capacitor project (which replaces Cordova as a base platform on which to build hybrid apps). They have also marketed a code editor designed to work with Ionic apps as well as enterprise services and support for companies using Ionic for mobile application development.

Advantages and Disadvantages:

All of the advantages of Cordova apply to Ionic, with the additional advantage that Ionic’s styling makes a hybrid application look almost like a vendor-native platform app. Plus, Add Ionic offers enterprise support for developers, Ionic Native plugins, continuous integration, push notification services, and several other enterprise services. All in all, Ionic is making a very strong and compelling case to be both the best hybrid framework provider and an enterprise partner to trust.

A disadvantage to Ionic (and Cordova) applications is that the bridge between the JavaScript code of an application doesn’t allow for complete and total access to all of a mobile operating system’s APIs (or new hardware attributes or sensors). For the vast majority of mobile application needs, this won’t be an issue, but it’s something to keep in mind if your app idea is doing something out of the ordinary.

See Also:  Building a Java Cloud Native Spring Microservice Application on Azure, Part 1

Flutter Mobile Applications – A Toolkit Category All Its Own

The final grouping of cross-platform mobile toolkits are those that eschew both native OS widgets and the web browser for rendering their UI. The amount of time and effort required to build a UI compositing layer for multiple operating systems and to create UI widgets for that new rendering layer is quite significant.

Therefore, it should be of little surprise that there’s only one toolkit in this group: Flutter from Google.

Applications for Flutter are written in the Dart language and compile to binary code for both Android and iOS. Rather than using native OS widgets or the web browser, widgets in Flutter are rendered on a 2D graphics layer.

Advantages:

The key advantage is that anywhere this 2D graphics layer can be deployed, you can target your Flutter application. This means that in addition to Android and iOS, Flutter applications can target Google’s Nest appliances as well.

Google has announced that Flutter applications will Also be able to target the desktop environment of macOS, Linux, and Windows in the future. Additionally, there is currently beta support for compiling a Flutter application for the web.

Mobile Websites

Lastly, it’s important to ask whether a “simple” mobile website is all you need. If you don’t have a need for push notifications or advanced mobile OS features, almost every other “need-to-have” feature of mobile apps today (access to location, camera, touch gestures, WebRTC, and much more) can be supported simply through your phone’s browser.

Advantages and Disadvantages:

The biggest advantage of simply using a mobile website is that you are not limited to Android and iOS, but you can still reach almost EVERY phone with a web browser (Blackberry, WindowsPhone, FirefoxOS, Symbian, WebOS, and many more). Another advantage is that mobile development is far easier than writing a vendor-native or cross-platform app so it will be easier to find developers or train existing staff to support this.

The only disadvantage is that full access to your phone’s operating system and hardware features aren’t available — which is only a negative if your application actually needs these abilities.

Which Mobile Development Strategy Is Best?

A logical question to ask is: “Which of these approaches is best for my business?” The answer depends on many factors.

Critical questions to answer are: ”What your mobile app needs to be able to do today?” and What likely features will you need to support in the next two to five years?”

If your current needs could be satisfied with a mobile website, but you will need to support abilities that are only possible with vendor-native apps in the near future, then selecting mobile web now and committing to a full rewrite might not be the most advantageous call.

Another consideration is based on personnel: Do you primarily have web developers?” If so, then mobile web/hybrid/Ionic might be the best path to consider. Do you have a shop full of WPF desktop developers?” If so, then Xamarin would be a natural fit for your team’s skills.

Ultimately, the only wrong choice is to ignore mobile platforms altogether. If there is one clear trend, it’s that people interacting with companies and each other via the internet primarily through their phones is on the rise. By embracing mobile, your ability to reach and engage your customers will be maximized.

What Do You Think?