Zensations

Development · Event

A look back at the Drupal 8 Starter Day

Dimitar

Last Friday, the European Code Week saw the Drupal 8 Starter Day take place at the Vienna Museumsquartier. The free event aimed to introduce interested parties to the changes and new features of the Drupal 8 Content Management System—which had just entered its beta phase.

The event began with a get-together over coffee and cake, just as it started to rain heavily outside. These were ideal conditions to dedicate one's attention to the upcoming presentations. After a brief introduction to the agenda and the day's topics, the first session quickly got underway.

Site Building with Drupal 8

Sebastian Siemssen and Philipp Melab were the first to take on the task of familiarising participants with Drupal 8 Core by live-building a demo site where the two speakers could be rated via a rating system. This session must have particularly appealed to beginners and those with less experience, as before diving deeper, the revised Drupal 8 installer and Drupal's core concepts (Entities, Nodes, Menu, Field, and Permissions systems, etc.) were introduced.

During the live demo, the system was configured in a short amount of time, allowing ratings to be submitted via mobile devices within minutes. This was built solely using modules/functionalities already included in Drupal 8 Core. The features of the Views module, which has been part of the Core since version 8, were fully utilised for various displays. The demonstration of the Configuration Management Initiative (CMI) functionality was particularly interesting, showing how already made configurations (configurations only, no content) can be easily transferred from Drupal's admin interface to another instance (via the built-in export/import function).

Theming in Drupal 8

After the lunch break (featuring light Austrian fare, aka Käsespätzle), another exciting topic concerning Drupal 8 followed—the new theming system. Christian Ziegler presented the most important changes—a real treat for seasoned Drupal 7 themers (even after lunch), as a lot has happened in this area, for example:

  • All core themes are responsive
  • Strong adoption of HTML5 elements
  • Significant reduction of CSS IDs, with increased use of the BEM syntax
  • Themes are leaner in terms of JS libraries
  • No more "theming functions"; all output is now in template files
  • New Classy base theme in Core, which can be easily deactivated if needed (= more and easier control over Drupal's CSS classes – yay!)

Drupal 8 aims to extend the responsive approach throughout the entire system as much as possible, so themes can now register their own breakpoints, which Drupal can then recognise and use (e.g., by delivering images of different sizes depending on screen width). Such configurations are thus found in the right place, namely within the theme, and are therefore flexibly adaptable per theme.

Last but not least, Drupal 8 uses Twig as its templating engine. This is an important step, as Twig makes Drupal more secure (e.g., automatic autoescaping, no more PHP code in templates), more consistent, and simpler. Crucially, themers without Drupal experience can now contribute much more easily to a Drupal project.

Coding in Drupal 8

A great deal has changed in the Drupal 8 universe, especially for developers (use of object-oriented code). Wolfgang Ziegler's presentation began with a brief overview of the "PHP Renaissance" concerning modern programming practices in the PHP language and their influence on the code in Drupal 8. The changes in Drupal 8 represent enormous potential for further development, both for the software and for Drupal developers. This involves the use and learning of common programming standards (OOP), as well as the ability to leave the Drupal island and benefit more from existing external systems and components by learning and applying "PHP best practices." The presentation provided an excellent overview of the following Drupal-development-specific topics, also using examples from the system itself:

  • Module structures
  • The move away from the hook_menu practice towards a modern Controller, Routing, and Menu System
  • The new Plugin System
  • Configuration System
  • Services & Dependency Injection
  • Better tests through the use of PHPUnit

Although the talk was more accessible to experienced developers with a Drupal background, the overview provided was also very interesting for developers who want to learn Drupal 8, especially because all important code changes were covered in great detail within the allocated time.

Development Environment

The last presentation of the day dealt with setting up an optimal development environment for Drupal developers, with the tips provided also being very interesting for PHP developers in general. Sebastian Siemssen and Philipp Melab guided attendees through the optimal settings for an IDE and demonstrated how to write correct code quickly and easily with the help of PHPStorm's Drupal support (through function autocompletion, automatic adherence to Drupal coding standards, etc.). Further tips were also given, including the importance of using the right hardware (SSD hard drive for local development).

The interaction of PHP's Xdebug Library with an IDE is very helpful, in fact indispensable, for professional development. It allows you to interrupt code execution at specific points, which greatly assists in debugging, for example, by examining variable values at specific times.

Conclusion

The day was, as expected, a very interesting and successful event. Drupal 8 is just around the corner; the basic framework is already established in the beta phase, and the changes are exciting and good. New developers, both beginners and advanced PHP developers, will find it easier to get to know Drupal due to the integration of standards. The UI has also improved, becoming responsive and UX-optimised. Video contributions to the sessions will follow shortly and will, of course, also be published here; an overview of our photos can be found on our Flickr account.

Share

More on this topic