Drupalcon Barcelona 2016 - Day 2
They Keynote on Wednesday was from Nathalie Nahai who talked about web psychology. A fascinating insight into why we interact with the web in the way we do. Watch the talk on the Drupalcon site https://events.drupal.org/barcelona2015/keynote-nathalie-nahai but skip ahead to about 12 mins to avoid the preamble.
A session about designing in browser to speed up Drupal development.
Referring to a blog post they discussed various benefits to design in browser including precision, responsive, transitions and transparency. They use technologies like gulp and browser sync to speed up theming, but also twig templating for Drupal 7, which was interesting to hear. There was also the idea that we should be designing components not pages, to allow designs to more responsive.
- use panels for all layouts
- custom templates
- custom panes for prototype
- panels everywhere
- some panelized nodes
- fewer templates to override
- custom views rendering, not using views rendering,
- execute the view
- render the nodes (teasers for example)
So in summary, using panels with custom templates allows rapid prototyping of designs and greater control over the final html that is generated. This is not something that we’ve tried so I will be interested to discuss this with the designers and front end developers on our next project.
- Try rapid prototyping with panels everywhere and custom templates.
This session blew me away with a demonstion DevShop, an open source product for managing hosting environments and testing Drupal sites. The system runs on Drupal with Aegir underneath and acts as a control panel to manage your Drupal environments across multiple servers. This looks similar to hosting control panels provided by Acquia and Patheon, but I must admit I've not used either that much.
An interesting integration with Github allows developers working on a feature branch to issue a pull request, which will automatically spin up a new testing site on the branch in question, run automated tests and provide a link for the project mamnager or client to test the work before merging back into the working branch.
We do develop Behat tests for most new projects, but on smaller projects it is not viable to run fully automated tests on an continuous integration server, so the idea that this can be easily automated is very attractive.
- Devshop has the potential to automate the process of managing multiple hosting environments across multiple servers.
- It could make automated testing much easier.
- It appears to be very easy to install.
Jody Lynn gave us an overview of best practices in menu arcitecture, url aliases and breadcrumbs as well as recommended modules. Jody recommended that urls should be hackable. This means that all parts of the url should serve up a page. For example if the url is agile.coop/blog/drupalcon then agile.coop/blog should also be a working page. She also argued that breadcrumbs should always be used and should follow the url path and menu structure for consistency.
- use a single menu hierarchy across the site
- set pathauto to use [node:menu-link:parent:url:path][node:title]
('path' may not show up in tokens, but is always available)
- always display a breadcrumb
- https://www.drupal.org/project/habitat is a useful module to enable or disable modules on different environments (disabling devel module on production for example)
- Other modules that should always be used:
- Interesting blog post from Lary Garfield on how breadcrumbs work in Drupal 8