Article

Develop full-stack mobile apps by using mobile back-end technologies

Focus on the mobile front-end programming by taking advantage of mobile back-end capabilities

By

Thejaswini Ramachandra,

Sahdev Zala

Businesses today realize that mobile apps are a key interaction channel. Users download only the top-rated, engaging mobile apps, and developers strive to build such an engaging app experience.

An engaging mobile app running on the user’s device is only the visible part of an iceberg. The intelligence of this mobile app lies in the back end, which processes all the user interactions. The mobile back-end server provides capabilities like user management, push notification, app management, app insights, secure back end integration, and more, which are basic aspects of any mobile app.

It can be time consuming for developers to develop these capabilities for every mobile app, while also building the front-end user experience, which is the most critical aspect for mobile app adoption. Mobile back-end service providers offer these back-end capabilities, which can be consumed by the front-end application by using APIs and SDKs. Developers prefer to focus on writing code to build the best user experience, while leaning on cloud providers to deliver back-end capabilities.

The popular terminology used to refer to these offerings are "Mobile Backend as a service" (MBaaS) or "Backend as a service" (BaaS). This back-end server further interfaces with the business logic layer that's written with microservices patterns and consumes high-value services such as cognitive and analytics REST APIs. Refer to the Mobile Reference Architecture for details.

Decomposing the mobile back end

A mobile back end typically offers a diverse set of features that can be leveraged based on the application needs:

  • Push notifications
  • Protection from mobile-specific security threats
  • Mobile app lifecycle and feature management
  • A/B testing and feature roll outs
  • Offline app availability by using offline data store and sync
  • Mobile analytics for app, user, and device insights
  • User authentication and authorization
  • Back end integration
  • Throughput optimization and network usage
  • AI/ML services

IBM Mobile Foundation, which offers many of these capabilities, is a scalable, secure mobile back-end offering with simplified integration to other IBM Cloud services.

Push notifications to boost user engagement

Push notifications are a great way to engage app users and offer them "mobile moments." Today, mobile backends usually support sending rich content including title, subtitle, launch image, style, and more, as well as a picture notification or a silent notification.

To send push notifications to mobile apps, you need to go through a device registration cycle and leverage a mediator that's provided by the Mobile OS vendor. Your back end cannot directly push messages to the mobile app. Firebase Cloud Messaging (FCM) for Android and Apple Push Notification Service (APNS) for iOS are the mediators that help send notification messages to mobile devices.

In certain countries like China, you must use the country-specific notification provider like Baidu. Most back-end vendors offer multichannel notifications to mobile, web, and progressive web apps. IBM provides a push notifications service that lets you send and manage mobile and web push notifications using a UI, client SDK, or simple REST APIs.

Protection from mobile-specific security threats

Mobile security is multifold requiring developers to protect data on the device, over the air, and on the server. Mobile back ends typically provide data encryption and protection on the device and also protection against malicious apps connecting to the server.

Some back-end providers also offer additional capabilities like protection against man-in-the-middle attacks, prevention of jail-broken devices from accessing the back end, limiting of single user per device for compliance needs, step up authentication support, and more.

Mobile app lifecycle and feature management

In today’s agile world app, updates to mobile apps are released more often, and mobile back ends must provide capabilities for administrators or developers to manage app version updates or remotely disable an app on a user device.

A/B testing and feature roll outs

Quite often the developer might want to test a new feature with a small subset of users to gather feedback instead to releasing the feature to the full set of users. There is also a requirement to enable a particular feature on a particular date, or an ability to turn that feature off based on some business use case.

Many cloud providers provide this capability. They also provide the capability to measure the usage of that feature as well as sophisticated parameters to define subsets of users to whom the feature should be made available.

Offline app availability by using offline data store and sync

Offline availability is a key aspect for many mobile apps. Caching catalogs for offline browsing is a common use case. Mobile back ends provide ways to securely cache structured, unstructured, or binary data on the device to support multiple offline use cases. This data needs to be synchronized with the main system of record (SoR), either when modified locally (upstream synch) or modified in the SoR (downstream synchronization). This storage on the device also has to be secure so that no one can get access to the data when the device is stolen or infected.

This capability is offered by cloud providers and is accessed by installing an SDK in your app code. Along with data synch capabilities, often there is a need to store the data in a SQL or NoSQL format instead of synching it to an SoR. This data storage on cloud capabilities are also integrated with Synch SDks. The GraphQL framework is emerging as the new technology of choice for providing this capability.

