The first-class "Page" of Drupal 8
Drupal, with its love of alters, has always had a pretty malleable model of just what makes up the HTML on any given "page." Modules are free to hook in just about anywhere to add and modify what's shown, and it's tough to really know what exactly Drupal will spit out beforehand. We reached the pinnacle of this in Drupal 7 with hook_page_alter()
.
In Drupal 8, we're (trying to) take a different approach: a stable page, whose contents we know beforehand. This is a radical shift with far-reaching implications:
- Caching: the predictable page model is like a steel backbone for caching, compared to the wet noodle of previous versions.
- Better distributions: distros can ship without themes - which means they can be RE-themed! Distro developers can encapsulate their visual experiences into packages that are manageable, and can even be tweaked by those who use them.
- Better visual feedback: page predictability means previewing. We'll be able to provide users with much better feedback about the effects their choices will have on the appearance of their site.
- Template first: it may even be possible for frontenders to write a template *first*, have Drupal read it in, and turn that into a block-filled page, just like one someone clicked together.
The first-class page model is currently teetering on the knife's edge of acceptance. Whatever happens, I'll talk about what we did get in, what we'll get in next time, and what sort of magic we can expect from contrib.