SlideShare a Scribd company logo
25 -27 April, 2014 http://camp2014.drupal.dn.ua
DrupalGap
Alexander Schedrov
How to create native application for mobile devices based on Drupal site
Schedrov Alexander
sanchiz
Drupal Developer at Trellon
What is DrupalGap?
Mobile Application Development Kit for
Drupal Websites
DrupalGap Module is the connection
between mobile applications and Drupal
websites
(c)drupalgap.org
Let's take a look, if it's true!
Support
• Themes, modules
• Blocks
• Menus
• Pages
• Entities
• Fields
• Forms
• Views
• Messages
• Services
• Geolocation
• Other tools
• You don't need a Objective-C and Java
developers
• For creating modules just need to write primitive
JS code
• Need to know how work Services
• Need to know how to create custom Services
endpoints and resources
To create powerful mobile application
How does PhoneGap work?
PhoneGap generates HTML, CSS
and JavaScript and make application
iOS and Android mobile
devices.
Apache Cordova provides access
via JavaScript to device
features such as the
Camera, GPS, File System,
Contacts, Compass, etc.
How mobile application interacts with Drupal Core
Services FTW!!!:)
Drupal site Application
Drupal requirements
services, rest_server, taxonomy, views_datasource,
views_json, drupalgap
!
Development environments
Google Chrome and the Ripple Emulator extension



OR
node.js

cordova

