Learn Drupal

March 4th, 2014

(FREE!) Why using global variables is dangerous, and how Http Foundation solves this problem and allows for extending functionality - 1:56

In this video we talk a bit about how the Request and response wrappers give us more flexibility than accessing our GET and SERVER variables globally, and what the dangers are of using global variables are.

Examples of how we can use the Request class to access variables, and what a reverse proxy is - 7:04

After seeing a simple example of using the Request class, we dig deeper and other things we can do with the Request class, including simulating a request (which is actually pretty neat).

Examples of using the Response class to set status codes, content and content type headers - 3:04

In this video we dig into the Response class and demonstrate how to set a 404 status code and modify the content type header. This might sound a bit dry if you’ve never had to set status codes before, but if you have you’ll notice how concise and simple the Symfony code is.

Adding a second page and an include file for common code - 3:37

Our application is pretty simple so far, and in this video we look at what adding another file would change, and how we can share code between our pages by using an include file. This is a common solution as you start to look at adding flexibility to your code, but we’ll soon identify its weaknesses too.

How to add a front controller - 4:07

We explored using a front controller in our PHP Programming Basics collection, but here we do a quick review and illustrate the pieces we need to route every request to our application through a single file, instead of relying on naming our page files in a particular way.

February 24th, 2014

Drupal 8 leverages a number of new libraries, including a slew from the Symfony 2 project. As stand-alone components, each one does an awesome job of making some part of building web applications easier. Taken together, they provide a solid, rational framework that Drupal 8 uses to manage complicated tasks like routing and dependency injection. Don't worry if that sounds overwhelming, we'll start simple so you can unwrap the onion layers and fully appreciate each component before we dive too deep.

Below are the next 5 videos in our Drupal 8 Developer prep series. We explore what Symfony is, and work our way into learning the first component we need when building an application with Symfony.

(FREE!) What Symfony is and the difference between a CMS and a framework - 2:41

If you’ve heard anything about Drupal 8, you’ve probably heard a bit about Symfony2. Symfony is a full-fledged framework that powers a lot of big sites out there (much like Drupal). Drupal incorporates several Symfony components, allowing us to leverage some mature code without re-inventing the wheel.

Building a simple example script and illustrating its flaws - 3:19

Throughout this section on Symfony, we’ll be using fairly simple example pages to demonstrate the advantages of refactoring to use various Symfony components. With this first ‘Hello, world’ script, we can identify several problems that are easily addressed by Symfony.

Refactoring our code, and how character encoding works - 5:21

In this video, we do our best to address the issues we identified with our initial script to get a sense of the direction we’d take.

How to incorporate the Http Foundation Symfony component to add object orientation to our simple script - 5:00

Now that we’ve seen how to tackle some of the problems with our initial script, we’re in a position to appreciate what the Http Foundation component has to offer. In this video, we rebuild our script using the Request and Response classes which come with the component.

How the Request and Response classes work - 3:18

Having seen Request and Response, we dive into the paradigm of thinking about our page in terms of the two part process of a client request-ing something from the server, and then respond-ing with something the client expects.

February 18th, 2014

(FREE!) What Semantic Versioning is and how to use it - 1:25

Without a set of rules to govern how projects are versioned, it's difficult to figure out what a particular version change implies. Semantic Versioning sets a solid standard for versioning that most Packagist-based projects support. Here we walk through the details.

What happens during 'composer install' and how the download is structured - 2:55

In this video, we take a look at the files that got added to our project when we ran 'composer install'. After watching the OOP videos and getting a sense of how the PSR-0 standard works, the structure will probably look very familiar.

How to use Composer's autoloader and use a package in our code - 1:56

Now that we've gotten our files with composer, we can use them in a real project! In this simple project, we use the fun Inflector library to multiply rodents.

A quick look at how Drupal 8 uses Composer - 1:39

Now that you've seen Composer in action, we take a gander at Drupal 8's composer.json file to see what kinds of packages are getting included.

