Description

This small module is primarily for use with the open source iOS Augmented Reality Framework PRAugmentedReality.
However, it can be very easily tested on its own as it just provides a CRUD Operation (index) for a custom resource for Drupal Services.

Both this module and framework are done as part of my work at Promet Solutions Inc.

Its value is mostly in allowing the open source AR Framework to be "plug-and-play", allowing any developer to use drupal with it side by side. Once this module is approved, if it is, there will soon be a distribution to enable even easier access to the iOS framework.

Here is the - Project page
git clone http://git.drupal.org:sandbox/glesage/1994126.git mobile_ar_connector

Other FYIs

Extra technical details

The module provides a resource with a single CRUD Operation (index) for devices to call. It can be passed one parameter" the last update timestamp. The calling entity passes that information and receives all the nodes which were updated since that timestamp.

The resource also filters the nodes by removing all excess data and extra nesting to reduce the size of the data to a maximum (for mobile data savings as well as simpler parsing on the receiver's end).

The module includes the drupal_alter hook, allowing other developers and (techie) users to add their own fields if they wish the resource to send them to the device as well.

My credentials

This is my first Drupal contrib module, but I have made numerous iOS Apps (you can check out my LinkedIn page if you wish and see my past projects)

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxglesage1994126git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

glesage’s picture

Issue summary: View changes

Added few words and enhanced info

glesage’s picture

Issue summary: View changes

Added details

glesage’s picture

Issue summary: View changes

removed info already described on project page

glesage’s picture

Status: Needs work » Needs review

Fixed all issues pointed out by automated review tool

glesage’s picture

Issue summary: View changes

Removed PRAugmentedReality description as it is available on project page

glesage’s picture

Issue summary: View changes

Changed git repo url to full details

internetdevels’s picture

Hi,
Everything seems fine.

Just one comment:
in mobile_ar_connector.module:111 where you define your alter drupal_alter('mar_fields', $fields_to_keep) name of alter is 'mar_fields' which not contain module name i.e. 'mobile_ar_connector_fields ', this just for namespace keeping.

glesage’s picture

Alright I will change that.
I took that decision originally because it meant that when I implement it in my module the name it would be really long:
mobile_ar_connector_mobile_ar_connector_fields_alter(&$data) {}

But I guess thats ok... (:

glesage’s picture

Done updated that

jorgegc’s picture

Status: Needs review » Needs work

Hi @glesage,

I have just quickly checked your module and here is a list of issues that I found:

1. In README.txt
- You should have a section where you list the dependencies. Any libraries, modules and plugins should be in there.
- Add a blank newline at the end of the file.

2. In mobile_ar_connector.info
- Add a blank newline at the end of the file.

3. In mobile_ar_connector.module
- Lines 19 to 37: You have heaps of blank spaces, try changing to something like this:

function mobile_ar_connector_services_resources() {
  $ar_object_resource['ar_object']['operations']['index'] = array(
    'help' => 'Returns all ar_objects updated since the last check',
    'callback' => 'mobile_ar_connector_get_new_objects',
    'access callback' => 'mobile_ar_connector_get_new_objects_access',
    'access arguments' => array('access content'),
    'access arguments append' => TRUE,
    'args' => array(
      array(
        'name' => 'last_check_timestamp',
        'type' => 'int',
        'description' => 'The timestamp of the last checkup',
        'source' => array('path' => 0),
        'optional' => FALSE,
      ),
    ),
  );

  return $ar_object_resource;
}

- Line 72: You should probably be checking if $ar_objects_ids['node'] is set and is not empty.
- Line 129: Replace strlen with drupal_strlen (https://api.drupal.org/api/drupal/includes%21unicode.inc/function/drupal...)
- Add a blank newline at the end of the file.

I think that is all :-) Your module is looking pretty good overall!

Cheers

glesage’s picture

Status: Needs work » Needs review

Thanks! Alright I updated everything.

Regarding the last new line, I had already done that... I tried adding another one to verify, and automated review tools spit out errors about too many new lines.

kscheirer’s picture

Title: D7 Mobile AR Communication » [D7] Mobile AR Communication
kscheirer’s picture

Status: Needs review » Reviewed & tested by the community

You don't need to specify php = 5.x in the .info file, Drupal 7 already requires 5.2.5. Your info requires rest_server, but the readme doesn't mention it in the list of dependencies.

mobile_ar_connector_get_new_objects_access() can be simplified to just return ($op == 'view' || $op == 'access content').

All minor issues though, the code looks fine to me.

----
Top Shelf Modules - Enterprise modules from the community for the community.

kscheirer’s picture

Status: Reviewed & tested by the community » Fixed

mobile_ar_connector_format_arObject() shouldn't use camelCase for the function name I think.

Thanks for your contribution, glesage!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

----
Top Shelf Modules - Crafted, Curated, Contributed.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Changed name for git clone