Symfony
TopicSymfony is a set of reusable PHP components, and a framework for building PHP applications. Drupal makes use of various Symfony components.
At Drupalize.Me, one of our goals is to provide learners with up-to-date resources that align with the latest best practices. To that end, I recently worked to update our tutorials to reflect the transition from PHP annotations to PHP attributes for plugin discovery. I blogged previously about why this transition is happening.
As Drupalize.Me’s tutorial library continues to grow, these kinds of changes touch ever larger numbers of existing tutorials. Plugins is an interesting one because we have tutorials that teach the inner workings of the Plugin API. And, we have tutorials about things like blocks, field types, and views plugins, that while not specifically about the Plugin API, make use of it. This ended up being one the most significant updates we’ve made since the release of Drupal 8.
In short, the updates are necessary because Drupal is transitioning from annotations to native PHP attributes. And while annotations will continue to work for the foreseeable future, we wanted to make sure that the code examples, and recommendations, you find on our site are aligned with that code you’ll see in the latest versions of Drupal core.
Drush Custom Command Tutorials Updated
Blog postWe updated our Drush tutorials to be inline with current best practices around the use of PHP attributes and autowiring dependencies. This post looks at the changes we made, and the work required to keep these resources up-to-date for our members.
New and Updated Tutorials for Drupal 11
Blog postWe've added a new tutorial, Upgrade to Drupal 11. And, we've updated all tutorials and code in our Module Developer Guide for compatibility with Drupal 11.
Performance and scalability determine how fast your application can serve a page and to how many users at a time.
Twig is a template engine for PHP, which is the language used in Drupal. Twig can be used to design templates in generic PHP applications as well as Drupal themes.
PHP namespaces provide a way in which to group related classes, interfaces, functions and constants. Drupal uses PSR-4 namespaces to autoload the correct PHP class from a file, accommodating variations in site structures.
Web services allow two or more applications to share data and instructions with one another across the Internet.
The Migrate API can be used to import content from an older Drupal site (Drupal 7 or older), or any other data source, into the current version of Drupal.
Use the Configuration API to access configuration data stored by a module, provide default configuration, create settings forms, and other tasks such as overriding settings for a local environment.
Caching in Drupal
TopicCaching in Drupal is controlled by Drupal's Cache API which is used to store any type of data on a permanent or temporary basis. Some types of data tend to take a long time to compute, but utilizing the Cache API in your module can help your site load data more quickly.
Have you ever wondered "What is the difference between cache keys and cache tags?" One of our Drupalize.Me members wrote in asking about it, and the answer provides insight into how Drupal's Cache API works.
Events
TopicEvents are one of the ways that module developers can alter or extend Drupal without modifying existing code.
Controllers
TopicControllers are the portion of a Drupal module that handle responding to an incoming request with the appropriate response data.
Composer
TopicComposer is the preferred dependency management solution for PHP, is used by Drupal core, and is becoming increasingly popular for managing the modules and themes used for a Drupal project.
Docker
TopicFor the Drupal developer, Docker is a way to provide a local development environment to run web server software.
The Render API consists of a standard format for describing data using structured arrays and a process for converting those arrays into the HTML a user sees when interacting with a Drupal site.
CSS in Drupal
TopicCascading Style Sheets (CSS) files are added as an asset library through a theme’s libraries configuration file. HTML attributes, including classes and IDs, are commonly added in template files with Twig.
In Drupal’s core library there are a number of utility functions and classes that, as a module developer, you will find make your task easier or less tedious.
Here's an update from Joe at Drupalize.Me about the progress of the Drupal CMS Guide -- and the challenge of creating docs for a fast-moving open source product like Drupal CMS!