cluke009 / DrupalGap

DrupalGap bridges the gap between Drupal and mobile device applications. This open source project is built around PhoneGap and utilizes the power of JQuery, JQuery Mobile and of course Drupal.

Home Page:http://cluke009.github.io/DrupalGap/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DrupalGap Setup

Requirements

  1. Enable Module

Enable the Services module.

Add a new endpoint and enable all resources

  1. Configure client

Place these settings in a javscript file somewhere.

var options = {
  sitePath: 'http://localhost:8082',
  endPoint: 'rest',
  basePath: '/',
  debug: 0
};
services.init(options);
  1. Enable CORS

Add this code to the end of settings.php.

This will allow your app to connect to Drupal from any domain.

if (isset($_SERVER['HTTP_ORIGIN'])){
  $origin = $_SERVER['HTTP_ORIGIN'];
  drupal_add_http_header('Access-Control-Allow-Origin', $origin);
  drupal_add_http_header('Access-Control-Allow-Credentials', 'true');
  drupal_add_http_header('Access-Control-Allow-Methods', 'GET, PUT, POST, DELETE');
}

Comparison

This Fork has significantly changed from signalpoint / DrupalGap. Hopefully for the better but everything here is still pretty experimental.

Improvements

  • Now occupies a single namespace: services
  • Built in debugger for hardware devices.
  • Automated documentation with jsdoc3 / jsdoc
  • Simplified interface
  • Makes fewer assumptions about your application
  • Stricly provides a simple way of communicating with the services module core components

Regressions

  • The DrupalGap module is no longer supported
  • localStorage is no longer integrated
  • API has changed

About

DrupalGap bridges the gap between Drupal and mobile device applications. This open source project is built around PhoneGap and utilizes the power of JQuery, JQuery Mobile and of course Drupal.

http://cluke009.github.io/DrupalGap/


Languages

Language:JavaScript 99.0%Language:PHP 1.0%