Tip:
Highlight text to annotate it
X
All right. I'm going to jump back to the file browser. So probably the most confusing or
new part of this to you, if you haven't worked with object-oriented programming and you haven't
worked with frameworks like Symfony before, is this whole structure leading up to the
Controller and the Controller itself.
Some of the questions you might have right now are, what is a controller and how does
it come into play here? Why aren't we just using plain old functions? You might have
some questions about how this class is structured. If you've never worked with objects before,
it could look a little bit foreign. You probably wonder about this directory structure. It
seems a little bit convoluted.
So at this point, what we're going to do is go on a tangent outside of Drupal in order
to explore the various components that go into this. So we're going to end up looking
at object-oriented programming principles. We're going to start from where we left off
in the PHP Programming Basics collection.
So if the bulk of your learning has happened there when it comes to programming, this will
be a smooth transition into object-oriented work. We'll explore the idea of namespaces.
We'll look at autoloading, and if you have no idea what that is, we'll address that pretty
soon here. But we'll explore the standard that we're using for autoloading that impacts
namespaces and also impacts the structure of our file system.
We're also going to look at several components in Symfony so you can see where we're using
Symfony ideas inside of Drupal 8 and which aspects of what we're doing are Drupal 8-specific.
And then finally when we come back around to talking about this module again, you'll
be in a much better position to understand why everything works the way it does. And
once you understand why, it becomes a lot easier to figure out where you can manipulate
things and where you can take advantage of the techniques and concepts that we talk about.
It may seem that the journey that we're about to go on strays far from looking at Drupal
8 specifically, but everything that we cover will impact your understanding of Drupal 8.
Feel free to skip over any of the videos that cover aspects of object-oriented programming
or Symfony that you're already familiar with. We'll try to isolate those as much as we can
so you can easily come back into the stream of things once you get to a video that covers
something that's new to you.
Okay. So let's begin the buildup by looking at object-oriented programming and PHP from
a technical level and also discuss the conceptual implications.