Java SDK for Android or xCode for iOS
File structure
modules
themes
settings.js
Debug
settings.js:
Drupal.settings.debug = true;
Logs in browser console:
dpm(json_result);
window.localStorage.clear();
drupalgap_alert(Fatal error', {
title: ‘Alert title',
buttonName: 'Done',
alertCallback: function() {}
});
drupalgap_set_message('Oh no!', 'error');
Themedrupalgap.settings.theme = 'amazing';
drupalgap.settings.blocks.amazing = {
header: {
title: {}
},
navigation: {
user_menu_anonymous:{
roles:{
value:['anonymous user'],
mode:'include'
}
},
user_menu_authenticated:{
roles:{
value:['authenticated user'],
mode:'include'
}
}
},
content: {
messages: {},
main: {}
},
footer: {
}
};
http://themeroller.jquerymobile.com
<div
id="{:drupalgap_page_id:}"
data-role="page">
{:header:}
{:navigation:}
{:content:}
{:footer:}
</div>
Need to add styles to
index.html
page.tpl.html
Creating module with page callback
• core_app (module folder)
• core_app.js (module file)
Drupal.modules.custom['core_app'] = {};
settings.js:
/**
* Implements hook_menu().
*/
function core_app_menu() {
var items = {};
items['homepage'] = {
title: 'DCDN Sandbox',
page_callback: 'core_app_homepage'
};
return items;
}
!
function core_app_homepage() {
var content = {};
content['homepage'] = {
markup: 'some markup'
};
return content;
}
Creating Menu
drupalgap.settings.menus['homepage_menu'] = {
links:[
{title:'News', path:'news'},
{title:'About', path:'node/1'},
{title:'Contact', path:'contact'},
{title:'Our team', path:'team'}
]
};
settings.js:
Important: here might be only real paths, not aliases
Creating Blocks
/**
* Implements hook_block_info().
*/
function core_app_block_info() {
var blocks = {
latest_news_block: {
delta: 'latest_news_block',
module: 'core_app'
}
};
return blocks;
}
!
/**
* Implements hook_block_view().
*/
function core_app_block_view(delta) {
var content = '';
if (delta == 'latest_news_block') {
content = '<h2>Latest news</h2>';
content += 'Some content...';
}
return content;
}
Block visibility
drupalgap.settings.blocks.amazing = {
content: {
homepage_menu: {
pages:{
value:['homepage'],
mode:'include'
}
},
latest_news_block: {
pages:{
value:['homepage'],
mode:'exclude'
}
},
users_block: {
pages:{
value:['node/*', 'user/*'],
mode:'include'
},
roles:{
value:['authenticated user'],
mode:'include'
}
},
},
};
!
Entity
node_load(1, {
success: function(node) {
}
});
!
node_save(node_array, {
success: function(node) {
}
});
!
node_delete(1, {
success: function(node) {
}
});
By default available pages:
• node/%, node/%/edit
• user/%, user/%/edit
• taxonomy/term/%, taxonomy/term/%/edit
• comment/%, comment/%/edit
Using Views
Need to create page with JSON data document format
(views_json module)
Displaying a View in mobile app
function core_team_menu() {
var items = {};
items['team'] = {
title: 'Our team',
page_callback: 'core_team_page'
}
return items;
}
function core_team_page() {
var content = {};
content['team'] = {
theme: 'view',
format: ‘ul', /* ul, ol, table, unformatted_list */
path: 'mobile/team_new', /* the path to the view in Drupal */
row_callback: 'core_team_page_row',
empty_callback: 'core_team_page_empty',
attributes: {
id: 'team-view'
}
};
return content;
}
!
function core_team_page_row(view, row) {
var output = '';
output += '<img class="team-image" src="' + row.field_photo + '">';
output += l(row.title, 'node/' + row.Nid);
return output;
}
!
function core_team_page_empty(view) {
return 'Sorry, no results.';
}
function core_app_voting_form(form, form_state) {
form.elements.name = {
type:'textfield',
title:'Name',
default_value: Drupal.user.name
};
form.elements.email = {
title:'Email Address',
type:'email',
required: true,
default_value: Drupal.user.mail
};
form.elements.categoty = {
title:'Category',
type:'select',
options:{
0:'Feedback',
1:'Question'
},
default_value:0
};
form.elements.comment = {
title:'Comment',
type:'textarea',
};
form.elements.rating = {
title:'Rating',
type:'radios',
required: true,
options:{
0:'0',
1:'+1',
},
default_value:3
};
form.elements.submit = {
type:'submit',
value:'Submit'
};
return form;
}
Forms
/**
* Implements hook_menu().
*/
function core_app_menu() {
var items = {};
items['vote-form'] = {
title: 'Voting form',
page_callback: 'drupalgap_get_form',
page_arguments:['core_app_voting_form']
};
return items;
}
/**
* Form's validation function (optional).
*/
function core_app_voting_form_validate(form, form_state) {
if (form_state.values.name == '') {
drupalgap_form_set_error('name', 'Name is required field.');
}
}
!
/**
* Form's submit function.
*/
function core_app_voting_form_submit(form, form_state) {
drupalgap_set_message('Thank you ' + form_state.values.name + '!');
drupalgap_goto('news');
}
Need additional functionality? You got it!
1. Create custom services resource in Drupal module

hook_services_resources();
2. Create custom services call in DrupalGap module

Drupal.services.call(options);
var output = '';
Drupal.services.call({
method: 'POST',
path: 'news.json',
data: args,
success: function(result) {
output = '';
$.each(result, function(i, node) {
output += node.title;
});
}
});
Demo
Links	
• http://api.drupalgap.org/
• http://www.drupalgap.org/
• http://www.drupalgap.org/troubleshoot
• http://www.drupalgap.org/node/211
• https://drupal.org/node/2015065
Troubleshooting
THANK YOU!
!
Email: alexander.schedrov@gmail.com
Twitter: @alexschedrov
FB: schedrov
http://sanchiz.net

More Related Content

What's hot

Introduction to VueJS & The WordPress REST API
Introduction to VueJS & The WordPress REST APIIntroduction to VueJS & The WordPress REST API
Introduction to VueJS & The WordPress REST API
Caldera Labs
 
WordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQLWordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQL
houzman
 
Building mobile applications with DrupalGap
Building mobile applications with DrupalGapBuilding mobile applications with DrupalGap
Building mobile applications with DrupalGap
Alex S
 
