Headless app demo

Events happening in the community are now at Drupal community events on www.drupal.org.
dan_rogers's picture

Howdy all, going to be giving a talk on headless drupal at drupal camp Baltimore in a few days, as well as going over a ionic/angular/cordova demo app I built. If anyone has time on their hands and wants to check it out before hand, please let me know if anything jumps out as being wildly inaccurate!

The (somewhat) final app, which also houses all my speaking points can be viewed here: http://162.209.90.221/headless

Github repo here: https://github.com/rogerseyebyte/EBSheadlessDrupal

Cheers,

Dan

Comments

Hi Dan, This is great and

c13l0's picture

Hi Dan,

This is great and thanks for sharing!

Hey Dan, This is great! I

yanniboi's picture

Hey Dan,

This is great! I have written a few ionic apps that interact with Drupal Sites (either by downloading information from json views or posting info to service endpoints to create nodes) but your EBSheadlessDrupalAPI looks really good! Thanks for sharing :)

Hey @Dan_Rogers help me please...

TazimHossain's picture

How can i get a statistics of "how many times my views json is requested" using views? Like statistics modules "Total views".

Thanks Dan

dgmills914's picture

Just started looking into headless drupal. Thanks for sharing.

Dan Mills

Is you Baltimore talk on

Stomper's picture

Is you Baltimore talk on headless drupal recording available online?

@TazimHossain Hmm. Sorry,

dan_rogers's picture

@TazimHossain Hmm. Sorry, don't really have a great answer for you there unfortunately, as I haven't really looked at that. Maybe analytics on the front end of your app? Perhaps add event tracking to the call?

@Stomper Unfortunately it wasn't recorded, but all my main talking points are within the app itself! You can see it live here.

Headless Register

alayham's picture

Hi
Is it possible to register and login using ajax/json on D8 Dev?

Possibly Not Yet

tyler.frankenstein's picture

Interesting discussion about this here: https://www.drupal.org/node/2291055

I can confirm login is possible

-enzo-'s picture

Hi alayham

I didn't try yet the register, but the login works but right works a little different than Drupal 7, because the login end point doesn't exist in Drupal 8 instead of we have Authentication provider enabled per REST Resource.

Let me explain the steps to access a REST Resource with login

  1. Enable the Rest Resources you want to expose i.e node/{entity} with the REST State you want to enable i.e GET
  2. Choose the format json or xml, others will be enabled with contrib modules
  3. Choose the Authentication Provider Basic Auth and Cookie are available from Drupal 8 Core

If you want to work in a CORS environment you have to use Basic Auth

in CORS environments every time you want to access the resource you need to send the credential to Basic Auth.

I have an article explaining how to Enable CORS in Drupal 8 http://enzolutions.com/articles/2014/09/08/how-to-enable-cors-requests-a...

Also if Basic Auth isn't good enough for you you can try to create a new one I did an article explaining how to create a custom Authentication Provider at http://enzolutions.com/articles/2014/12/28/how-to-create-an-authenticati...

If you can share your experiences with Register process that will be helpful for the rest of the group.

Kind regards.

enzo - Eduardo Garcia

Thank you enzo

alayham's picture

Thank you enzo

I tried this a few months ago, I remember that I could register, but not login. so I decided to wait until D8 REST is complete.

My project repository is here, The register/login code was trashed and not pushed to the repository. This is an Arabic phonegap Application: https://github.com/alayham/syrians

I will return to this and try your code in a few days, then post an update after I push my code to the repository.

Headless Drupal

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: