0

I want admins login in a drupal website to create nodes that are specific to clients. And clients login in using a mobile app to retrieve the node's info.

I'm not a 100% sure of the best architecture practice for this. Any suggestions or tutorials?

For the website, I've got Drupal 7 with services 3 using Rest and I'm creating some nodes. I've got the Oath module set up but using session could be easier.

For the app, I followed the phonegap tutorial until it showed the phonegap hello word, then I just started modifying index.html.

PS:JQuery's AJAX Post probably not a good idea because the requests can not successfully retrieve data from a different domain, subdomain, or protocol.

PSS: If it's possible, maybe I should include Drupal for the mobile part too instead of just the website that creates the services. This way I can use drupal_http_request

PSSS: Looks like I could use php's curl but would it work with a simple phonegap env

1

You are right to be using services.

I guess you've got this bit but i'll write it all the same: You need to obtain an anonymous user session via services and then use those details in the user login call.

Re the not being able to access across domains, its not jquery but actually the browser stopping this on your computer. But when you are using the webview component in your app it won't stop it.

Sounds like you are on the right track, just crack as your main problem shouldnt occur :)

Edit: On reflection maybe that isnt totally helpfull

You could consider using Sencha Touch for this purpose. http://www.sencha.com/products/touch/

It kind of pitches itself as something you could use instead of native code, but ibuilt some pretty chunky ipad stuff on it and it begun to chug. Don't expect all transitions to be as smooth etc.

However, it does give you some great data/store tools

Sencha 2 is just about out check the documentation for the rest proxy http://docs.sencha.com/touch/2-0/#!/api/Ext.data.RestProxy

this would make handling lists and viewing content very easy

a good example from sencha 1.1 is http://dev.sencha.com/deploy/touch/examples/oreilly/ as it shows how you might extend a 'panel' to be a node view equivalent for the webapp. The syntax will be different in 2.0 but its a good way of thinking

I'm beginning to ramble now. Take a look and i'll dig out some code snippets if you choose it

0

i think u can use this link http://drupal.org/project/phonegap and it allows you to authenticate and by default it allows you to add article node it works very well for me u just need to goto settings add your drupal site URL and than Authenticate with your Drupal site Credentials and than You can add articles its great module but definately expecting more and more functionality

0

DrupalGap is an open source mobile application development kit for Drupal websites. It uses PhoneGap and jQueryMobile, and takes much of the work out of creating mobile applications for Drupal websites.

0

You can use jdrupal.js to perform number of operation on Drupal site using services module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.