Decoupled Drupal

In this series we're going to take a closer look at Decoupled (or Headless) Drupal.

We'll start out by talking about what it really means to decouple your website. Then we'll come up with a list of criteria that should be considered when deciding if pursuing a decoupled approach is a good idea for your project. Then, we'll start in planning our decoupled project by talking about the components that make up a solid API. With the fundamentals in place, we'll then talk about making sure your API is documented and tested.

Next, we'll look at a variety of methods in Drupal we have at our disposal to expose data from our site as an API. We'll take a quick look at writing custom code, using Views Datasource, Services module, and the RESTful module to expose data from a Drupal 7 site. We'll also take a look at what Drupal 8 brings to the table to help us build out a REST API without writing a single line of code.

With our API in place, we can turn our attention to a simple front-end blog demo project. We'll start with a Bootstrap template and write a single page Javascript application to handle navigation between current posts and the blog's archives. We're going to make use of a few new technologies that will also be at our disposal in Drupal 8, Backbone.js and the Twig template system. Once our basic single page application is built out, we will take a look at a couple of methods we can use to improve our SEO and the experience of our user's initial page load. In doing this, we'll learn about isomorphic Javascript and clean up our custom Javascript application. Finally we'll take a look at some of the hosting implications and considerations you'll need to address when thinking about launching our newly decoupled project.

By the end of this series, you'll see how easy it is to expose data from our Drupal site as a JSON API, and be itching to try out the latest Javascript framework to build your own isomorphic single page application.