Nuxtjs cheat-sheet
Nuxtjs cheat-sheetNuxtjs cheat-sheet
Nuxtjs cheat-sheet
ValeriaCastillo71
 
Docker, Ansible and Symfony micro-kernel
Docker, Ansible and Symfony micro-kernelDocker, Ansible and Symfony micro-kernel
Docker, Ansible and Symfony micro-kernel
DrupalCamp Kyiv
 
"Paragraphs are more powerful than you can expect" from Vasily Jaremchuk for ...
"Paragraphs are more powerful than you can expect" from Vasily Jaremchuk for ..."Paragraphs are more powerful than you can expect" from Vasily Jaremchuk for ...
"Paragraphs are more powerful than you can expect" from Vasily Jaremchuk for ...
DrupalCamp Kyiv
 
Learn Dashing Widget in 90 minutes
Learn Dashing Widget in 90 minutesLearn Dashing Widget in 90 minutes
Learn Dashing Widget in 90 minutes
Larry Cai
 
Making your Angular.js Application accessible
Making your Angular.js Application accessibleMaking your Angular.js Application accessible
Making your Angular.js Application accessible
Dirk Ginader
 
Chrome enchanted 2015
Chrome enchanted 2015Chrome enchanted 2015
Chrome enchanted 2015
Chang W. Doh
 
WordPress as the Backbone(.js)
WordPress as the Backbone(.js)WordPress as the Backbone(.js)
WordPress as the Backbone(.js)
Beau Lebens
 
Room with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsRoom with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.js
Zachary Klein
 
Best Practice Site Architecture in Drupal 8
Best Practice Site Architecture in Drupal 8Best Practice Site Architecture in Drupal 8
Best Practice Site Architecture in Drupal 8
Pantheon
 
The Heron Mapping Client
The Heron Mapping ClientThe Heron Mapping Client
The Heron Mapping Client
Just van den Broecke
 
Introduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.jsIntroduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.js
monterail
 
Vue business first
Vue business firstVue business first
Vue business first
Vitalii Ratyshnyi
 
Grails Launchpad - From Ground Zero to Orbit
Grails Launchpad - From Ground Zero to OrbitGrails Launchpad - From Ground Zero to Orbit
Grails Launchpad - From Ground Zero to Orbit
Zachary Klein
 
Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8Ovadiah Myrgorod
 
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIWordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
Brian Hogg
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8
Acquia
 
Laravel 8 export data as excel file with example
Laravel 8 export data as excel file with exampleLaravel 8 export data as excel file with example
Laravel 8 export data as excel file with example
Katy Slemon
 

What's hot (20)

Introduction to VueJS & The WordPress REST API
Introduction to VueJS & The WordPress REST APIIntroduction to VueJS & The WordPress REST API
Introduction to VueJS & The WordPress REST API
 
WordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQLWordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQL
 
Building mobile applications with DrupalGap
Building mobile applications with DrupalGapBuilding mobile applications with DrupalGap
Building mobile applications with DrupalGap
 
Nuxtjs cheat-sheet
Nuxtjs cheat-sheetNuxtjs cheat-sheet
Nuxtjs cheat-sheet
 
Docker, Ansible and Symfony micro-kernel
Docker, Ansible and Symfony micro-kernelDocker, Ansible and Symfony micro-kernel
Docker, Ansible and Symfony micro-kernel
 
"Paragraphs are more powerful than you can expect" from Vasily Jaremchuk for ...
"Paragraphs are more powerful than you can expect" from Vasily Jaremchuk for ..."Paragraphs are more powerful than you can expect" from Vasily Jaremchuk for ...
"Paragraphs are more powerful than you can expect" from Vasily Jaremchuk for ...
 
Learn Dashing Widget in 90 minutes
Learn Dashing Widget in 90 minutesLearn Dashing Widget in 90 minutes
Learn Dashing Widget in 90 minutes
 
Making your Angular.js Application accessible
Making your Angular.js Application accessibleMaking your Angular.js Application accessible
Making your Angular.js Application accessible
 
