Save the Date: Chris Shattuck AMA on Reddit is November 26
Are you ready to get the truth, the whole truth, and nothing but the truth...? Don't worry, you still have a week to prepare!
Mark your calendars, because next week is when you'll get your chance to ask Chris Shattuck ANYTHING! Just tune into r/Drupal on Tuesday, November 26 starting at 11 a.m. EST to get all the juicy details.
In the meantime, you can brainstorm about what kind of questions you want to ask (maybe about BuildAModule, Drupal, start-ups, or why Dominion is such an awesome game), and you should also check out some of the new Object Oriented Programming videos in the Drupal 8 Developer Prep collection.
5 NEW videos added in "Drupal 8 Developer Prep"
(FREE!) How and why to use static methods in classes - 5:21
Sometimes there are methods that you'd like to be able to call on their own without going through instantiating a new object. The "static" keyword does exactly that. Static methods still make the relationship between methods and their class container explicit - which is a win over traditional procedural functions - but without having to needlessly create objects.
Now that you know how to use static methods, how do you figure out when to use them? In this video we look at one example where we generalize an idea from our code and decide how to expose the methods. It's more fun than it sounds, I swear.
Early on in this series, we created a "controller" inside of our Drupal 8 module. If you've never worked with object-oriented code before, you might be a little confused about what the role of a controller is. No problem, here we make it simple and explore an example in our code.
Over the next few videos we're going to look at a few different ways to allow one class benefit from the work we've done in another class. The first method we'll look at is how to "inherit" another classes methods and properties. If you've never seen this before, you'll likely immediately see the application in your own projects.