as a backend for Android app BarCamp Phnom Penh – 13-14 Sep 2014 Borort Sort borort@gmail.com
So.. again, WHY Drupal?
Why use Drupal to manage Mobile app data?
• Has everything you need for content management and permissions • Very flexible in providing a JSON REST interface • Don’t have to write lots of server-side code from scratch • Large Drupal community support
Configuring Drupal to be the backend for Mobile • Install Services 3 module for Drupal to act as a REST server • Set up an endpoint URL for the REST service • Enable resources to expose at that endpoint
Drupal Services 3.0 • A standardized solution of integrating external applications with Drupal • Resource oriented (CRUD = create, retrieve, update, delete, index) • Provide web services via multiple interfaces (REST, XMLRPC, SOAP, JSON, etc.)
Service Endpoint • [endpoint]/node.json • [endpoint]/node/1.json • [endpoint]/node.json?parameters[nid]=1
Drupal Services Views • Create view based resource creating Services display in a view [endpoint]/[resource name] [endpoint]/[resource name]?tags=1 • Execute any view via views resource call [endpoint]/views/[view name] [endpoint]/views/[view name]? filters[tags]=1
Why REST? • Use standard HTTP protocol (simple data access) • Performance (Local caching) • Multiple data formats (JSON, XML, ..)
JSON
Connecting Android to Drupal
Classes • JSONParser (custom) • AsynTask
DEMO
Thank you!

Using Drupal as a backend for Android app

  • 1.
    as a backendfor Android app BarCamp Phnom Penh – 13-14 Sep 2014 Borort Sort borort@gmail.com
  • 7.
  • 12.
    Why use Drupalto manage Mobile app data?
  • 13.
    • Has everythingyou need for content management and permissions • Very flexible in providing a JSON REST interface • Don’t have to write lots of server-side code from scratch • Large Drupal community support
  • 14.
    Configuring Drupal tobe the backend for Mobile • Install Services 3 module for Drupal to act as a REST server • Set up an endpoint URL for the REST service • Enable resources to expose at that endpoint
  • 15.
    Drupal Services 3.0 • A standardized solution of integrating external applications with Drupal • Resource oriented (CRUD = create, retrieve, update, delete, index) • Provide web services via multiple interfaces (REST, XMLRPC, SOAP, JSON, etc.)
  • 16.
    Service Endpoint •[endpoint]/node.json • [endpoint]/node/1.json • [endpoint]/node.json?parameters[nid]=1
  • 17.
    Drupal Services Views • Create view based resource creating Services display in a view [endpoint]/[resource name] [endpoint]/[resource name]?tags=1 • Execute any view via views resource call [endpoint]/views/[view name] [endpoint]/views/[view name]? filters[tags]=1
  • 19.
    Why REST? •Use standard HTTP protocol (simple data access) • Performance (Local caching) • Multiple data formats (JSON, XML, ..)
  • 20.
  • 21.
  • 22.
    Classes • JSONParser(custom) • AsynTask
  • 23.
  • 24.

Editor's Notes

  • #9 http://www.prometsource.com/blog/easy-read-guide-drupal-vs-wordpress Drupal has a wide variety of modules that allow sites to be customized for many different use cases, and interact with a wide variety of services and devices.
  • #10 The Drupal community has a dedicated security team with an excellent track record. Thousands of government and high-profile websites rely on their thorough process for investigating, verifying and publishing possible security problems.
  • #11 Flexibility/Scalability
  • #12 Need a site that can actually do something, not just say something