Chrome enchanted 2015
Chrome enchanted 2015Chrome enchanted 2015
Chrome enchanted 2015
 
WordPress as the Backbone(.js)
WordPress as the Backbone(.js)WordPress as the Backbone(.js)
WordPress as the Backbone(.js)
 
Room with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsRoom with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.js
 
Best Practice Site Architecture in Drupal 8
Best Practice Site Architecture in Drupal 8Best Practice Site Architecture in Drupal 8
Best Practice Site Architecture in Drupal 8
 
The Heron Mapping Client
The Heron Mapping ClientThe Heron Mapping Client
The Heron Mapping Client
 
Introduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.jsIntroduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.js
 
Vue business first
Vue business firstVue business first
Vue business first
 
Grails Launchpad - From Ground Zero to Orbit
Grails Launchpad - From Ground Zero to OrbitGrails Launchpad - From Ground Zero to Orbit
Grails Launchpad - From Ground Zero to Orbit
 
Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8Using Backbone.js with Drupal 7 and 8
Using Backbone.js with Drupal 7 and 8
 
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIWordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8
 
Laravel 8 export data as excel file with example
Laravel 8 export data as excel file with exampleLaravel 8 export data as excel file with example
Laravel 8 export data as excel file with example
 

Viewers also liked

Getting started with Ansible. Be efficient.
Getting started with Ansible. Be efficient.Getting started with Ansible. Be efficient.
Getting started with Ansible. Be efficient.
Alex S
 
Feeds. использование и создание плагинов. Feeds API
Feeds. использование и создание плагинов. Feeds APIFeeds. использование и создание плагинов. Feeds API
Feeds. использование и создание плагинов. Feeds APIAlex S
 
Drupal Training Days 2017 - Drupal 8 basic functions.
Drupal Training Days 2017 - Drupal 8 basic functions.Drupal Training Days 2017 - Drupal 8 basic functions.
Drupal Training Days 2017 - Drupal 8 basic functions.
Alex S
 
Using Drupal as a backend for Android app
Using Drupal as a backend for Android appUsing Drupal as a backend for Android app
Using Drupal as a backend for Android app
Borort Sort
 
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011camp_drupal_ua
 
Drupal 8 what to wait from
Drupal 8   what to wait fromDrupal 8   what to wait from
Drupal 8 what to wait from
Andrii Podanenko
 
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011camp_drupal_ua
 
Історія, теорія та використання CMS Drupal
Історія, теорія та використання CMS DrupalІсторія, теорія та використання CMS Drupal
Історія, теорія та використання CMS Drupal
Igor Bronovskyy
 
Start using vagrant now!
Start using vagrant now!Start using vagrant now!
Start using vagrant now!
Andrii Podanenko
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.
Andrii Podanenko
 
DrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxDrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration Toolbox
Andrii Podanenko
 
Infographic : Enterprise Mobility Solutions Tree
Infographic : Enterprise Mobility Solutions TreeInfographic : Enterprise Mobility Solutions Tree
Infographic : Enterprise Mobility Solutions Tree
Mobiloitte
 
Christmas Apps For iOS
Christmas Apps For iOSChristmas Apps For iOS
Christmas Apps For iOS
FluperOfficial
 
Головні Принципи Автоматизації
Головні Принципи АвтоматизаціїГоловні Принципи Автоматизації
Головні Принципи Автоматизації
Andrii Podanenko
 
MoldCamp - multidimentional testing workflow. CIBox.
MoldCamp  - multidimentional testing workflow. CIBox.MoldCamp  - multidimentional testing workflow. CIBox.
MoldCamp - multidimentional testing workflow. CIBox.
Andrii Podanenko
 
Trends, Challenges & Solution For Mobile App UX Design
Trends, Challenges & Solution For Mobile App UX DesignTrends, Challenges & Solution For Mobile App UX Design
Trends, Challenges & Solution For Mobile App UX DesignHu yang
 