How to look for packages, and how Packagist is like a module repository for PHP - 1:48

Wrapping up our Composer coverage, in this video we look at how to find PHP packages on Packagist, and draw some parallels between Packagist and the Drupal module repository. Basically, if you like sharing your code, Packagist and Composer pave the way to sharing with an even broader community.

February 11th, 2014

(FREE!) How Composer and Packagist work together to help manage reusable PHP components - 1:39

The evolution of Composer and Packagist as a way to centralize the download and management of PHP libraries for any project is a huge boon. With a single file, you can set up which libraries you want to download and which versions you will be using. In this video we explain exactly why it's so useful.

How to install Composer on a Mac or Linux and what a .phar file is - 3:13

Before we use Composer, we need to install it. Here we walk through the process for Mac and Linux users and briefly explain what a Phar file is (hint: It's like a Zip file that can contain an entire PHP application)

How to install Composer in Windows - 1:23

In this video, we walk through installing Composer on a Windows machine.

How to set up our Composer example folder and set up a basic Composer project - 2:21

Now that we have Composer, we have thousands of vetted PHP libraries at our fingertips. Mwaaahahaha! Before we go too crazy, we're going to set up a simple application that includes a single package from the popular Doctrine library that Drupal 8 leverages as well.

How JSON (JavaScript Object Notation) and our composer.json file work - 1:31

JSON has become a useful standard for structuring arrays of data in a portable way. In this video we explain the basic structure of a .json file and the specific structure of a composer.json file.

February 4th, 2014

BuildAPatch winner announced!

Congratulations to Marc Drummond for contributing several patches over this last week and winning a free year membership to BuildAModule! Thank you to everyone else who participated, we got a number of great patches submitted, and we hope to do this again before too long. Keep up the good work!

MegaPage is Back!

And better than ever. Just go to the Complete Video Index to check it out. The video collections and chapters are now collapsible (something many people have been requesting for a long time) and of course you get get all the benefits of the latest updates to the BuildAModule video player, like the ability to hide the transcript, quickly select a playback speed, playlist support and more.

Videos are coming down the pikes

I’m hard at work on a new set of videos on how Drupal leverages Symfony2 components that we’ll start releasing in the next couple of weeks, so keep an eye out. These will be a lot of fun and will be a great opportunity to bump up your programming skills in general as well and get a better idea of what’s under the hood with Drupal 8.

January 28th, 2014

Right now we're working on some BuildAModule infrastructure improvements to make it easier to release new features and updates to the site. While we're hard away at work, we wanted to give you some incentive to participate in some Drupal contributing.

So, over the next week, for every patch you submit to a Drupal module, theme, or core, we will enter your name into a drawing to win a FULL YEAR of BuildAModule for the person of your choosing. Just send us an email with the link to the patch submissions, and we'll enter your name in. If you're new to patching, check out the Drupal.org documentation here, and a bit on BuildAModule about how to apply patches once they're created.

Good luck!

January 21st, 2014

Megapage is coming back!

Based on the feedback we've been getting, everyone is really happy with the new BuildAModule site design, but a few of you miss the old home page (i.e., the Megapage!) and how you could search for videos with Control + F. So, we're going to bring it back! We're working on it now and we'll keep you posted when we launch. Thank you so much for your feedback, keep it coming!

Come to DrupalCamp New Orleans, March 29

I will be giving a keynote talk at DrupalCamp New Orleans on the future of Drupal. A couple of years back I spoke at an even in New Orleans and have been itching to go back ever since. If you've never been there, here's your excuse. It's an amazing place.

Or, Come to Sweden, March 15

I'm super stoked to be doing a keynote at DrupalCamp Sweden alongside Robert Douglass. This will be my first every European Drupal event, and I'm taking a wild guess that it will be amazing. If you're in across the big pond, consider joining us March 15h in Stockholm.

January 14th, 2014

The new BuildAModule has a ton of new features and nearly every facet of the site has been improved in some way, shape, or form. While it's impossible to list each and every change here, we wanted to highlight some of the ones that we're the most excited about.

Watching videos is what our users do most, so it was important for us to have some major video player upgrades. Users on Android and iOS phones and tablets will immediately notice that we've gone to great lengths to provide a better mobile experience. And we've added a number of tools to the new video options menu, including the ability to hide the transcript and share a link to any point in a video.

If you've been using the site for awhile now, one of the most obvious change is the new homepage. We've highlighted how different users use BuildAModule to achieve their training goals, made it easier to find the newest and most popular videos, and added a handy new membership calculator to help you figure out the savings you can get from subscribing to longer-term and group memberships.

Instead of displaying all 1100+ videos on a single page, we've now split them up into individual collection pages to make it easier to browse through and digest our library. Each one includes a list of prerequisites, a description of who the collection is for, and a summary of what's covered, which makes it much simpler to determine which collections are right for you.

If you liked having all the videos on one page because it was easy to use your browser's search to find what you needed, then you'll love our new search overlay. You get the same kind of functionality with the added ability to search through transcripts as well. And since the overlay plays the videos from your results in-line, you can search freely without the fear of losing your place on the site.

We have an amazing activity monitor that visualizes your activity over the last 30 days and helps track your progression on the site. If you're the manager of a group account, you can look at the activity pages for each of your users to figure out what they've been working on. With these tools, you can get a sense of your overall progress at a glance and make sure you're getting the most out of your membership.

Another big feature that we've added is the playlist manager. You can now save playlists to your account and create landing pages for them. We've done everything that we can to make it quick and easy to create and share playlists that will help solve training problems for you and your organization.

There are hundreds of other improvements to the new site, and we'd like to invite you to take a look around and discover these new features for yourself. We hope you enjoy all of these new additions as much as we enjoyed working on them.

Take the tour

January 7th, 2014

Welcome to the new BuildAModule

The new BuildAModule homepage!

We've been working hard over the last few months to create an even more enjoyable experience on BuildAModule, and today we've made all of those changes live. There are hundreds of added improvements that we think you're going to love, a more consistent experience, and a lot of new features.

When you're ready, take a look around. You can watch a video where I talk through the major updates, or browse a more textual tour of the big additions.

Take the tour

December 31st, 2013

The Drupal 8 Developer Prep series picks up again with a look at some PHP coding standards. We'll continue to work with our Autoloader and explain why it's to our advantage to make sure it complies to the PHP Standards Recommendations (PSR) set out by the Framework Interoperability Group (FIG).

4 NEW videos added in "Drupal 8 Developer Prep"

(FREE!) What FIG (Framework Interoperability Group) is and why PSR-0 (PHP Standards Recommendation) exists - 1:32

Autoloading becomes much more powerful if all of the libraries you use expect the autoloader to work in the same way. To solve problems like creating standards around autoloading, the Framework Interoperability group was created, and the first recommendation they put out was to solve this particular problem.

How to build a PSR-0 compliant autoloader, and a walkthrough of PSR-0 requirements - 8:43

PSR-0 has a cryptic sounding name, and the fact that it took a bunch of really smart people coming together to create it might imply that it should be dauntingly complicated, but it's not. In this video, we walk through each of the conditions and build an autoloader that fits the bill.

Why it's good to use an established autoloader instead of creating your own - 1:24

Even though the basics of autoloading are simple and we can build one on our own, there's some serious gains to be made by using a more mature autoloading solution. We talk about that a bit in this video.

How to make our own project PSR-0 compatible - 4:44

To wrap up our OOP boot camp, we're going to take our own components and make them far more useful by conforming them to PSR-0 standards. What we end up with is going to look a lot like the code we built in our first Drupal 8 module example, but this time the structure is going to make a lot more sense.


December 24th, 2013

The BuildAModule Team wishes you and your loved ones the happiest of holidays this year. And for those of you who want to give or give the gift of learning, we have a little something to help you do just that! Use the code HOLIDAYS2013 any time over the next three days to get 25% OFF 6-month and 12-month memberships, or just click on any of the links below to take advantage of this special offer.

Get 25% OFF a 6-Month Membership

Get 25% OFF a 12-Month Membership

December 17th, 2013

The Drupal 8 Developer Prep series keeps on trucking with a more in-depth look at Autoloading. This week, we're going to create a simple Autoloader and walk you through each line of code as it executes! We'll also take a quick look at a more likely third party scenario in order to get a better idea of what the structure of a typical third party PHP library is like.

3 NEW videos added in "Drupal 8 Developer Prep"

(FREE!) How to create a simple autoloader - 2:24

Now that you know what an autoloader is, we look at how to create a simple autoloader. We'll build on this in videos coming up, but this should give you a clear sense of how it works and dispel what seems like magic when you haven't looked under the autoloading hood.

Walking through our simple autoloader with a debugger - 2:02

Just to drive home how our autoloader works, we step through the code line by line as it executes to see exactly what's going on.

How a typical PHP library will be structured and what each of the nested folders mean - 3:12

One of the most obvious changes introduced while building a module in Drupal 8 is the incredible nest of directories in which we need to work. Each directory has a purpose, and many of them are tied in with the autoloading conventions being used. In this video we walk through each level and explain what's going on.


December 10th, 2013

This week, we demystify more of the magic behind Namespacing! And as we summarize all of its benefits, this journey naturally leads us into Autoloading territory. The Drupal 8 Developer Prep series continues with a look into this memory saving technique.

4 NEW videos added in "Drupal 8 Developer Prep"

How to use namespace aliases with the "as" keyword - 1:14

One way we can get access to both classes of the same name at the same time is by using aliases. Again, we avoid the problem of re-naming our classes (which is one big payoff of namespacing) and instead use an alternative name for one of our classes.

How to use a Fully Qualified Name for classes and methods - 1:32

A finally method we can use to reference a class that we've included in our code is by using a Fully Qualified Name. When we use a Fully Qualified Name, we don't need a "use" statement at all, but calling our classes is going to take a few more characters. Nothing we can't handle.

The benefits of namespacing and a summary of how namespaces work - 1:58

Now that you've seen namespacing in action and explored the most important mechanics of it, we take a step back and talk briefly about what we're really getting out of namespacing. On the surface, it can seem like a lot of extra code for not a lot of benefit. But, in addition to finally being able to name our classes according to exactly what they do, there's some other perks you should know about.

(FREE!) What "autoloading" is and how namespacing relates to it - 2:12

One thing that namespacing allows us to do is use an autoloader to include our class files on-the-fly whenever we instantiate them or use a method from those classes. Autoloading is pretty dang cool and allows us to simplify our code by removing unnecessary include or require statements.


December 3rd, 2013

Cyber Monday Deal Extended! 30% OFF ANYTHING!!

If you missed out on our Cyber Monday deal yesterday, then you're in luck. We're extending the savings for another 24 hours so that our Newsletter subscribers can get in on the action. Get 30% off anything at BuildAModule by using the code CYBER2013 when checking out!

A New Chapter Begins! An Introduction to Namespacing...

Today marks the start of a new chapter in our Drupal 8 Developer Prep series. We're going to be doing a bit of work with Namespacing over the coming weeks. To start things off, we'll show you how it can be used to avoid some major headaches when you're working on a project with naming conflicts.

5 NEW videos added in "Drupal 8 Developer Prep"

How to split a single large file into individual class files - 4:43

So far we've been building our entire project in a single file to make it easy to review. For sustainability and re-usability, though, eventually every mega-file needs to be split up into separate components. In this video we talk about the specifics of splitting things up.

How to name class files - 1:03

There's a lot of freedom in how you can name classes and class files, but by following a couple simple conventions, you'll pave the way for easier integration with other components later on.

How using third-party libraries or working on a team can create naming conflicts - 3:03

Have you ever spent a bunch of energy building an important component to your project, only to realize later that there's a more mature third-party library that will fit the bill? And then, when you try to use it, you realize that it uses the same class name as your component? Even if your answer is no, it's something you'll run into eventually, and it's good to have a solution at the ready.

(FREE!) How to use namespaces in PHP - 7:11

In this video we walk through the mechanics of namespacing, including how we reference namespaced classes and use other namespaces. The basics seem simple, but if wrapping your mind around namespaces has ever set your head swimming, the tangible examples in this video should help clear things up.

How to use namespaces to avoid naming conflicts - 2:34

How to use namespaces to avoid naming conflicts">

After looking at the implementation of namespacing in the previous video, we look at how it makes using including our third-party class along with our identically-named self-made class possible without altering any names or adding gobs of unearthly prefixes.


November 26th, 2013

Chris Shattuck: Developer, trainer, Drupal enthusiast, aspiring guitarist, father of two boys, and now... answerer of questions? It's time to ask Chris anything! Nothing is off limits!!

For example, if you were to ask Chris what he does to stay in tune with the Drupalverse, he would probably tell you that The Weekly Drop is a great, neutral way to keep up with Drupal news.

I bet you can come up with some better questions than that though... Head on over to r/Drupal all day long for the most awesomest Drupal AMA going on today!

5 NEW videos added in "Drupal 8 Developer Prep"

How inheritance allows for abstraction of concepts, and how that can make code difficult to understand - 2:18

Inheritance allows us to separate out ideas in our code and create a hierarchical structure from those ideas. This is powerful, but often leads to abstract concepts that can make understanding our code more difficult than what you might be used to with procedural programming. There's no way around it, but if you feel overwhelmed by the abstract ideas that arise from structuring your code this way, it's important to know that you're not alone.

How to use an "interface" for defining inherited class structure - 4:36

With inheritance from a normal class, we don't get a lot of control over how that child class is structured. In this video we look at the benefits of using an "interface", which allows us to create a scaffolding which child classes have to match up with. Drupal 8 uses interfaces extensively, so it's good to get a feel for how they work.

How and why to use an abstract class - 3:20

The final method we can use to inherit behaviors from other classes is to use an "abstract class". These classes are like a combination between classes and interfaces, with the benefits of each. In this video we walk through how we would adjust our example to work with these.

(FREE!) What a public interface or API really is and how OOP helps make an API more explicit - 3:28

An important thing to understand about your code is that you're always creating an API, even if you didn't build it to be one. You'll use the code later, and other people might plug into a project and use that code as well. The more explicit about how you expect your code to be used, the fewer communication problems you'll have in your code later on. In this video we talk about this idea a bit.

The difference between the "public", "private" and "protected" visibility settings - 4:07

One way we can define our public interface or API is to be explicit about how and when we expect people to use the methods and properties in our classes. We looked at using the "static" keyword, which is one component of this, as well as the different forms of inheritance that we can define. The final aspect we'll look at now is using visibility settings to set whether instances and child classes can use methods and objects in the parent class.


Add to playlist

Add to , or

Add to new playlist:

Add to playlist
This is a member-only feature
But, it's easy to become a member

Add to cart:

Syndicate content

Contact us

Below are the supported keyboard shortcuts for our video player.

Start / stop video
Go to next video
Go to previous video
Increase or decrease player speed by 20%
Skip ahead or go back by 15 seconds
Jump to a percentage (2 is 20%, for example)
Toggle full screen
Videos Pricing More Search
BuildAModule Logo Icon BuildAModule Logo Icon
Become a member!
1 month
6 months
10% off
12 months
20% off
All memberships come with the following:
24 / 7 access to the entire 1800+ video library
An innovative video player with a rolling transcript
Extensive Drupal and cross-platform training
A thorough and thoughtful training style
Progress tracking
Take notes on specific video sections
Intuitive multi-user management
How many users?
Go solo with a single user, or give multiple team members access through one account and get discounts by bundling multiple users into a single membership.