JavaScript and the Ajax API

So far in this book, we've only talked about topics that can be considered to relate to backend development. This means heavy PHP, working with the APIs and the database, and so on. This is because this book is oriented toward module developers rather than themers. Also, the author of this book is admittedly not a JavaScript, or any kind of frontend, developer.

Nevertheless, in this chapter we'll switch gears and talk a bit about frontend development, namely, how to work with JavaScript in a Drupal 8 application. This is because there are many things developers can and should be doing in their modules that require frontend technologies. There are a few approaches and techniques specific to Drupal when it comes ...

Get Drupal 8 Module Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.