Mobile App Development Challenges
Mobile App Development ChallengesMobile App Development Challenges
Mobile App Development Challenges
Mobinex
 
MobiSharks [Mobile Technology Agency]
MobiSharks [Mobile Technology Agency]MobiSharks [Mobile Technology Agency]
MobiSharks [Mobile Technology Agency]
Liliya Mukhametova
 
Challenges of a mobile application developer
Challenges of a mobile application developerChallenges of a mobile application developer
Challenges of a mobile application developer
William S. Rodriguez
 
Ux,UI & wireframes
Ux,UI & wireframesUx,UI & wireframes
Ux,UI & wireframes
Prassi Chicarito
 

Viewers also liked (20)

Getting started with Ansible. Be efficient.
Getting started with Ansible. Be efficient.Getting started with Ansible. Be efficient.
Getting started with Ansible. Be efficient.
 
Feeds. использование и создание плагинов. Feeds API
Feeds. использование и создание плагинов. Feeds APIFeeds. использование и создание плагинов. Feeds API
Feeds. использование и создание плагинов. Feeds API
 
Drupal Training Days 2017 - Drupal 8 basic functions.
Drupal Training Days 2017 - Drupal 8 basic functions.Drupal Training Days 2017 - Drupal 8 basic functions.
Drupal Training Days 2017 - Drupal 8 basic functions.
 
Using Drupal as a backend for Android app
Using Drupal as a backend for Android appUsing Drupal as a backend for Android app
Using Drupal as a backend for Android app
 
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
 
Drupal 8 what to wait from
Drupal 8   what to wait fromDrupal 8   what to wait from
Drupal 8 what to wait from
 
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
 
Історія, теорія та використання CMS Drupal
Історія, теорія та використання CMS DrupalІсторія, теорія та використання CMS Drupal
Історія, теорія та використання CMS Drupal
 
Start using vagrant now!
Start using vagrant now!Start using vagrant now!
Start using vagrant now!
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.
 
DrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxDrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration Toolbox
 
Infographic : Enterprise Mobility Solutions Tree
Infographic : Enterprise Mobility Solutions TreeInfographic : Enterprise Mobility Solutions Tree
Infographic : Enterprise Mobility Solutions Tree
 
Christmas Apps For iOS
Christmas Apps For iOSChristmas Apps For iOS
Christmas Apps For iOS
 
Головні Принципи Автоматизації
Головні Принципи АвтоматизаціїГоловні Принципи Автоматизації
Головні Принципи Автоматизації
 
MoldCamp - multidimentional testing workflow. CIBox.
MoldCamp  - multidimentional testing workflow. CIBox.MoldCamp  - multidimentional testing workflow. CIBox.
MoldCamp - multidimentional testing workflow. CIBox.
 
Trends, Challenges & Solution For Mobile App UX Design
Trends, Challenges & Solution For Mobile App UX DesignTrends, Challenges & Solution For Mobile App UX Design
Trends, Challenges & Solution For Mobile App UX Design
 
Mobile App Development Challenges
Mobile App Development ChallengesMobile App Development Challenges
Mobile App Development Challenges
 
MobiSharks [Mobile Technology Agency]
MobiSharks [Mobile Technology Agency]MobiSharks [Mobile Technology Agency]
MobiSharks [Mobile Technology Agency]
 
Challenges of a mobile application developer
Challenges of a mobile application developerChallenges of a mobile application developer
Challenges of a mobile application developer
 
Ux,UI & wireframes
Ux,UI & wireframesUx,UI & wireframes
Ux,UI & wireframes
 

Similar to DrupalGap. How to create native application for mobile devices based on Drupal site - DrupalCamp Donetsk 2014

Drupal 8: What's new? Anton Shubkin
Drupal 8: What's new? Anton ShubkinDrupal 8: What's new? Anton Shubkin
Drupal 8: What's new? Anton ShubkinADCI Solutions
 
