2. SCHEDROV ALEXANDER
AKA
SANCHIZ
Lead Drupal Developer at Trellon
Maintainer:
• pathauto_i18n
• user_profile_comment
• DrupalGapManager
https://github.com/Sanchiz/DrupalGapManager
Participant:
• crm_core
• relation_lists
3. MOBILE WEBSITE TRAFFIC
Percentage of website traffic from mobile devices
32
24
16
8
0
30.0% 32.0% 29.0% 28.0%
23.9%
Q1 2013 Q2 2013 Q3 2013 Q4 2013 Q1 2014
4. MEET DRUPALGAP
• Created by Tyler Frankenstein
• First release Feb 25, 2012 ~100 lines
• Currently ~10,000 lines
5. DRUPALGAP
Drupal module
hosted on d.org
It's connection
between mobile
applications and
Drupal websites via
web Services.
Development Kit hosted
on GitHub
Developers can create
custom multi-platform
mobile applications that
communicate with their
Drupal websites.
7. WHY DO YOU NEED MOBILE
APPLICATION?
Our mobile phone have features which don't
have our regular devices!
!
DrupalGap features:
You don't need a Objective-C and Java developers.
If you know how to build Drupal modules and
know JavaScript - Welcome to DrupalGap
developers.
8.
9. HOW IT WORKS?
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.
10. REQUIREMENTS
DRUPAL
Services, Rest_server, Views_datasource, Views_json, Drupalgap
!
DEVELOPMENT ENVIRONMENTS
Google Chrome and the Ripple Emulator extension
OR
node.js
cordova(node.js package)
Java SDK for Android or xCode for iOS
23. 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;
}
24. 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.';
}