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.

Mobile Application Features for Drupal Websites

  • Access  Content
  • Users
    • Registration
    • Login
    • Logout
    • Account View & Update
  • Create, Retrieve, Update and Delete - (C.R.U.D.)
    • Content
    • Comments
  • Mobile App's Permissions Synchronize with Drupal's Permissions

DrupalGap consists of two parts:

DrupalGap - Drupal Module (6.x and 7.x) (Sandbox: http://drupal.org/sandbox/signalpoint/1414540)

This module allows mobile applications to utilize the power of Drupal websites. DrupalGap exposes Drupal's content and user features to mobile devices running the DrupalGap mobile application, or your own custom mobile application. Leveraging the power of existing Drupal modules such as Views and Services, DrupalGap integrates mobile device applications with Drupal.

The DrupalGap module differs from the phonegap module in that DrupalGap utilizes the Services module and API, and DrupalGap is available for Drupal 6 and 7. DrupalGap supports comment C.R.U.D. (create, retrieve, update, delete) as well as multiple content types.

DrupalGap - Mobile Application (https://github.com/signalpoint/DrupalGap)

The DrupalGap mobile application can be installed on a mobile device and connect to Drupal websites running the DrupalGap module. Once connected, the mobile device can utilize that Drupal site's content and user features. Developers can use the open source DrupalGap project on GitHub to create custom mobile applications in PhoneGap that communicate with their Drupal websites.

The mobile application is available in the Android marketplace.

DrupalGap is seeking Drupal/iOS developer contributions to help make this possible for the iPhone, iPad, etc.

Who is DrupalGap For?

1. Mobile Application Users

Installing the DrupalGap mobile application on a mobile device allows a user's device to integrate with Drupal websites that have the DrupalGap module installed.

2. Mobile Application Developers

Mobile application developers can use the open source DrupalGap framework to get a jump start on building custom mobile applications in PhoneGap that utilize the power of their Drupal websites.

PAReview Quick Links
http://ventral.org/pareview/httpgitdrupalorgsandboxsignalpoint1414540git...
http://ventral.org/pareview/httpgitdrupalorgsandboxsignalpoint1414540git

Reviews of other projects

Views record count
http://drupal.org/node/1427492#comment-5601458

Buttonator
http://drupal.org/node/1392144#comment-5555394
http://drupal.org/node/1392144#comment-5597698

Custom Help Text
http://drupal.org/node/1235588#comment-5566992
http://drupal.org/node/1235588#comment-5597510

Reviews of other projects (round 2)

Webmaster menu
http://drupal.org/node/1420358#comment-5630446

Node Note
http://drupal.org/node/1281192#comment-5641388

Taxonomy Tools
http://drupal.org/node/1425720#comment-5641584

Comments

scorchio’s picture

Status: Needs review » Needs work

Could you please check and solve the code style issues found by PAReview? (You can use this tool for re-checking your code.)

tyler.frankenstein’s picture

Status: Needs work » Needs review

Hi scorchio, I have fixed the code style issues found by PAReview, thank you.

However, PAReview keeps saying 'Files must end in a single new line character', even though each of my files ends in a unix \n newline character (according to jEdit and vim). I'm not sure what to do about that. Any suggestions would be much appreciated, thanks!

scorchio’s picture

Good question - I've just checked a post in the support section about the same problem. Basically the bot means that there should be no "extra" blank lines at the end of the file. (Maybe the best way to check this if you're confused is to open the file in a hex editor and look for 0A values. At the end of each file, you should see only one; for example in the README I found two.)

tyler.frankenstein’s picture

Hi scorchio, you were right there was one extra blank line in each file.

I have cleared up those problems and pushed them up to the 7.x-1.x branch.

PAReview's results now come back clean:

http://ventral.org/pareview/httpgitdrupalorgsandboxsignalpoint1414540git

Thanks for reviewing my code. I look forward to the upcoming response.

himamurthy’s picture

should we need to install Drupalgap from the Android Market .
I am trying to connect the drupal site with an Android emulator all ready Phonegap have been installed

can any one can send me the proper connectivity link of android mobile App with drupal site .

how to enable drupaalgap if i don't have saved in

site/all/modules/ drupalgap

tyler.frankenstein’s picture

Hello himamurthy,

You can use your existing emulator and localhost Drupal install with the DrupalGap module. No need to download the app from the Adroid Marketplace if you're a developer.

This page has information about getting PhoneGap up and running w/ DrupalGap: http://tylerfrankenstein.com/drupalgap/phonegap

Once DrupalGap is running in the emulator, you can try a demo that connects directly to http://www.drupalgap.com or you can click the Install button and enter the URL to your local (or remote) Drupal site.

The URL for a localhost Drupal site (e.g. /var/www/my_drupal_site) normally would be http://localhost/my_drupal_site, but Android emulators typically use 10.0.2.2 instead of localhost.

So for example, you would connect to http://10.0.2.2/my_drupal_site inside an Android emulator to communicate with your local Drupal install.

In order to enable DrupalGap for your Drupal site, the DrupalGap module should live in your sites/all/modules folder (just like other modules you download). To download the DrupalGap sandbox module visit the 'Version control' tab on the DrupalGap module sandbox page. From there, you can select either the D7 or D6 version to clone. If you need help cloning the sandbox module please contact me directly and I can point you in the right direction.

Once the module is enabled, you can use the DrupalGap mobile application from the Android marketplace to connect to your Drupal site, or you can use the DrupalGap PhoneGap project to develop your own custom mobile application in PhoneGap to connect to your Drupal site.

himamurthy’s picture

HI Tyler.frankenstein,

Could you tell me how to enable DrupalGap module in my drupal site? Where can I download it?

i have followed the link http://www.tylerfrankenstein.com/drupalgap/module-installation

Is that necessary to enable session authentication?

i have done mostly everything in that link but problem in troubleshooting

i could not Enable 'Session authentication' but , services are installed
but i am getting like this:
Session authentication
Services has no settings available.

i have a doubt in giving the name:

Path to endpoint :...................... can be any thing or should be DrupalGap

Name: my_drupal_services /* i have given any name or should be the my_drupalsite name */
The unique ID for this endpoint. /* give me example */

Server: REST

Path to endpoint: my_services /* it should be like this or i can give any name like DrupalGap */

Debug mode enabled: optional

Session authentication: checked

himamurthy’s picture

There is no DrupalGap module because the file u r ask me to enable is DrupalGap dont have installation file is not there & Readme file is empty on there in Drupalgap app folder .
please see this link
http://drupal.org/node/1423558

tyler.frankenstein’s picture

It sounds like you are cloning the master branch, which is only supposed to contain the README file. You need to go here:

http://drupal.org/project/1414540/git-instructions

Then select either D7 or D6 in the 'Version to work from' select list.

For example, if you want the D7 version, type this command in a terminal inside your sites/all/modules folder:

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/signalpoint/1414540.git drupalgap

Or if you want the D6 version, go to your sites/all/modules folder in a terminal and type this command:

git clone --branch 6.x-1.x http://git.drupal.org/sandbox/signalpoint/1414540.git drupalgap

Once you have cloned the D7 or D6 branch of DrupalGap into your sites/all/modules folder, you can enable the module just like any other module. When DrupalGap gets enabled it automatically sets up the 'drupalgap' service resource endpoint. No need to create your own service resource endpoint.

To verify that the DrupalGap service resource endpoint is setup correctly, go to:

D7: Configuration -> DrupalGap
D6: Site configuration -> DrupalGap

Please let me know if you have any other questions, thanks!

xamox’s picture

Status: Needs review » Reviewed & tested by the community

I downloaded, installed and tested the module for Drupal 7. Everything appeared to be functional and working in any of my tests, basically I couldn't get the module to break, regardless of input. Much of the pain in getting things working was getting eclipse setup, but this was due to poor documentation on the android site. Once my android development environment (which isn't required for this module), setup, setting up drupalgap was a breeze. The only reason you would need this environment would be if you wanted to extend the mobile application side, but wouldn't be required on the web server side.

