Introduction to using Titanium with Drupal Services Stephen Barker, Digital Frontiers Media @digitalfrontier Friday, February 10, 2012 1
Web Services Overview iOS or Android app sends data (or request for data) to a website Friday, February 10, 2012 2
Web Services Overview (cont.) Responses are returned along with any requested data (if correctly requested) Friday, February 10, 2012 3
Web Services Overview (cont.) Responses are returned along with any requested data (if correctly requested) Friday, February 10, 2012 4
Drupal Services Solution Friday, February 10, 2012 5
Drupal Services Drupal.org/project/services Friday, February 10, 2012 6
Services Module Suite Services API Module Services Modules Services Server Modules System Services JSON, XML-RPC, etc. Node Services Services Authentication Views Services Session Authentication User Services Key Authentication many others... Friday, February 10, 2012 7
Enable Modules Friday, February 10, 2012 8
Create Service Endpoint Friday, February 10, 2012 9
Create Service Endpoint (cont.) <--Machine name for service <--Server/data type <--URL path endpoint for service Friday, February 10, 2012 10
Enable Service Resources Friday, February 10, 2012 11
Enable Service Resources (cont.) Friday, February 10, 2012 12
Test Service Endpoint <--Good sign Friday, February 10, 2012 13
Set Appropriate Permissions Since we’re not doing Services Authentication in this demo, we have to allow “anonymous” to perform actions we’re providing service resources for. Friday, February 10, 2012 14
Titanium Studio Appcelerator.com Friday, February 10, 2012 15
Public Demo GIST https://github.com/DigitalFrontiersMedia/Drupal- Services---Titanium-Example/tree/master/dsts Friday, February 10, 2012 16
Add Some User Inputs to App Friday, February 10, 2012 17
Setup node.create Button & EventListener <--Setup Button <--Setup EventListener <--Change to your Service Endpoint <--Example XMLRPC data structure available at http://drupal.org/node/1304802 Friday, February 10, 2012 18
Include data in methodCall from User Input <--Value from UI input Friday, February 10, 2012 19
Setup Feedback Function & Send the Request <--Value from UI input <--Provide feedback <--Send the data/request Friday, February 10, 2012 20
Setup node.retrieve Button & EventListener <--Setup Button <--Setup EventListener <--Change to your Service Endpoint <--Value from UI input Friday, February 10, 2012 21
Setup Feedback Function & Send the Request <--Start parsing response from Service <--Provide feedback <--Send the data/request Friday, February 10, 2012 22
Stephen Barker, Digital Frontiers Media http://digitalfrontiersmedia.com stephen@digitalfrontiersmedia.com @digitalfrontier Friday, February 10, 2012 23
Recommend
More recommend