The Unsung Side Of Mobile Apps: Bootstrapping Development With Mobile Backend Services
Monday, December 7, 2015
There’s more to a successful mobile app than a slick UI and cross-platform availability. Mobile Backend as a Service (MBaaS) makes developing compelling, full featured apps faster and easier.
When building applications, every budding developer knows the temptation of fixating on the UI at the expense of algorithms, data structures and state management. After all, it’s the most visible piece, the part that makes a first impression and that users constantly interact with. The temptation can be even greater with mobile apps since the platform is inherently more personal and tactile, while display constraints mean UI features must be both limited and well designed.
However, all but the most trivial mobile apps also include significant elements devoted to core logic, data management, communications, user notifications, profiles and session state, functions that are best implemented as separate services outside the mobile client. Since these are also features required of every mobile app, it makes sense to build them once as modular services exposed via APIs.
The decision on whether to use MBaaS hinges the complexity of your app logic, dependence on external systems, diversity of user and device population, the need for messaging and data services and number of apps in your portfolio. Although every developer’s situation is unique, you’ll most likely need MBaaS if you’re in a large enterprise with a number of mobile apps using both internal and external data sources.
Several characteristics of enterprise apps make them good candidates for MBaaS. These include:
- access to legacy backend systems like ERP, HR and CRM or third-party online data services
- need for notification or other messaging services
- need for offline access and data synchronization
Enterprise B2C developers also tend to have a diverse mobile client base using different devices and operating systems and want to provide a unified experience between mobile app, mobile Web and desktop Web.
In contrast, developers working on smaller projects of limited scope in a small team can often do without MBaaS. These apps are often self-contained with no backend data connectivity requirements and development is Greenfield, with no legacy code or few data dependencies to worry about. However, even smaller development teams should consider MBaaS if they plan to build a broader app portfolio.
Larger projects can generally do without MBaaS if data sources are already fully API-enabled using REST and JSON or it’s a one-and-done project.
The defining characteristics of mobile devices and users, namely constant connectivity to remote, public networks, limited local storage and processing power and the use of multiple devices throughout the day, mean building business logic and data management into a monolithic application run within the mobile client is both unwise and infeasible. This is the motivation for mobile backend services, aka MBaaS: delivering portable services to handle the application plumbing.
Like Web applications, mobile apps often use an N-tier architecture that decouples client code managing the UI and device (aka the presentation layer) from business logic, data structures, persistent data storage, data security, user authentication, application and user state management and messaging services like notifications, inter-process communications, message queuing, etc.
Modularity allows services to be secured, scaled, maintained and updated independent of the client code, yielding a more reliable, supportable application. In a sense, MBaaS is like packaged middleware for the mobile era.
Decoupling client and backend functions makes sense for mobile apps since the business logic, data access, state management and security functions are reusable, meaning each app in a larger portfolio can focus on the client interface and unique features, not backend plumbing. Furthermore, since the devices themselves are almost always connected to the Internet and thus within reach of a backend service, they are perfect candidates for letting remote services do the heavy lifting.
The problem is that designing and building a mobile backend is not a trivial undertaking, particularly considering the need to scale services to handle potentially millions of mobile users and thousands of simultaneous transactions while ensuring cross-platform compatibility and tight security.
There are several categories of mobile backends that differ in their completeness, integration and level of support. Some are open source in which users must aggregate and maintain many of the pieces. Although there are some prepackaged distributions, much like Linux, Apache, Hadoop or other open source projects, there’s still some DIY assembly and language, API and server support can be spotty.
As the line between IaaS and PaaS blurs, many cloud infrastructure services have added platform and application services for connecting to external data sources, directories and managing mobile device profiles. In aggregate, these services resemble MBaaS, indeed many vendors market a mobile backend portfolio. However, the services are new and not comprehensive. While rolling your own MBaaS from a hodgepodge of IaaS services is possible, it’s not easy and requires a good understanding of the features and APIs on the particular cloud platform.
Packaged MBaaS: Like SaaS for mobile developers
The move of cloud platforms into mobile, along with a blurring of the lines between app backend runtime and development platforms illustrates one aspect of what one analysis calls an MBaaS market in transition.
Vendors from historically distinct product categories like mobile app development platforms (MDAP) and API management are increasingly joined by new pure-play mobile backends and the major IaaS/PaaS vendors. Over time, the best MBaaS products will incorporate features from each of these areas and address the entire mobile development lifecycle from design and development to deployment and management.
Packaged MBaaS products offer a more convenient and full-featured alternative to DIY backend construction using IaaS or PaaS. They typically include the following features:
- The ability to run on private infrastructure, on-premise or off (such as at a colocation facility), or on-cloud as a pre-packaged IaaS deployment such as Kony MobileFabric on the AWS Marketplace
- Easy integration with enterprise services like SAP, Oracle, Microsoft servers (Dynamics, Exchange, SharePoint), enterprise directories (AD, LDAP) and third-party Web services using REST APIs
- Central management of mobile services with the ability to create and share service
- Vendor-managed updates to track changes in APIs, device SDKs and security updates
- Support for custom or third-party service modules via extensible APIs
Other common MBaaS features include integration with federated authentication services like Google accounts (OAuth) and popular third-party social and mapping services, API management, push notification handling, simplified data persistence and storage interfaces and high availability, redundant deployment options.
A typical MBaaS architecture includes the runtime environment that interacts with app code and connects to backend data sources, a management console and analytics/reporting engine and various connectors to data sources, enterprise apps and identity providers.
Business and Developer benefits
On the surface, a detailed MBaaS feature list looks developer focused, however the products do more than just simplify the lives of programmers. Of course, simplifying app development is a key selling point. MBaaS can increase developer productivity by up to 100% by offloading the design and programming of backend modules and delivering consistent interfaces to tested services that can be reused from project to project. This not only speeds up the overall release cycle, but allows developers more time to focus on building engaging, attractive, feature-rich mobile front ends.
Packaged MBaaS also integrate with mobile development platforms to facilitate better app instrumentation and data collection. By incorporating calls to MBaaS analytic services, apps can automatically collect usage data and error logs that feed an MBaaS reporting engine. The resulting insights can yield better decisions about feature enhancements and bug fixes and provide business leaders an understanding of how (and how much) an app is used. The result is rapid iteration of new, more effective features that have greater business impact.
MBaaS helps IT by obviating the need to design the required infrastructure and manage a new set of software for mobile backend services. Indeed, if IT goes the cloud route, there’s no infrastructure at all to worry about. By taking care of the complex integration between mobile app APIs and enterprise services and directories, packaged MBaaS can reduce IT support calls and finger pointing while improving app security and central management.
MBaaS can even provide federated logins across organizations by managing secure tokens and data encryption. Supporting external user directories allows developers to provide secure, authorized and auditable app access to mobile business partners and customers.
The choice of whether to use MBaaS requires developers to assess their mobile app architecture, functional needs, user base and data and system dependencies. Those with more complex systems will find that a packaged MBaaS product can greatly simplify the design, shorten the development schedule and allow more time to focus on the mobile client code and creating a compelling user experience.
To find out more about MBaaS or Kony’s MBaaS solutions, visit http://www.kony.com/solutions/mbaas
Read more: http://www.kony.com/products/mobilefabric/aws
This content is made possible by a guest author, or sponsor; it is not written by and does not necessarily reflect the views of App Developer Magazine's editorial staff.
Become a subscriber of App Developer Magazine for just $5.99 a month and take advantage of all these perks.
MEMBERS GET ACCESS TO
- - Exclusive content from leaders in the industry
- - Q&A articles from industry leaders
- - Tips and tricks from the most successful developers weekly
- - Monthly issues, including all 90+ back-issues since 2012
- - Event discounts and early-bird signups
- - Gain insight from top achievers in the app store
- - Learn what tools to use, what SDK's to use, and more