Study Guide

Tools to Know for Drupal Development

Drupal Coding Standards

An overview of coding best practices and standards as they are applied in the Drupal community can be found here:

https://www.drupal.org/docs/develop/standards

These coding standards, detailed for every area in which code might be produced during Drupal development, represent the broadly established best practices of the community. Adhering to these best practices will make development go more smoothly, and your contributions to Drupal core or modules to be more readily and easily accepted. If you are working on a project with Acquia technical support, these are the coding standards to which pull requests must adhere.

Drush

Drush is considered a basic skill for Drupal site development.

https://github.com/drush-ops/drush

Practice Skills Application

The application of Drupal 8 concepts is the hands-on practice development. The courses provide some opportunities to practice doing basic front-end development tasks alongside the videos, but you will need more practice than that to pass the exam. Some suggested resources are below, which provide details for the completion of specific front-end development tasks in Drupal 8.

Section 1 : Fundamental Web Development Concepts

1.1 Demonstrate knowledge of HTML and CSS

A front-end specialist should have extensive experience writing clean, standards-compliant HTML and CSS. They should be well versed in the HTML5 and CSS3 specifications, and should be up to date on modern standards and practices.

Resources:

1.2 Identify PHP programing concepts

A front-end specialist should have knowledge of PHP syntax, including but not limited to:

  • PHP basic syntax

  • Use of general PHP functions as well as Drupal specific ones.

  • Variable handling, manipulation and use.

  • Control structures.

  • Basic object manipulation.

Resources:

1.3 Identify Javascript and jQuery programing concepts

A front-end specialist should have extensive experience writing custom UI components using “vanilla” Javascript and jQuery. They should follow modern best practices and be familiar with common security and performance issues.

1.4 Demonstrate knowledge of Responsive Design concepts

A front-end specialist should have an understanding of the principles of responsive design. Drupal 8 uses a responsive “Mobile First” approach out of the box.

  • What are responsive design and mobile first concepts

  • How to apply responsive design in your stylesheets and themes

  • Understand the use of media queries in a responsive site

Resources:

Section 2 : Theming concepts

2.1 Demonstrate ability to define and use custom regions in a theme

A front-end specialist should have experience defining custom regions, printing those regions out in the proper templates, and creating conditional display logic for when to print regions.

Resources:

2.2 Demonstrate ability to work with Theme Configuration

A front-end specialist should be familiar with administrative settings related to theme configuration, and should have the ability to create his/her own theme settings using custom code.

Resources:

2.3 Demonstrate knowledge of working with Stylesheets

A front-end specialist should be familiar with CSS and Drupal’s best practices for writing and organizing CSS. They should be able to add their own stylesheets to a theme, be familiar with the ways Drupal aggregates stylesheets, be familiar with how Drupal orders stylesheets, and be able to conditionally load stylesheets.

Resources:

2.4 Demonstrate knowledge of working with Javascript in a theme

A front-end specialist should have experience writing custom Javascript and jQuery for Drupal 8. They should be comfortable using Drupal 8’s Javascript API, and be familiar with Drupal’s javascript coding standards. They should be able to conditionally load javascript.

Resources:

https://www.drupal.org/developing/api/8/assets

https://www.drupal.org/docs/8/theming-drupal-8/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-theme

https://developer.mozilla.org/en-US/docs/Web/JavaScript

https://www.drupal.org/node/2269515

2.5 Demonstrate knowledge of working with Breakpoints in a theme

A front-end specialist should know how to define and use a common set of breakpoints that can be used throughout a site. They should be well versed in CSS media queries, and be proficient in constructing media queries that can target a wide variety of devices.

Resources:

https://www.drupal.org/docs/8/theming-drupal-8/working-with-breakpoints-in-drupal-8

https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries

2.6 Demonstrate ability to build a sub-theme from a base theme

A front-end specialist should be well versed in the pros and cons of a wide variety of core and contributed base themes. They should know how to choose the appropriate base theme for a project and know how to properly sub-theme in a way that utilizes, overrides, and extends the assets of the base theme.

Resources:

http://www.morten.dk/basethemes-drupal-8

https://sqndr.github.io/d8-theming-guide/core-themes/index.html

https://www.drupal.org/docs/8/theming-drupal-8/creating-a-drupal-8-sub-theme-or-sub-theme-of-sub-theme

Section 3 : Templates and Pre-process Functions

3.1 Demonstrate ability to use Twig syntax

A front-end specialist should have knowledge of the basic and advanced twig syntax, including but not limited to:

  • Twig basic syntax

  • Use of general functions and filters as well as Drupal specific ones.

  • Variable handling

  • Control structure

Resources:

3.2 Demonstrate ability to build and customize core templates for managing markup

