1 Introduction to Headless Drupal
- When to go Headless
- Speed of Development
- Separation of teams/resources
- Same data, lots of different consumers
- Architecture Patterns
- Architecture Patterns for Decoupled sites.
When to go Headless
Speed of development
- Faster if you have a REST API in place.
- Not always initially faster. A headless approach to developing a Drupal site can lead to gains later in a project.
Separation of teams/resources
- Dedicated teams for building ‘Drupal’ resources, and dedicated teams for building rendering/presentation resources.
- Lack of technical debt on teams. Focusing on a single set of tasks.
Same data, lots of different consumers
- Building one backend that will be consumed with many different systems.
- Separation of concerns
- When the the Drupal presentation layer is getting in your way.
Architecture Patterns for Decoupled sites.
- Clean URLs
- Error Handling
- API Versioning strategy & implementation
- API Documentation strategy & implementation
- Cache & Theme
- Client Side templating
- Static Site Generator
- Drupal to Drupal
You don’t have to take down your existing Drupal site!
You can add an API to your existing Drupal site and use it as a superset of the existing functionality.
Real world Examples
- The Tonight Show Starring Jimmy Fallon (Node.js + Backbone.js): / DrupalCon case study /via @vordude
- Weather.com (Angular): / DrupalCon case study /via @DamienMcKenna
- Radio France Internationale (Symfony 2): /via @slybud
For a bigger list of examples see this list