Going in for agile make sure the game is worth...
Introduction to Decoupled DrupalDespite being flexible and easily extendable, a traditional Drupal-based website has a monolithic architecture: it is a single-tiered web application which is responsible for both content management and display. This basically means that you create content and store it in a back-end database, while the CMS uses a default presentation layer (a custom or ready-made Drupal theme) to display web pages to your customers on request.
How is this achieved?
It is an API placed between the back-end and front-end that retrieves content from the database. JSON APIs are usually the go-to solution here as they are endorsed by the Drupal community (JSON APIs usage has grown by 50% in the first half of 2018) and will be included in Drupal 8.7 core.It’s worth mentioning that Drupal versions starting from 8.0 are shipped with a basic REST API facilitating cross-platform content publishing; companies that run Drupal 7 websites have to implement 3rd-party modules such as RestWS and Services to handle client-server communication.
Difference between Headless & Decoupled Drupal WebsitesBefore we discuss the major advantages and drawbacks of API-driven websites, it should be noted that “decoupled” and “headless” are not really interchangeable terms. A headless CMS does not have a default content presentation layer, thus enabling business owners to effortlessly share their content across multiple channels and exercise more control over UI and UX design. A decoupled CMS has both the front-end and back-end systems – and these are connected via an API. When you create new content, you can publish it using the templates available out-of-the-box or distribute it through an API.
The major difference between headless and decoupled Drupal websites has been perfectly summed up by Deane Barker, a US-based content management expert, who considers headless systems reactive as they “manage content and then just sit and wait for some process to ask for it”, while decoupled CMS solutions are proactive, which means they “publish content for presentation and push it into a delivery environment”.
What are the Major Benefits of Going Headless?Regardless of the approach you take, an API-driven Drupal solution can have a profound impact on your conversion rate and overall customer satisfaction:
- The decoupled architecture allows you to gain full control over a website’s rendered mark-up and user experience.
- JS frameworks help developers create highly interactive websites with non-blocking interfaces which enable users to interact with parts of content while a web page is not entirely loaded.
- The separation of a website’s presentation and data management layers translates into greater team flexibility, as your front-end and back-end developers will be able to work independently. Provided you address a reliable Drupal development company, this alone could improve a project’s velocity and lead to major cost savings. Besides, you’ll be able to redesign your website (that’s something companies usually do every 2 years) with no changes on the back-end.
Restrictions Stemming from Decoupled Website ArchitectureFlexibility often walks hand in hand with increased complexity and responsibility. Here are a few steps you have to take to make decoupling work for you:
- In order to improve a headless website’s performance, your web development team will have to minimize HTTP requests on the front-end, cache the API and address SEO-related challenges that derive from screen diversity.
- A decoupled architecture is generally more complex to debug and may create circular dependencies if your front-end display logic is intertwined with the content distribution API.
- You need a solid content reuse strategy backed up with the right technology tools such as the Drupal Field API module.
- In a decoupled CMS, all those useful Drupal modules like Google Analytics which help you track links and detect 404 errors work solely for the back-end, so the functionality has to be written from scratch. The same goes for site previews, UI localization, etc.
When does It Make Sense to Decapitate Your Drupal Website?As we mentioned earlier, the decision to ditch the default front-end solution of a Drupal website should be driven by business requirements. Decoupled websites lack many useful features which come baked into the CMS including layout management, authentication and protection against Cross-site Scripting (XSS); your team will either have to create this functionality from scratch or manage without it, which might entail additional website development and maintenance costs.
What are the cases when the ends actually justify the means?
- You produce large volumes of content and need more freedom in structuring and displaying it.
- You need a tool to publish content on multiple platforms including your business website, single-page applications, conversational UIs, smart TVs, native mobile apps and wearables.
- You extract data from multiple resources including social media, CMS, video management systems, etc.
To cut a long story short, headless or decoupled Drupal is the go-to solution for companies that focus on content production and distribution and have a large audience who consume content across a variety of devices.