Rendering HTML with Drupal: Past, Present and Future

Is the job of a Drupal theme to look like a design or to be the design? Is your goal to make pixel perfect replica of a static comp or do you want to design in the browser? Should you edit the CSS or edit the markup?

Drupal makes a lot of assumptions about how these questions are answered.

This presentation will review the mental models used in Drupal theming and proposal a workable path forward. For years, Drupal core has encouraged a mindset of altering and overriding its internal data structures. Developers in the Drupal 6 era created a philosophy called “sustainable theming” that relied heavily on CSS to work best with Core’s tendencies. The rapid acceleration in the wider Front-End community in recent years has brought new underlying assumptions and new ways of thinking. Expectations for how to construct Drupal sites have changed.

The given conditions and implications of four rendering philosophies will be examined:

  • The Past: “Sustainable Theming” - Accept default Drupal markup as much as possible and use CSS to make the site look like the Photoshop design.

  • The (past-ish) Present: Chasing "easy" / losing "simple" - Make field formatters, Views plugins and other reusable components in addition to using overrides and preprocessing.

  • The (future-ish) Present: Making the markup match - Responsive designs are done in static prototypes/style guides; make Drupal print the same design components.

  • The Future: Clear decoupling - Javascript MVC frameworks, Web Components and some traditional HTML frameworks have encapsulated Front-End pieces that can work with multiple data providers. Make Drupal’s components be those components.

Finally, the phrase "Headless Drupal" will come up at least a dozen times.

Slides: http://palantirnet.github.io/slides-drupal-html/2015-05-index.html

Session Track

Front End

Experience level

Intermediate

Drupal Version

Drupal 9

Session Time Slot(s)

Time: 
05/12/2015 - 14:15-05/12/2015 - 15:15
Room: 
502B - Lullabot