The future of the web is inarguably mobile. Mobile use is clearly increasing as people spend more time on their phones, and the rate that people are using dedicated mobile apps rather than their mobile browser is also increasing. But with web services, mobile apps can integrate popular web-based content management systems and in the process save hundreds of development hours while providing enhanced user experience for both the end user and web editors. This also creates tremendous, largely untapped business opportunity for agencies.
Drupal and WordPress power 2.1% and 23.3% of the web, respectively. There are many contrasts you can make to decide “which is better,” but in the end it comes down to the question of “what is the right tool for the job?” Drupal runs a smaller percentage of the web so it is targeted less by hackers, thus making it less vulnerable. In Drupal all contributed code or “modules,” are peer reviewed at http://drupal.org, helping to ensure quality and stability. Conversely, because of the smaller community and the strict review process there are less modules that get released than WordPress “plugins.” This puts Drupal at a distant second in the volume of contributed plugins/modules that are available. Still, Drupal 8 (the next release of Drupal), shows foresight into the future direction of the web, taking into account “the web of things” or to many web developers the “elephant in the room” Mobile Apps.
Drupal has fully mature projects that turn it into a powerful backend or RESTful “web service” that can be used to provide data to mobile apps via API calls. Drupal 8 comes with the very powerful and stable “Services” module built into D8 core, meaning it will come bundled in every new site of Drupal 8.
To put it simply, your Drupal or WordPress website could be powering the next best mobile app. “The web of things” is another way to say web services, the things that make the apps we use every day “do” things or “talk to” things. Snapchat for example is a popular app, but the native code, the kind written by an iOS or Android developer in the languages Java or Objective C, is quite simple. The heavy lifting is done by a web server somewhere which exposes data through “REST endpoints”;” this web server could be a web app like Drupal or WordPress running the ubiquitous language PHP.
PHP runs on about 75% of websites today, it can be looked at as a big ship – it takes a while for it to turn around (incorporate latest innovations) but it eventually does. While newer languages innovate quicker, PHP has proved to have a dedicated community that eventually does evolve with the times. For these reasons PHP is here to stay.
There are a variety of methods to utilize Drupal or WordPress to create an app that can be purchased on the iOS and Android app stores. For larger budget projects or projects started from scratch, the best method is to code the entire front-end presentation layer of the app in a native language, then use a web service to pull data in from a Drupal/Wordpress web app on “the cloud.” Some people may be able understand this by thinking in the terms of “feeds,” though the technology is quite different. The benefits are clear — you could have a powerful website and also a mobile app for less effort than it would cost to develop each individually with completely unique data sources. It also allows editors to login to their familiar Drupal/Wordpress editors and push out content that will then go to the app and website simultaneously.
Another hybrid method I developed which is very useful for smaller budget projects and for websites that already exist, is to create an API only for the login interface. I created a very simple API and native front-end to handle the login and password reset functionality. The rest of the app is a web view or “wrapper,” meaning that after you login, you just see the website. What makes this so cool is that it does feel quite “appy.” The native feel is enhanced by native navigation and custom offline messaging. After the user enters their email and password into the native interface they never have to login again, thus giving an experience identical to an app in every way. They simply click the icon on their homescreen and they are in. What is happening behind the scenes is that the email and password are getting saved and the user is being logged into the website via the API every time they click the icon.
Through the growth of RESTful web services we can have it all. We can build both web and mobile apps with greater ease than ever before, by simply reusing the same backend infrastructure for multiple platforms.