Tip:
Highlight text to annotate it
X
This series is for anybody who wants to dive into Drupal 8 but is unfamiliar with some
of the concepts that it introduces like object-oriented programming, Symfony integration, autoloading,
plugins and unit testing among others. Even if you come to the table having never worked
with Drupal before, you should be able to follow along but I may make references to
the way that Drupal 7 works in contrast with Drupal 8, for example, or might gloss over
certain Drupal-specific terms like "hooks" and "entities."
I also assume that you have some basic PHP programming knowledge. If you're just starting
out with development, I'd suggest that you watch the PHP Programming Basics video collection
first and then come back to this series. A good part of what we'll cover involves working
with PHP in an object-oriented way, and it's tough to really appreciate those concepts
without first having run into the limitations of the way that you program when all you are
trying to do is just build something that works.
The main goal of this series is to familiarize you with specific concepts and techniques
so that you'll know how to find your way around Drupal 8 but also in such a way that you will
be able to use many of your new skills outside of Drupal as well. For example, when we look
at object-oriented programming, it will be easier to identify key concepts in plain PHP
and then introduce how those concepts are implemented in Drupal.
When we dive into the Symfony framework, we'll look at the various components outside of
Drupal to begin with and then we'll address how they are used in the context of Drupal.
The goal again is to illustrate ways that these tools can be used both inside and outside
of Drupal which will strengthen your position as a developer in your own projects and also
when you are looking for paid work.
So some of the big areas that we'll be covering in this series include, first, building a
simple module. We'll begin by looking at where the scaffolding of a module has changed from
Drupal 7 and where it stayed the same, and this will launch us into exploring a lot of
the concepts that we need to know to understand what's really going on with the code.
We'll dive into object-oriented programming concepts and techniques so we'll start from
where we left off in the PHP Programming Basics collection and discuss what the big conceptual
differences are and of course look at numerous practical examples to illustrate the different
ideas.
We'll look at namespacing. Now, the basics of namespacing are pretty simple but we'll
go a bit deeper and look at namespacing practices and specifically what you need to know to
take advantage of namespacing in Drupal.
We'll discuss autoloading. If you don't know what autoloading is, it will seem like a lot
of Drupal 8 code is just magical. Here, we dispel the magic and explain what's going
on with autoloading and why.
We'll dive into Symfony integration. Drupal takes advantage of numerous components from
the Symfony framework and so we'll look at how Symfony works both on its own and then
explore the various components used by Drupal.
We'll talk about controllers. One of the ideas that Drupal takes from Symfony is the idea
of a controller or rather a class that interfaces between data and the way you want to display
the data. Now, if you don't know what that means, don't worry. We're going to ease into
it.
We'll look at Composer. So Drupal takes advantage of a PHP application called Composer. It's
a powerful tool for integrating third-party libraries in your code base. We'll look at
how to use Composer for any project, which is a lot of fun, and where Drupal leverages
it in particular.
We'll dive into what to do with custom code in Drupal 8. So many of the techniques that
you will learn throughout this series will be useful when it comes to evaluating how
you write your own custom code that doesn't necessarily fit into any of the typical Drupal
conventions. So we'll explore some ideas around useful ways to apply these techniques.
We'll talk about migrating modules from Drupal 7 to Drupal 8. So migrating modules in the
past between major versions of Drupal has been tricky and it's going to remain tricky
from 7 to 8, but we'll talk through some of the techniques that will help your migration
process go a bit more smoothly.
We'll look at unit and functional testing. A big benefit of object-oriented programming
is that it becomes much easier to test your code, and solid testing means that you'll
find problems much faster and have an easier time troubleshooting issues. So we'll discuss
the different types of testing and how to write tests for your Drupal modules.
And finally, we'll discuss plugins. So there's a new concept in Drupal 8 called the plugin.
We'll talk about what that is and how they exist as well as look at some examples of
how they work.
If any of these or all of it sounds overwhelming right now, just take a deep breath and relax.
The names and descriptions of all of these subjects might appear daunting, but when we
start working through the examples you're going to catch on really quick and any sense
of foreboding that you have now will be replaced with excitement because this stuff is a lot
of fun and you'll start to see applications in your own work really fast both inside and
outside of Drupal.
All right. Let's get started.