Advanced Module development
Advanced Module developmentAdvanced Module development
Advanced Module development
drupalindia
 
Migrations
MigrationsMigrations
Migrations
Yaron Tal
 
Drupal 8 and iOS - an Open Source App
Drupal 8 and iOS - an Open Source AppDrupal 8 and iOS - an Open Source App
Drupal 8 and iOS - an Open Source App
littleMAS
 
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложенияCodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложенияCodeFest
 
Headless Drupal en pratique
Headless Drupal en pratiqueHeadless Drupal en pratique
Headless Drupal en pratique
Simon Morvan
 
BlackBerry DevCon 2011 - PhoneGap and WebWorks
BlackBerry DevCon 2011 - PhoneGap and WebWorksBlackBerry DevCon 2011 - PhoneGap and WebWorks
BlackBerry DevCon 2011 - PhoneGap and WebWorksmwbrooks
 
Introducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and serverIntroducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and serverSpike Brehm
 
Drupal Module Development
Drupal Module DevelopmentDrupal Module Development
Drupal Module Development
Sumeet Pareek
 
Mini-Training: AngularJS
Mini-Training: AngularJSMini-Training: AngularJS
Mini-Training: AngularJS
Betclic Everest Group Tech Team
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
Shabir Ahmad
 
phonegap with angular js for freshers
phonegap with angular js for freshers    phonegap with angular js for freshers
phonegap with angular js for freshers
dssprakash
 
Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2
Filippo Matteo Riggio
 
Drupal 8, Where Did the Code Go? From Info Hook to Plugin
Drupal 8, Where Did the Code Go? From Info Hook to PluginDrupal 8, Where Did the Code Go? From Info Hook to Plugin
Drupal 8, Where Did the Code Go? From Info Hook to Plugin
Acquia
 
A gently introduction to AngularJS
A gently introduction to AngularJSA gently introduction to AngularJS
A gently introduction to AngularJS
Gregor Woiwode
 
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
Konstantin Komelin
 
13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS 13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS
DrupalMumbai
 
20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final
David Lapsley
 

Similar to DrupalGap. How to create native application for mobile devices based on Drupal site - DrupalCamp Donetsk 2014 (20)

Drupal 8: What's new? Anton Shubkin
Drupal 8: What's new? Anton ShubkinDrupal 8: What's new? Anton Shubkin
Drupal 8: What's new? Anton Shubkin
 
Advanced Module development
Advanced Module developmentAdvanced Module development
Advanced Module development
 
Migrations
MigrationsMigrations
Migrations
 
Drupal 8 and iOS - an Open Source App
Drupal 8 and iOS - an Open Source AppDrupal 8 and iOS - an Open Source App
Drupal 8 and iOS - an Open Source App
 
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложенияCodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
 
Headless Drupal en pratique
Headless Drupal en pratiqueHeadless Drupal en pratique
Headless Drupal en pratique
 
BlackBerry DevCon 2011 - PhoneGap and WebWorks
BlackBerry DevCon 2011 - PhoneGap and WebWorksBlackBerry DevCon 2011 - PhoneGap and WebWorks
BlackBerry DevCon 2011 - PhoneGap and WebWorks
 
Introducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and serverIntroducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and server
 
Drupal Module Development
Drupal Module DevelopmentDrupal Module Development
Drupal Module Development
 
Mini-Training: AngularJS
Mini-Training: AngularJSMini-Training: AngularJS
Mini-Training: AngularJS
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
 
Introduction to angular js
Introduction to angular jsIntroduction to angular js
Introduction to angular js
 
phonegap with angular js for freshers
phonegap with angular js for freshers    phonegap with angular js for freshers
phonegap with angular js for freshers
 
Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2
 
Drupal 8, Where Did the Code Go? From Info Hook to Plugin
Drupal 8, Where Did the Code Go? From Info Hook to PluginDrupal 8, Where Did the Code Go? From Info Hook to Plugin
Drupal 8, Where Did the Code Go? From Info Hook to Plugin
 
