At latest Drupal Conference in Austin, TX, mobile and web development company Lemberg has introduced a native Drupal 8 software development kit. Lemberg's SDK aims at making it easier for developers to handle the communication between a native mobile app and a Drupal website. The SDK is currently available only for iOS and Android, while the Windows Phone version should be coming soon.
The SDK can handle the following tasks:
- Get data from the CMS quickly without instant setup of HTTP client, parsers and data storage.
- Manage CMS data via simple API calls (add/edit/delete).
Other features that are on Lemberg's roadmap are:
- Transparent data caching to support offline mode.
- Automatic background data updating depending on the configuration.
- Background image downloading.
As an example of the API, this is how it is possible to pull a BlogPage
object from the server:
BlogPage *bp = [BlogPage new]; bp.page = @(1); [bp pullFromServer:^(NSArray *result) { if (result) { // Do something with an array of BlogPostPreview objects } }];
The SDK is available on github under the MIT license.
A preexisting alternative to Lemberg's SDK, though only available for the iOS platform, is the Drupal iOS Software Development Kit developed by Kyle Browning, director of mobile at WorkHabit.
Browning's SDK provides a layer of abstraction on top of networking framework AFNetworking for working with Drupal nodes, files, users, and views. Besides supporting a RESTful view of Drupal entities, developers "can dynamically change what content you can create from your app, via configuration on your Drupal site. You can reorder your forms, just like you do with the regular Forms API...," says Browning.
Building a native mobile app gives a few advantages that mobile web applications don't have, i.e., distribution through mobile app stores and access to native functionality.
Furthermore, as noted in Drupal community blog, Drupal can be used as the backend for mobile application development and host user content, business logic, user management, and search functionality. The availability of a native SDK can make it easier to build apps as front ende that talk to a Drupal backend. According to Wikipedia, Drupal is used as a back-end framework for at least 2.1% of all websites worldwide.