Mobile analytics for app, user, and device insights

After the app is distributed through internal or external app stores, it is installed on a matrix of devices across models and OS versions. The administrator or developer would like to obtain insights on the number of downloads, the user journey, and app crashes (if any occurred).

Most mobile back-end providers offer the capability to collect useful insights about the user and their app usage.

User authentication and authorization

Most, if not all, apps need a way to register and identify a user. This involves user authentication using a social login or a custom user store. This login also often needs registering with on-device biometric authentication and not just typing in a username and password. Most cloud providers provide user registration, authentication and authorization capabilities. Mobile back-end providers also offer integration with user registries like LDAP so that organizations can leverage existing user registries to authenticate users. They also support OAuth and integrate with internal identity and access management systems. IBM provides the APP ID service, which offers these capabilities.

Back end integration

Quite often, particularly in the enterprise use cases, there is a need to connect to an SoR or be able to write a custom logic closer to the SoR before it is sent to the mobile apps. Patterns like the Backend for Frontend (BFF) microservices can be written in Swift, Node.js, Java code or any other convenient language. All cloud providers provide a way to deploy these microservices. Some vendors also provide an "Adapter" capability that adds a security framework around the access to these microservices and an access to them using an SDK that can be added to the mobile app.

Throughput optimization and network usage

Mobile real estate doesn’t afford the user with the luxury of showcasing large data similar to what web sites can display. Mobile back ends optimize throughput and provide data mash-up capabilities, such that precious network resources can be used to transfer only the required amount of data, with most of the processing being performed on the server. JSON format is most widely used for data transfer, although XML and YAML options are sometimes used.

AI/ML services

Mobile devices are getting powerful enough to execute machine learning models on the device itself. This provides for enhanced experiences to be added to the mobile app without having to wait for a back-end service to respond back with the analysis on an image or voice snippet. Portable model formats like TensorFlow Lite by Google and CoreML by Apple were started for their own respective devices but are providing support for the other operating systems as well. However, you need a back-end capability to train these models and manage the distribution of these models to the devices. Many cloud vendors provide machine learning services that can be trained by a data scientist or specialized ML training services like image identification. The ability to augment the mobile app with a chatbot is another addition of AI capability that some mobile back-end vendors now offer.

Cloud-based mobile back ends

The cloud computing model enables on-demand access, and any app being built in today’s world should leverage the power of cloud computing architectures. A mobile back end that is hosted on the cloud caters to additional nonfunctional requirements like scalability, reliability, performance, load balancing, and security, all of which are typically managed and orchestrated by a service provider. Cloud-based mobile back ends also offer easy integration with DevOps offerings for continuous delivery of the mobile back-end app. Cloud-based mobile back ends can also take advantage of offerings with regional availability.

All major cloud providers (IBM, Google, Amazon, and Microsoft) offer specific design patterns (app frameworks) that can serve as a mobile application back end. Some vendors offer a single mobile back end with a multitude of capabilities while others offer "a la carte" offering capabilities with a variety of pricing models. Most cloud providers include some form of a freemium model, where core features are offered free of charge up to a certain usage limit. It is easy to create and launch an app with the free tier and then scale up to a paid tier to onboard additional customers.

Full-stack mobile development (front end and back end)

Choosing the right technology to build your front-end mobile apps is critical. A continuum of technologies is available to choose from, and various factors determine the platform of choice. You can read more about choosing a front-end mobile platform this IBM Developer article, "Deciding between native and cross-platform mobile front-end programming frameworks."

After you make the choice of mobile front-end technology, you can get started with mobile back end on cloud and build 5-star-rated engaging mobile apps. Mobile back-end providers offer SDKs for many popular front-end technologies like Android, iOS, Cordova, Ionic, React Native, and Xamarin. They also provide REST APIs that can be leveraged from the front-end applications. Many vendors offer low-code, drag-and-drop tools to quickly wire up a mobile front-end interface that can be used as a starting point. You can read more about the programming languages, SDKs, and frameworks for full-stack mobile development in this IBM Developer article, "Choosing the best programming language for mobile app development."

Summary

This article highlights the need for a mobile back end, with the sneak peek of core capabilities offered by mobile back-end providers. It also makes a good case for cloud-based mobile back ends. Mobile back-end vendors are now evolving the mobile back ends to support many channels (web, voice, and chat) while providing a seamless omnichannel experience with user at the center and the channels coming together to provide a holistic user experience.