A gently introduction to AngularJS
A gently introduction to AngularJSA gently introduction to AngularJS
A gently introduction to AngularJS
 
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
#D8CX: Upgrade your modules to Drupal 8 (Part 1 and 2)
 
#D8 cx: upgrade your modules to drupal 8
#D8 cx: upgrade your modules to drupal 8 #D8 cx: upgrade your modules to drupal 8
#D8 cx: upgrade your modules to drupal 8
 
13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS 13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS
 
20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final
 

Recently uploaded

一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
vmemo1
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
Laura Szabó
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
cuobya
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
cuobya
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
hackersuli
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
zyfovom
 
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
JeyaPerumal1
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
Trish Parr
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
cuobya
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
CIOWomenMagazine
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 

Recently uploaded (20)

一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
 
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 

DrupalGap. How to create native application for mobile devices based on Drupal site - DrupalCamp Donetsk 2014

  • 1. 25 -27 April, 2014 http://camp2014.drupal.dn.ua DrupalGap Alexander Schedrov How to create native application for mobile devices based on Drupal site
  • 3. What is DrupalGap? Mobile Application Development Kit for Drupal Websites DrupalGap Module is the connection between mobile applications and Drupal websites (c)drupalgap.org Let's take a look, if it's true!
  • 4. Support • Themes, modules • Blocks • Menus • Pages • Entities • Fields • Forms • Views • Messages • Services • Geolocation • Other tools
  • 5.
  • 6. • You don't need a Objective-C and Java developers • For creating modules just need to write primitive JS code • Need to know how work Services • Need to know how to create custom Services endpoints and resources To create powerful mobile application
  • 7. How does PhoneGap work? PhoneGap generates HTML, CSS and JavaScript and make application iOS and Android mobile devices. Apache Cordova provides access via JavaScript to device features such as the Camera, GPS, File System, Contacts, Compass, etc.
  • 8. How mobile application interacts with Drupal Core Services FTW!!!:) Drupal site Application
  • 9. Drupal requirements services, rest_server, taxonomy, views_datasource, views_json, drupalgap ! Development environments Google Chrome and the Ripple Emulator extension
 
 OR node.js
 cordova
 Java SDK for Android or xCode for iOS
  • 11. Debug settings.js: Drupal.settings.debug = true; Logs in browser console: dpm(json_result); window.localStorage.clear(); drupalgap_alert(Fatal error', { title: ‘Alert title', buttonName: 'Done', alertCallback: function() {} }); drupalgap_set_message('Oh no!', 'error');
  • 12. Themedrupalgap.settings.theme = 'amazing'; drupalgap.settings.blocks.amazing = { header: { title: {} }, navigation: { user_menu_anonymous:{ roles:{ value:['anonymous user'], mode:'include' } }, user_menu_authenticated:{ roles:{ value:['authenticated user'], mode:'include' } } }, content: { messages: {}, main: {} }, footer: { } }; http://themeroller.jquerymobile.com <div id="{:drupalgap_page_id:}" data-role="page"> {:header:} {:navigation:} {:content:} {:footer:} </div> Need to add styles to index.html page.tpl.html
  • 13. Creating module with page callback • core_app (module folder) • core_app.js (module file) Drupal.modules.custom['core_app'] = {}; settings.js: /** * Implements hook_menu(). */ function core_app_menu() { var items = {}; items['homepage'] = { title: 'DCDN Sandbox', page_callback: 'core_app_homepage' }; return items; } ! function core_app_homepage() { var content = {}; content['homepage'] = { markup: 'some markup' }; return content; }
  • 14. Creating Menu drupalgap.settings.menus['homepage_menu'] = { links:[ {title:'News', path:'news'}, {title:'About', path:'node/1'}, {title:'Contact', path:'contact'}, {title:'Our team', path:'team'} ] }; settings.js: Important: here might be only real paths, not aliases
  • 15. Creating Blocks /** * Implements hook_block_info(). */ function core_app_block_info() { var blocks = { latest_news_block: { delta: 'latest_news_block', module: 'core_app' } }; return blocks; } ! /** * Implements hook_block_view(). */ function core_app_block_view(delta) { var content = ''; if (delta == 'latest_news_block') { content = '<h2>Latest news</h2>'; content += 'Some content...'; } return content; } Block visibility drupalgap.settings.blocks.amazing = { content: { homepage_menu: { pages:{ value:['homepage'], mode:'include' } }, latest_news_block: { pages:{ value:['homepage'], mode:'exclude' } }, users_block: { pages:{ value:['node/*', 'user/*'], mode:'include' }, roles:{ value:['authenticated user'], mode:'include' } }, }, }; !
  • 16. Entity node_load(1, { success: function(node) { } }); ! node_save(node_array, { success: function(node) { } }); ! node_delete(1, { success: function(node) { } }); By default available pages: • node/%, node/%/edit • user/%, user/%/edit • taxonomy/term/%, taxonomy/term/%/edit • comment/%, comment/%/edit
  • 17. Using Views Need to create page with JSON data document format (views_json module) Displaying a View in mobile app function core_team_menu() { var items = {}; items['team'] = { title: 'Our team', page_callback: 'core_team_page' } return items; }
  • 18. function core_team_page() { var content = {}; content['team'] = { theme: 'view', format: ‘ul', /* ul, ol, table, unformatted_list */ path: 'mobile/team_new', /* the path to the view in Drupal */ row_callback: 'core_team_page_row', empty_callback: 'core_team_page_empty', attributes: { id: 'team-view' } }; return content; } ! function core_team_page_row(view, row) { var output = ''; output += '<img class="team-image" src="' + row.field_photo + '">'; output += l(row.title, 'node/' + row.Nid); return output; } ! function core_team_page_empty(view) { return 'Sorry, no results.'; }
  • 19.
  • 20. function core_app_voting_form(form, form_state) { form.elements.name = { type:'textfield', title:'Name', default_value: Drupal.user.name }; form.elements.email = { title:'Email Address', type:'email', required: true, default_value: Drupal.user.mail }; form.elements.categoty = { title:'Category', type:'select', options:{ 0:'Feedback', 1:'Question' }, default_value:0 }; form.elements.comment = { title:'Comment', type:'textarea', }; form.elements.rating = { title:'Rating', type:'radios', required: true, options:{ 0:'0', 1:'+1', }, default_value:3 }; form.elements.submit = { type:'submit', value:'Submit' }; return form; } Forms
  • 21. /** * Implements hook_menu(). */ function core_app_menu() { var items = {}; items['vote-form'] = { title: 'Voting form', page_callback: 'drupalgap_get_form', page_arguments:['core_app_voting_form'] }; return items; } /** * Form's validation function (optional). */ function core_app_voting_form_validate(form, form_state) { if (form_state.values.name == '') { drupalgap_form_set_error('name', 'Name is required field.'); } } ! /** * Form's submit function. */ function core_app_voting_form_submit(form, form_state) { drupalgap_set_message('Thank you ' + form_state.values.name + '!'); drupalgap_goto('news'); }
  • 22. Need additional functionality? You got it! 1. Create custom services resource in Drupal module
 hook_services_resources(); 2. Create custom services call in DrupalGap module
 Drupal.services.call(options); var output = ''; Drupal.services.call({ method: 'POST', path: 'news.json', data: args, success: function(result) { output = ''; $.each(result, function(i, node) { output += node.title; }); } });
  • 23. Demo
  • 24. Links • http://api.drupalgap.org/ • http://www.drupalgap.org/ • http://www.drupalgap.org/troubleshoot • http://www.drupalgap.org/node/211 • https://drupal.org/node/2015065 Troubleshooting
  • 25. THANK YOU! ! Email: alexander.schedrov@gmail.com Twitter: @alexschedrov FB: schedrov http://sanchiz.net