headless drupal with vue.js @ 24th oct 2017 meet-up

4

Upload: drupal-durban

Post on 21-Jan-2018

77 views

Category:

Internet


3 download

TRANSCRIPT

Page 1: Headless Drupal with Vue.js @ 24th Oct 2017 Meet-up
Page 2: Headless Drupal with Vue.js @ 24th Oct 2017 Meet-up

What is Headless Drupal?

• A little history• Flat files• Single language code base• Reusable modular approach • Object Oriented• Databases began containing business logic• Modules in different languages

• MVC framework (Model-View-Controller)

Page 3: Headless Drupal with Vue.js @ 24th Oct 2017 Meet-up

What is Headless Drupal?

• A Drupal 7 implementation

• Create a url that returns json

• Create a vue app that consumes the json

• Check out the code

• Drupal 8 focused on building the restful api

• CRUD

• GET, POST, PUT, DELETE

Page 4: Headless Drupal with Vue.js @ 24th Oct 2017 Meet-up

Can I start using Vue in existing

Drupal sites?

• YES

• HOW?

• Include the vue library

• Add a js file with vue code

• Add vue directives to #attributes on form elements

• Let’s check out the code