I could see this application being extremely useful as more things start moving towards mobile, especially considering the move towards mobile for drupal 8, this module can help backfill some of the legacy systems by providing an interface to talk to say drupal 6 or 7 which maybe not as mobile friendly as drupal 8.

This module seems very far along just for where it is now. I was able to post content, login, edit content, post comments, etc. From a developer or content contributor it seems very easy to extend, so if you say wanted a mobile app to approve comments, doing so with this module would be extremely easy. One of the nice things the developer did as well was built this around the services module which makes it even easier to extend with other modules.

All updates appeared to be atomic, in that if you updated the permissions on the webserver, say this person no longer is able to post content, then they will no longer be able to post from the phone.

Note: Also verified code meets Drupal Coding Style Standards:
http://ventral.org/pareview/httpgitdrupalorgsandboxsignalpoint1414540git

xamox’s picture

Issue summary: View changes

Added note about iOS.

tyler.frankenstein’s picture

Issue tags: +PAreview: review bonus

Thank you xamox for reviewing DrupalGap, much appreciated. I understand the difficulty with Eclipse as I recall the pain in getting it setup initially.

Additional thanks goes out to scorchio and himamurthy for their reviews as well.

I have received much positive feedback and two offers from people looking to become co-maintainers. An iOS developer friend of mine has been able to run DrupalGap on his device as well, that was great to hear.

