Introduction to Headless Drupal
We know Drupal is an amazing platform for making websites. But did you know it’s also a world-class content API that can easily be integrated with a other technologies? In this class you’ll learn how to combine Drupal with Node.js, a popular technology for building highly interactive websites, to build rich digital experiences.
You will write code all day! By the end, you'll have written your first Node.js application(s) and have integrated Node.js's real-time wizardry into Drupal's content management magic. Learning Objectives The Four Kitchens Web Chefs will show you how to:
- Strategies for success when using Drupal as a content API
- Write code that reads and writes data to and from your Drupal site
- Write custom API endpoints in Drupal to connect to your realtime application
- Gain experience with the popular Node.js framework: Express
- Know what Node.js is good at and when a different tool is better
- Understand how to use NPM node's world class package manager
- Write non-blocking asynchronous code and how to spot it's evil twin: synchronous blocking code
Node.js is a power tool for writing fast, real time applications. At Four Kitchens we've used it for:
- Creating a responsive web game that mimics the experience of playing with magnetic poetry on the web, Drupal Poetry
- Providing a feed ingestion and processing application that processed over 300 feeds per minute and broadcasting them out to hundreds of subscribed sites.
- Providing real time commenting for live video events on a Drupal site.
- Building a rich dynamic site for NBC’s The Tonight Show starring Jimmy Fallon.
- Helping large media clients build a performant and extensible solution for their public facing publication.
- The patterns we establish when integrating Node.js can easily be adapted to integrating - Drupal with other technologies such as Ruby, iOS, or Android.
Each attendee will have access to their own development environment that includes all necessary assets and content to jump into the hands-on exercises. The environment will stay up for 30 days after the training. We will post all links and resources on our website, create a mailing list for follow-up questions, and create a Google Doc to collaborative ask questions and share markup during (and after) the training.Syllabus
- Intro to Headless Drupal
- When to go Headless (Lecture)
- Architecture Patterns (Lecture)
- Real world Examples (Lecture)
- What exactly is a REST API?
- HTTP Methods (Verbs)
- HTTP Status Codes
- Media Type
- API Tools
- Chrome Extensions
- Command line tools
- Online tools
- Drupal Services
- Module Options
- Install & configure RESTful
- Create Endpoints
- Hypermedia API Design in practice
- API Best Practices
- Intro to Node.JS
- What is Node.JS
- Events, Threads and Concurrency
- Why not Drupal and HHVM?
- Why Node?
- Intro to ExpressJS
- What is Express.JS
- What is NPM
- Your first Express Application
- Templates with DustJS
- Caching Drupal Content in Node.JS
- Introduction to Redis
- Cache concepts
- Cache Drupal content
- Reference implementation introduction
- What is SAUCIER
- Headless A-ha's
- Strategies for User Generated Content
- Drupal Developers who want to learn how to use Drupal as their CMS and an other technology to get that content to their users. In our case that technology will be Node.JS.
- Drupal developers who want to better understand how to bring asynchronous functionality to their sites. This class is a beginner intro to Node.js, and is not appropriate for developers who use Node.JS on a regular basis.
A laptop with SFTP, SSH software and a text editor installed. Any local operating system is fine, but our trainers don't have experience debugging Windows. Comfortable writing PHP to use Drupal hooks and have written a custom module.
- Experience with AJAX patterns helpful
Date: 21 September
Cost: €450 + VAT early bird rate (through 10 July), €500 + VAT regular rate - includes coffee & pastries before class, lunch and coffee breaks
Training Company: Four Kitchens
Trainers: Matt Grill & Patrick Coffey
Experience Level: Advanced
Drupal Version: 7.x