A front-end specialist should have knowledge of how to use, name, and create the templates to output the desired markup for the project.

  • Template order and naming conventions

  • Template inheritance and extension

  • HTML and Twig markup combinations to accomplish the theming task

Resources:

https://api.drupal.org/api/drupal/core!modules!system!templates!html.html.twig/8.2.x

https://www.drupal.org/docs/8/theming-drupal-8/using-attributes-in-templates

https://www.drupal.org/docs/8/theming/twig/twig-template-naming-conventions

https://www.drupal.org/node/2186401

https://ffwagency.com/blog/power-of-extending-twig-templates

https://www.drupal.org/docs/8/theming-drupal-8/creating-advanced-theme-settings

3.3 Demonstrate ability to work with template suggestions

Drupal 8 provides a better way to: handle template suggestions, add custom suggestions, or define a specific template suggestion for an element.

Resources:

https://www.drupal.org/docs/8/theming/twig/debugging-twig-templates

3.4 Demonstrate ability to write template pre-process functions for overriding custom output

A front end specialist should be able to use pre-process functions to override, improve, or get extra data needed for templates.

  • Correct use, specificity, and hierarchy of pre-process functions

  • How to obtain information from the Database, or objects and entities from Drupal and know the correct way of passing this information to your template

  • How to use the new and improved library management to have a better management of JS libraries and stylesheets

  • Be aware of the changes to the theme API and the improvements to previous versions of Drupal

Resources:

http://www.bradwade.com/drupal8/D8-html-body-classes/https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.php/group/themeable/8.2.x

https://www.drupal.org/docs/8/theming/twig/twig-best-practices-preprocess-functions-and-templateshttps://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.php/function/hook_preprocess_HOOK/8.2.xhttps://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.php/group/themeable/8.2.x

Section 4 : Layout Configuration

4.1 Demonstrate ability to create and configure Blocks for building layouts

A front-end specialist should be proficient in creating and managing blocks in Drupal’s UI, and in custom code. They should follow best practices for creating flexible layouts using Drupal’s built-in block system.

Resources:

https://www.drupal.org/docs/user_guide/en/blocks-chapter.html

4.2 Demonstrate ability to create and configure Views for building content list pages, blocks, and feeds

A front-end specialist should be proficient in presenting content using views. They should be familiar with the different types of views displays, their options, and the pros and cons of using each.

Resources:

https://www.drupal.org/docs/user_guide/en/views-chapter.html

4.3 Demonstrate ability to configure and use Responsive Image module

A front-end specialist should know how to properly configure responsive image presets using the responsive image module, and be able to properly create the correct image presets to be used with the proper breakpoints.

Resources:

https://www.drupal.org/docs/8/mobile-guide/responsive-images-in-drupal-8

Section 5 : Performance

5.1 Demonstrate ability to analyze and resolve site performance issues arising from site configuration

Topics focus on standard methods of Drupal configuration that optimize site performance in multiple scenarios. The various scenarios cover preferred combinations that result in minimizing page loads and render time.

Resources:

http://buytaert.net/making-drupal-8-fly

https://pantheon.io/docs/drupal-8-cache/

5.2 Demonstrate ability to analyze and resolve site performance issues arising from custom theme

This section covers common pitfalls with performance when creating various themes. Scenarios will cover efficient options with PHP, Javascript, and CSS. Questions will also cover techniques in debugging slow code within Drupal themes.

Resources:

https://www.drupalwatchdog.com/volume-1/issue-2/big-performance-wins-front-end

https://www.nginx.com/blog/8-tips-for-drupal-8-performance/

https://developers.google.com/speed/articles/optimizing-javascript

Section 6 : Security

6.1 Demonstrate ability to analyze and resolve security issues arising from site configuration

This includes common techniques around Drupal security for development and site building tasks. Security topics focus on programming scenarios, and configuration changes made thru the Drupal UI.

Resources:

https://www.drupal.org/documentation/modules/filter

https://dev.acquia.com/blog/drupal-8/10-ways-drupal-8-will-be-more-secure/2015/08/27/6621

6.2 Demonstrate ability to analyze and resolve security issues arising from a custom theme

Topics include best practices revolving around proper security in the theme layer. This includes data sanitization techniques with for both PHP and Twig processing. A knowledge of security protocols in each layer of the render cycle is required.

Resources: https://www.drupal.org/docs/8/theming/twig/filters-modifying-variables-in-twig-templates

https://www.drupal.org/docs/8/theming/twig/twig-best-practices-preprocess-functions-and-templates

Drupalize.me Resources

Drupalize.me has published a concise list of the Drupalize.Me tutorials, and other resources, that will help you prepare for Acquia's Certified Front end Specialist exam for both Drupal 7 and 8. The list is available at:

https://drupalize.me/acquia-certified-developer-exam-front-end

Learn more about the Acquia Certification Program at https://acquia.com/certification

Last updated