Drupal for Mobile Solutions
Monday, May 28, 2018 by Ana
There’s little doubt that mobile internet usage has soared over the past two years. In fact, the number of mobile internet users overtook desktop users in 2016. It has, then, become imperative for website and business owners to cater to mobile internet users in order to avoid losing potential customers. Adhering to this trend, CMSs like Drupal and WordPress are being constantly updated to implement ways to keep them mobile-friendly. In this post, let’s take a deeper look at how Drupal is great for mobile solutions and why you should use Drupal for your mobile needs.
If you’ve kept up with the news or read our last blog post, then you probably have an idea of what ‘headless’ is, or at least you might have heard the term. Making Drupal decoupled or ‘headless’ allows the front-end of Drupal to be separate and independent of the back-end. This means Drupal can be effectively used as a backend content manager and database for serving up content to a front-end medium of your choice.
The same concept can be applied when you wish to make a mobile application using Drupal. Since mobile devices come in different shapes and sizes, the front-end medium used to serve content to end-users needs to be highly flexible. Thankfully, over the past few years, various ways of making a site mobile friendly have cropped up; the most popular of which are:
- Responsive Design
- RESS: Responsive Design + Server-side Components
The good thing about Drupal is that starting from Drupal 8, it is responsive out-of-the-box. So if you only want your site to be formatted for mobile screens in the simplest possible way, you go the route of using plain old Drupal in its entirety (front-end and back-end).
But what do you do when you wish to create a native mobile app, or a different technology created purely for phones, such as:
- Swift or Objective C for IOS (AFNetworking or ASIHTTPRequest libraries for communication between IOS and Drupal)
- Java for Android (DrupalCloud and XMLRPC for communication between Android and Drupal)
- Ionic, PhoneGap, DrupalGap etc for hybrid apps (apps which work on all major mobile platforms with the same codebase)
That is where Drupal’s ‘headless’ concept come to play. You see, CMSs like Drupal were primarily meant to provide a simpler way for users to be able to manage large amounts of content on their sites. Drupal does that perfectly well by utilizing various elements such as nodes, taxonomies etc.
So, if you take an eagle’s eye view of the whole thing, here it how it plays out:
Drupal acts as a back-end which contains all the business-logic, content, workflows, users, modules, the functionality of the site etc. All of this is then served to the user via front-end technologies for each specific platforms of hybrid technologies. These mobile technologies utilize libraries to communicate with Drupal.
Why Mobile Applications
While all of that is well and good, you might be wondering why one should go through the trouble of making native mobile applications. Well, there are a multitude of reasons for that. While I won’t go into depth for this, I would like to highlight the following points from Drupal’s own official documentation for mobile application development:
- Ability to charge for app in Google Play or App Store
- In-app purchase and subscriptions through the App Store, Google Play, or other app stores
- In-app advertising from native mobile app networks
- Access to the device's camera to take images or video
- Access to the device's file system for caching
- Access to the device's contacts
- Access to the device's accelerometer, gyroscope, compass, and map
- Native map functionality
I would like to conclude this post by mentioning probably the best example I can think of right now which uses Drupal to populate the content of its mobile apps. It has also developed a workflow using Drupal which allows editors to publish news stories and articles with proper formatting and get approval status. The app I’m talking about is The Economist Espresso. It is a news app available for both IOS and Android and it perfectly portrays the use of Drupal for mobile apps.
Going mobile is no longer just an ‘option’ or a fancy requirement! Keeping in mind the growing number of mobile users, with mobile usage already dominating the internet, you can see great revenues if you cater to these users by building a native mobile app. If you are looking for a way to build mobile solutions for your own business and aren’t sure where to start, let us help you with it.