I look forward to my first project release for Drupal, thank you everyone, see you in Denver!

klausi’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -PAreview: review bonus +PAreview: security
StatusFileSize
new2.21 KB

Review of the 7.x-1.x branch:

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.

manual review:

  • The drupalcs error in the Javascript file indicates that you should put the contents of the if statement on a separate line.
  • _drupalgap_resource_content_types_list(): do not concatenate variables directly into DB queries, use place holders instead. This can cause SQL injection vulnerabilities. See http://drupal.org/writing-secure-code
  • drupalgap_install(): do you really have to create your endpoint here? The Services documentation says "Endpoints are exportable and can be packaged as features (with or without the features module).". So there must be a hook that should hold your default endpoint.
  • t($documentation_msg): always pass literal strings to t() so that translations tools can pick the string up from the source code. You should avoid passing variables to t() where possible.
  • drupalgap_init(): why do you need hook_init()? This is called on literally every page request, are you sure that you need your javascript on every page?
  • drupalgap_views_api(): Views API version 2 does not exist in Drupal 7.
  • drupalgap_status(): do not break a translatable sentence like that. Use a placeholder instead and wrap that in one t() call so that it makes sense for translators.

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

tyler.frankenstein’s picture

Status: Needs work » Needs review

Hi klausi, thank you for the review and secure coding guidance. I have fixed all the bullet points mentioned in your previous comment:

  • fixed the minor drupalcs error
  • db placeholders now used instead of variable concatenation
  • hook_install() implementation has been removed, now using hook_default_services_endpoint() implementation
  • strings sent to the translator are no longer broken up and now use placeholders
  • removed implementation of hook_init(), javascript is now only added on the one page it is needed
  • now utilizing views api 3 instead of 2
  • fixed the broken string and used placeholders with translator

Updated results of PAReview: http://ventral.org/pareview/httpgitdrupalorgsandboxsignalpoint1414540git

tyler.frankenstein’s picture

Issue summary: View changes

Added a section for my reviews of other projects so I can apply for the PAReview bonus tag.

tyler.frankenstein’s picture

Issue summary: View changes

Updating description and feature list.

tyler.frankenstein’s picture

Issue summary: View changes

Added PAReview quick links.

tyler.frankenstein’s picture

Issue summary: View changes

Updated description.

tyler.frankenstein’s picture

Issue tags: +PAreview: review bonus

Adding "PAReview: review bonus" tag after manually reviewing three more project applications.

tyler.frankenstein’s picture

Issue summary: View changes

Added round two of pareview bonus comments.

klausi’s picture

Assigned: Unassigned » tim.plunkett
Issue tags: -PAreview: review bonus

manual review:

Otherwise this looks RTBC to me. Removing review bonus tag, if there are still changes required you can add it again if you have done another 3 reviews of other projects.

Assigning to tim.plunkett as he said he might have time to look at some RTBC issues.

klausi’s picture

Status: Needs review » Reviewed & tested by the community

Forgot to set it to RTBC.

tyler.frankenstein’s picture

Hi klausi, thank you for the information regarding Drupal.behaviors, I have added Drupal.behaviors.drupalgap to the D6 & D7 branches.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new7.8 KB

Here's a final clean-up patch, please make these changes before promoting.

That said, the code looks clean, and I think it's more than ready for promotion.
Use your new powers wisely, and if you can, please continue to help reviewing other project applications.

tyler.frankenstein’s picture

Thank you everyone, DrupalGap is now an official project.

http://drupal.org/project/drupalgap

The review process went smoothly. I learned about dynamic placeholders, the proper usage of t() with placeholders, javascript Drupal.behaviors, the default services endpoint hook, and the importance of the proper usage of hook_init (in my case, no usage at all).

Special thanks to klausi and tim.plunkett for providing guidance along the way.

For other project applicants, the single best thing you can do to help speed up your application (and all the other applications) is to manually review other applications. The review team has a tremendous amount of work to do, and if each applicant pulled through with some reviews, everyone would benefit.

Happy coding!

P.S. I did one more manual review for old times sake: http://drupal.org/node/1329312#comment-564626

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

himamurthy’s picture

StatusFileSize
new205.9 KB

thankyou you for you drupalgap module tyler.frankenstein

with you help we have created a phone app using phonegap .
added save and load module in drupalgap
and created new module.

so that the user data's from mobile can be stored in database and
that dates can bee viewed on the site for which we have created new module
to display with the help of views

for an example in the app they are 8 fields if you give values of first
two fields which should be must if the data are stored once it will get that
the date's of remaining fields and display it back to the form.

The screen short i cant upload because if 8.8 MB Space is required.

himamurthy’s picture

Issue summary: View changes

Removed link to project home page now that the link is entered in a field on the sandbox project node.