Learn Drupal

September 15th, 2014

There's two major APIs bundled with Drupal 8 that allow us to store and retrieve data. Over the last several weeks you've seen one of them - the State API - in action. This week we dive into the other side, the Configuration API. In Drupal 7, in order to schlep configuration around we had to use a module called Features which was incredibly useful, but touchy and challenging to work. In Drupal 8, passing this data around multiple instances of a site is baked right in, and it's called the Configuration API.

And there was much rejoicing!

Removing unnecessary overrides and upgrading drupal_map_asscoc() - 5:25

Now that we’ve copied over an example of a form from Drupal’s core code base, we review the various methods and pull out several pieces we’re not going to need for our own configuration form.

(FREE!) How to use the Configuration API to store default module settings, replacing variable_set() - 4:18

In this video we meet the Configuration API which is used to store our module settings. The Configuration API is similar in many ways to the State API, but it has some additional pieces we need to work with.

How to update configuration with the Configuration API and submitting a module settings form - 1:23

In the previous video we looked at how to set defaults for configuration, and here we demonstrate how to save changes when a block configuration form is submitted.

How to add a page for our module configuration form - 4:44

We now have all of the pieces we need for our module configuration form, except of course a way to see it! In this video we add a route to give our form a place to live.

How to get our default configuration value to register while doing development - 1:14

Since configuration YAML files are only pulled into the database when a module is installed, we do a little reinstall dance to make the magic happen.

September 8th, 2014

Steadily and surely we've been working on the process of upgrading module from Drupal 7 to Drupal 8. By the time we complete this process, we'll have touched on many of the new and improved APIs in 8. This week we look at replacing a couple other pieces that have been removed since Drupal 7, the $_GET['q'] and variable_del(), and begin to dive into forms in D8.

How to replace the $_GET['q'] and what to do when getting a "Drupal class not found" error - 3:40

If you get a funny feeling whenever you see $_GET in your code, then your OOP instincts are really starting to develop. In this video, we figure out how to replace that $_GET[‘q’] with something less global and more OOP-y.

How to replace variable_del() with a State API call - 1:03

Int his video we clear out the state variable we’ve been working with to start fresh.

How to upgrade hook_block_view() and format_interval() - 4:31

Now that we’re storing values for visited pages with the State API, the next logical step is actually displaying that info in our block. So, in this video we get build out our content and also fix a call to a long-gone format_interval() function.

Overview of the pieces we need for our module configuration form, and finding a good example - 3:21

The configuration form in Drupal 8 requires a bit more setup than Drupal 7. The upside is that the structure and format is similar to other forms that you’ll use in Drupal 8. In this video we talk through the pieces we’ll need for that form and dig up an example in the Drupal 8 code base.

(FREE!) How forms are structured in Drupal 8 - 2:07

In the same way that block code was consolidated into a single class in Drupal 8, forms also are encapsulated into a single form class. Here we look at a simple form example.

- Chris Shattuck

September 1st, 2014

In Drupal 7, when you wanted to save arbitrary data to the database you would use variable_set() and variable_get(). The problem with this system was that sometimes you wanted to store this same data across multiple instances of your site - like the name of your site - and other times you wanted different values for each instance. The solution in Drupal 8 is to split the two use cases into separate APIs.

This week we look at these two APIs - the State API and Configuration APIs - as we continue the process of upgrading our Drupal 7 module.

(FREE!) A comparison of the State API and the Configuration API and how they replace variable_get() - 2:37

In Drupal 8, variable_set() and variable_get() are no more. Instead, their purpose has been replaced by two separate storage APIs. In this video we go over the role of these two APIs and when you might want to use each.

How to use the State API to store arbitrary values - 2:07

In this video we cover the specific syntax of using the State API before we dive in and start using it.

How to replace variable_get() with a State API call - 0:55

Upgrading a module is often just hitting a series of errors and fixing them. In this video we tackle our first error by replacing out a variable_get() call with some new and shiny State API code.

How to replace drupal_get_title() with a call to the "title resolver" service - 2:40

Here we figure out how to get the title of the current page. It’s not as simple as it used to be, but we break down the process into understandable pieces.

How to replace variable_set() with a State API call - 1:23

We’ve already covered how to upgrade variable_get() calls, and in this video we complete the circle by using the State API to set a value.

Have a great week!

- Chris Shattuck

August 25th, 2014

Last week we got started with the process of upgrading a block from Drupal 7 to Drupal 8. This week we create our first Drupal 8 plugin, do a bit of troubleshooting with the settings and replace out our hook_init() with a subscriber.

Next week we'll start digging into the State API to get more parts of our block moved over. Have a great week and enjoy!

A brief description of what a Drupal plugin is - 1:41

Plugins can be found throughout Drupal. They are a pattern that are used for the code the generates fields, widgets and blocks, among other things. In this short video we talk briefly about what plugins actually are and how they work.

How to troubleshoot overlays not showing and how blocks are now actually block factories - 2:47

In this video we discuss how the block paradigm has shifted from creating blocks in our module to instead creating block factories. This is a lot of fun if you haven’t seen this particular feature of Drupal 8 before. Along the way we notice that settings dialog boxes don’t seem to be showing up, and we track down the source of that problem to an error in our Drupal 7 module code.

(FREE!) How to create a block plugin - 4:46

After perusing the code for a block plugin and digging a bit into the ideas behind plugins and annotations, it’s time to actually get something done! In this video we re-purpose an existing block plugin for our own and give it a whirl.

How to modify the default caching settings for a block plugin - 3:14

In the previous step we got our block plugin working, but we discover quickly that we can’t modify its contents. In this video we look at how the caching settings for our block plugin work and get them sorted out for the dynamic block we eventually want to add.

How to move our hook_init() code into a subscriber - 3:59

In a previous section we discussed how hook_init() has been replaced by several other techniques and demonstrated how to perform a redirect by adding a subscriber. In this video, we take care of generating a list of pages that have been visited using the same technique.

May your week be filled with awesomness.

- Chris Shattuck

August 18th, 2014

Over the last couple of weeks, we've been working through the beginning stages of upgrading a Drupal 7 module to Drupal 8, and this week we dive into converting a block over to the new Block API. As part of the process, we also get to explore the idea of Plugins and how Annotations work. All fun stuff, enjoy!

How to find a good source in the user interface for an example block - 1:22

Now that we’ve installed our module, the next most important feature is our history block. In this video we see that our old block code isn’t going to cut it, so we look for an example we can draw from.

(FREE!) How to find a piece of code by searching for a unique string from the interface - 2:20

Throughout the process of upgrading our module we will use this strategy for finding the code responsible for creating particular output. In this video we explain the nuances of the “unique string search” technique and put it to use finding the source code for an example block plugin.

How a block plugin class is structured - 1:43

In this video we go through the structure of a simple block plugin.

What annotations are and how they work - 2:11

In the process of exploring a block plugin’s code, you might have noticed we were missing any unique identification for the block. To understand how we get that unique ID, we first have to take a little detour to understand the role of annotations in Drupal.

Overview of the alternatives to annotations, and why we're not using them - 2:11

Annotations might feel a little weird at first, partially because there are other ways we can be storing meta data about a particular chunk of code. In this video we discuss what the obvious alternatives might be and why we’re still using annotations anyway.

- Chris Shattuck

August 11th, 2014

Last week we started looking at a Drupal 7 module from our "Drupal 7 Development Core Concepts", and this week we get down to business and start the process of upgrading it to Drupal 8. The way we'll approach the upgrade process is simple. We copy the module to a Drupal 8 site and try to install it. We run into issues pretty quick and explore a few places to look when tracking down upgrade problems and get the .info file converted over to something D8-friendly.

As we go through the full upgrade in the coming weeks, we'll explore many of the new areas of Drupal 8, including the Configuration API, changes to the Block API, the State API and lots more. It's going to be fun, and here are the 5 new videos for this week:

A tour of our Drupal 7 module's code base, part 1 - 5:03

After looking at what our modules does from the front end, in this video we start a thorough review of the entire module code base.

A tour of our Drupal 7 module's code base, part 2 - 3:26

In this video we complete our review of the full feature set of our Drupal 7 module. Onward to upgrading!

Getting our module to upgrade set up, and running into our first upgrade problem - 1:38

The basic strategy behind module upgrading is identifying the most important feature that has not been upgraded, testing it, and then fixing any problems you run into. In this video we try to install our module and run into some issues.

(FREE!) Overview of resources to use when upgrading a module to Drupal 8 - 3:47

Throughout the process of upgrading a module, you can expect to run into aspects of Drupal you don’t quite have your head wrapped around yet. As you bump into these, it’s good to have a set of resources handy. In this video we take a look at some core resources you’ll find useful.

How to upgrade a .info file to a .info.yml file and install our module - 3:37

In this video we complete the process of upgrading our info file to the new YAML format and actually get our module installed. Woot!

Have a great week!

- Chris Shattuck

August 4th, 2014

Over the last several weeks, we've covered how to use various Symfony components and how to use them inside of Drupal modules. This week we wrap it up by looking at subrequests (which are kind of fun) and break down what we've been doing into 3 different types of knowledge groups (this one's a free video and helps to provide a simple framework for understanding why we've approached things the way we have in this series).

In the final video we're releasing this week, we begin the process of upgrading a Drupal 7 module to Drupal 8. We'll be going keep into the upgrade process over the coming weeks, covering most of the important new ideas and elements that come with 8, like plugins, the State API, the Configuration API, Twig and more. Enjoy!

(FREE!) The benefits of using an interface for a service - 0:53

Most services provide an interface to express exactly how they expect the service to be used. In this short video we talk a bit more about why that’s useful.

Overview of what we've covered, and how we're going to use the HTTP Kernel component to create sub-requests - 2:31

Up to this point, we’ve covered most of the Symfony components that Drupal 8 is leveraging. The one exception is the HTTP Kernel component. This is such a foundational component that you will likely never need to touch it, but in this video we demonstrate the one reason you might want to tap into it.

How to create a subrequest with the HTTP Kernel service - 3:17

In this video we demonstrate how to create a full request and response in the context of another request. It might not be clear immediately how useful this could be, but it sure is cool.

(FREE!) The three groups of knowledge that you need to work with Drupal 8 effectively - 2:47

Here we breakdown the type of skills and knowledge you need to work with Drupal 8. If you’re feeling overwhelmed at all, this video can help you split up the learning tasks in a way that can feel more manageable.

A tour of our Drupal 7 module's front-end feature set - 2:55

In this next set of videos, we’re going to be upgrading a module from Drupal 7 to 8. But before we do that, we’re going to spend a few moments reviewing what exactly our module does, so we know when we’ve successfully upgraded all of its features. In this video, we look at all of the front-end features, including a block, the block configuration and module configuration form.

Have a great week!

- Chris Shattuck

July 28th, 2014

This week we dive deeper into working with events in Drupal 8. Last week we discussed what the role of events are and how they replace many parts of the hook system, but with the benefits of OOP. In this next set of videos we create a quick-and-dirty event using a generic class from Symfony and subscribe to it, then we create a more customized class that mirrors a structure that's a bit more like what you'll see in the real world.

Finally, we wrap it up by looking at overriding services. One of the bonuses of using services over our own class instances is that we can completely replace services with our own code, and we're ready to show you exactly how to do that.

How to create a custom event quickly with the GenericEvent class - 5:29

Typically creating new Symfony-based event requires the creation of a custom event class. In this video, however, we show you how you can create a quick and dirty event with the Symfony GenericEvent class. It’s handy!

How to subscribe to a custom event - 2:35

In this video we hook into the event we just created to demonstrate how any module can now create a subscriber to hook into it.

How to create a specialized custom event class - 5:04

While the GenericEvent class is handy for spinning up quick events, it’s also a bit … well … generic. In this video we use a custom event class to tighten up the signatures of our subscribers.

A final word on what we’ve learned about events - 0:46

In this video we do a quick celebration of the skills we’ve built around using events in Drupal 8.

(FREE!) How to override an existing service - 6:05

By this point you’re probably feeling pretty comfortable with services. We know how to use them and how to create them, but the one thing we haven’t tackled is overriding an existing service. Since this is one of the big arguments for using services in the first place, it makes sense to dive into replacing an existing service with our own.

Have a great week!

- Chris Shattuck

July 21st, 2014

If you've done any coding at all in Drupal 7 or 6, you've used hooks to tap into the execution of code to change something - to alter a form, to add a JavaScript file, to add a new menu item. In Drupal 8 we still have many of the same hooks that we had in Drupal 7, but some use cases have been converted over to Symfony-based subscribers. Subscribers are similar to hooks, but they take an object-oriented approach which makes them testable and extendable. In the future, subscribers might replace hooks entirely. This week we dive deep into subscribers to give you a feel for when they might come in handy.

(FREE!) The differences and similarities between subscribers and hooks - 1:19

Subscribers in Symfony look an awful lot like hooks in Drupal, so what’s the difference? In this video we explain briefly how they work in tandem and what the future might be for hooks.

How to find an example subscriber class, and an overview of its structure - 3:39

Now that you’ve got a solid grasp of services, we can add another layer and register our own subscribers to Drupal or Symfony events. In this video we demonstrate how to dig up some examples and what the essential components of a subscriber class are.

How to find out what events we can subscribe to - 4:03

Knowing that we can subscribe to events is pretty awesome, but how to we figure out what events are out there? In this video we do a quick reconnoiter to figure out exactly that.

How to create a subscriber class - 3:37

After looking at how a subscriber class is structured, in this video we build our own.

How to register a subscriber as a service - 4:13

Just like any other service class, a subscriber class has to be registered as a service in order for it to run. In this video we look at how to register a subscriber and what makes it different than a normal service.

How to figure out what objects and methods we have to work with in a subscriber - 1:36

When an event triggers a method in our class, it usually passes an object that we can work with. Here we look at exactly how we figure out what’s in that object and what we can do with it. Fun!

(FREE!) How to get the route name for the current page and how “inheritdoc” works - 3:37

In Drupal 7, we had to use the dark arts to conjure up a match between the current path and the path we might be looking to match. In Drupal 8, with the introduction of routes, we can use a handy bit of code to grab the route and match against that, which is what we do in this video.

How to fix a "Class not found" error in Drupal 8 - 4:02

At some point during the transition over to object oriented programming, you’re going to hit upon a ‘class not found’ error. In this video we walk you through how to track down the source of the problem and get it fixed. Pow!

How to perform a redirect and how hook_init() has been replaced - 6:24

In Drupal 7, we could tap into the hook_init() function and perform a drupal_goto() if we wanted to redirect after executing a bit of logic. In Drupal 8, both hook_init() and drupal_goto() are no more. In this video we outline the techniques you’ll use to replace both.

Why you might choose to create events instead of hooks - 2:33

Hooks and events look an awful lot alike in Drupal 8, but there are some distinct benefits to using events instead.

Have a great week!

- Chris Shattuck

July 14th, 2014

How to figure out what code to use to call a service - 3:46

By now you should feel like there’s no longer a huge mystery behind the dependency injection container in Drupal, but we still haven’t explored how exactly to use it. In this video we use a little detective work to figure out exactly how that’s done.

Setting up our example module scaffolding - 3:16

In this video we set up some basic scaffolding for the module we’ll use to demonstrate how Symfony components in Drupal 8.

Why hook_menu() was removed and why Drupal switched to PSR-4 autoloading - 2:50

Here we look at the two big changes that have been pushed to Drupal 8 since we first started recording “Drupal 8 Developer Prep”, and why those changes make sense.

(FREE!) How Drupal uses PSR-4 autoloading under the hood - 2:07

Just knowing that something works isn’t enough for the most curious, so in this video we build on our understanding of PSR-0 to understand how Drupal made the shift over to PSR-4.

Adding a page to our example module by using a route and controller - 5:47

In the very beginning of this series, we created a simple module whose job was to add a single page. In this video, we do the same thing so we have a page where we can safely add any output we need from our examples.

(FREE!) How to use services in a custom module - 3:15

We’ve seen how services are registered in Drupal, and we’ve seen how other modules use services, but how do we use them ourselves? Good question! That’s exactly what we’ll cover in this video.

How to find out which class is responsible for a service - 3:54

While there’s lot of really important benefits to using the dependency injection container, it comes at the cost of making it difficult to track down what code is responsible for which services. In this video we walk through two valuable approaches to tracking that code down.

How to create a service with a custom module - 4:15

At this point you’ve seen how to use existing services, but how do we create one of our own? Again, services allow other modules to override our entire service code and allows for the creation of a single, shared instance of the class, so there’s a lot to be gained. Luckily, it’s pretty easy and we’ll start by creating a class to contain our service.

How to call our custom service - 1:55

To test out our service, we give it a call in our controller just like we would call any other service.

(FREE!) An overview of why we should use services instead of simple functions or classes - 5:05

If you’re felling at all resentful or apprehensive about the added layers of complexity of the whole service system - as opposed to just creating simple functions, for example - this video does a quick review of the benefits of going the service route to help you get pumped about the long term benefits.

Have a great week!

- Chris Shattuck

July 8th, 2014

This week we wrap up our coverage of YAML in detail, which prepares us fully to dive right into the Drupal 8 codebase and wrap our heads around the Dependency Injection Container. All of our prepwork in walking through each of the major Symfony components on their own is about to pay off now as we see how those components are used in Drupal 8. Enjoy!

Overview of YAML syntax, part 1 - Simple arrays and variable types - 6:20

In this video, we look at how to use YAML to store simple arrays and how YAML translates certain types of values into variable types. As you’ll see, YAML does a great job of guessing what we’re trying to accomplish.

Overview of YAML syntax, part 2 - Associative and nested arrays - 5:08

A YAML file is really just an array of arrays. In this video, we look at the different ways to structure associative arrays and what nested, nested arrays look like. You’ll be running into nested arrays all over in Drupal 8’s YAML files, so here we try to make them more approachable.

(FREE!) What "Separation of Concerns" means and how it applies to YAML and code - 5:42

If you’ve ever tried washing the dishes with a friend, you start by asking "who’s going to wash, and who’s going to dry?” If you both try doing both jobs at the same time, things can get kind of messy. You probably see the value of separating work into specialized areas all the time. When it comes to code, though, it can be hard to figure out where to draw the line. In this video, we try to explain why it can be valuable to spend the energy to figure out where that line is, and why drawing the line between code and configuration can make a lot of sense.

How to convert our dependency injector container into a services YAML file - 6:33

Now that’s you’ve gotten your feet wet (hopefully not due to a dish washing accident) with YAML, we look at one of the more complicated YAML structures you’re likely to see in Drupal 8 - the services YAML file, which feeds services into the dependency injection container.

How to load services into a dependency injector container with a YAML file - 3:43

After setting up our services YAML file, the next step is to get it wired into the dependency injection container. As part of this process, we also look at what to do when using two classes that have the same name.

How to make sure you're loading the right files in your project - 0:45

In this super short video, we explain a quick and dirty way to make sure that what you’re seeing in the browser is pulling from the right code files.

(FREE!) How the dependency injection container acts like a backbone to Drupal 8 - 1:15

Nearly every piece of code you touch in Drupal is in some way related to the dependency injection container. In this video, we explain the implications of that deep integration.

Taking at look at our our first Drupal 8 services.yml file - 2:35

Woo hoo! If you’ve been following along with these videos, you’ve gone on a long journey through Symfony with periodic promises that we will return to Drupal 8, and in this video we do exactly that. And we're going to start by looking at how Drupal 8 modules register services through the dependency injection container.

How to find the dependency injection container in Drupal 8, and an overview of how it is structured - 5:09

Now that we know how Drupal registers new services, we start to take a careful look at how exactly the dependency injection container works. In this video, we explore how to find the container and review its code structure.

How the dependency injection container accesses its services - 5:25

Knowing where to find the container is the first part of the puzzle, and in this video we build on that by looking under the hood at how exactly the container pulls up its services.

Have a great week!

- Chris Shattuck

July 1st, 2014

For a long time, BuildAModule has supported supported 1 and 2 day trainings, but now some multi-month trainings have come out that allow a student to get a genuinely deep dive into Drupal before they jump into a job search. The idea behind these trainings is that it takes a while to start to feel comfortable with Drupal, and a live, ongoing environment that includes skilled mentorship can accelerate what students would normally do on their own and get them better prepared for the workforce. I think it's an awesome idea.

Here's a quick overview of two programs that are using an extended approach to help students speed up the learning process.

TechBootCamps

TechBootCamps is a really interesting and compelling concept. Students spend 8 weeks working full time (that's 8-hours days) on learning Drupal locally in Boston, MA, based on the BuildAModule curriculum. After 8 weeks, the students are connected up with agencies who are hiring, and if the student lands a job, the referral fee paid by the employer goes to cover at least part of the cost of tuition for the class.

The first batch of BootCamp-ers is currently a couple weeks into their training and it appears to be going really well. The program uses the Flipped Classroom model - similar to what we've been doing with Mentored Trainings - to allow students to work on practical skills instead of getting pummeled by lectures all day. To participate, students have to be on-location for the 8-week training, but they have set up discounted long-term lodging for students coming in from out of town. It really is a boot camp. :)

I'm proud of Joe DiDonato for putting together this program. It's incredibly innovative and I know it has the potential to do amazing things for the Drupal talent base. And I think keeping the training in a consistent physical location will have some surprising effects on the progress of the students.

The cost of the training starts at $4400, and again part or all of that will be reimbursed if the student lands a job and the employer pays a referral fee. The next camp starts in August (see the calendar here).

Learn more about TechBootCamps.

Drupal Career Online

Drupal Career Online is a real-time online version of the Drupal Career Starter program, which DrupalEasy has put on for the last several years. The program is a 12-week course that includes two 3.5 hour real-time online sessions every week and helps to connect students with internship programs when the course is complete. The curriculum is mature and bundles BuildAModule access as a complement to the existing course materials.

For potential students who can't necessarily make it to a specific physical location for a long-term training, but who can dedicate a significant amount of time to the learning process with the goal of landing a solid job, the Drupal Career Online program seems like a great fit. Many students from the live version of the course have gone on to find work with Drupal agencies.

The first class begins August 19th and you can apply here. The cost for the course is $3400.

Learn more about Drupal Career Online.

Thank you for your patience, 10 new videos now and lots more coming next week!

It's been a couple of weeks since we've released new videos, and I just wanted to say thanks for your patience. This week we're releasing 10 of the new batch, and next week we plan on releasing even more! I'm particularly excited about this second half of "Drupal 8 Developer Prep" since we get knee deep into working with Drupal 8 on a piratical level and look and build some real modules to demonstrate all kinds of fun concepts. Just so you know what awesomeness is coming down the pikes, here are some things you have to look forward to:

  • How to use Symfony components in Drupal 8, including the event dispatcher, routing and more!
  • How to use plugins (and what the heck plugins actually are)
  • How to work with forms in Drupal 8
  • How to use block plugins
  • How to use Twig for theming from inside a D8 module
  • How to upgrade a module from Drupal 7 to Drupal 8 and troubleshoot common issues along the way

I hope you enjoy this new infusion, and look forward to more in the coming weeks.

(FREE!) Overview of how we will prepare for the next Drupal 8 videos - 1:55

In this video we do a quick overview of how we’re about to set up for the next batch of Drupal 8 videos. Since the recording of the first videos in “Drupal 8 Developer Prep”, there have been new releases that bring in some fun changes like a better autoloader, a newer version of Symfony and more.

(FREE!) How to install Drupal 8 Alpha 12 with Dev Desktop 2 Beta - 4:19

Here we get a more up-to-date Drupal 8 environment set up and explain why we’re now using the latest version of Acquia Dev Desktop to launch our projects.

How to create a Drupal-based project in PHPStorm - 1:20

In all the the videos on BuildAModule up to this point, we’ve been using an IDE called Komodo. Here, we switch over to using PHPStorm and explain the process of importing a Drupal project.

The benefits of using PHPStorm for an IDE for Drupal work - 2:36

Many of our viewers adopted Komodo as an IDE because of the examples on BuildAModule, so in the next couple of videos we explore why shifted over to PHPStorm. As an IDE, it’s been gaining popularity in the Drupal community over the last several years and it’s worth exploring some of the reasons why.

The benefits of using PHPStorm for general development - 4:47

In the last video we discussed some of the big benefits of using PHPStorm with Drupal-based projects, and in this video we discuss some of the other features that developers might find useful in general, regardless of the kind of PHP project you’re working with.

How to get our example folder set up - 3:19

If you’re just jumping into this series, we walk you through the process of getting an example folder set up with all of the files that we’ve been building up through the previous videos. If you’ve been following along, there’s just a couple bits in here you’ll need to make sure you’ve got everything set up for the next videos.

Why we are going to do a deep dive into YAML - 0:59

On its surface, YAML is kind of just (Y)et (A)nother (M)arkup (L)anguage, giving us the ability to structure a hierarchy of information with a relatively simple syntax. But, the implications of using YAML goes deep, and in Drupal 8 you will be using YAML for everything from routes to services to configuration and menu links. Getting comfortable with YAML will serve you well during your Drupal 8 career, and in this video we explain why.

How to create a YAML file for routes - 6:21

To see YAML in action, we first look at how to create a routing YAML file in Symfony to replace the code-based routes we used in our previous examples.

(FREE!) How to parse a routing YAML file - 5:27

Now that we have a routing file, it’s time to figure out how to actually use it. In this video, we walk through the process of wiring up a YAML file to our route loader and get rid of a bunch of redundant code. Yea!

How to parse generic YAML files and setting up our YAML syntax examples - 3:56

In the next videos, we take a look at nearly all of the syntax you’re likely to encounter in YAML files. But first, we set up our example YAML file and take over an existing controller to see how Symfony converts YAML into a PHP array.

Have a great week!

- Chris Shattuck

June 23rd, 2014

I'm still working hard with editing the next batch of "Drupal 8 Developer Prep" videos. I'm excited to release them, but in the meantime, here's a few things you might look forward to.

Upcoming Mentored Trainings

DrupalCorn Camp 2014 - On July 17th, DrupalCorn will be holding a Mentored Training for the 3rd year in a row. If you're thinking about a camp in August, Iowa is full of incredibly nice people and a great Drupal community. Kicking it off with some mentorship can be a great way to get started.

DrupalCamp Twin Cities 2014 - On August 7th, DrupalCamp Twin Cities will be hosting a full day Mentored Training, also for the 3rd year in a row. If you're around the Minneapolis / St. Paul area, it would be great to see you there!

Your Hometown - Mentored Trainings are a powerful learning experience and anyone can organize them. Just get a spot with wifi, ask a couple folks from the local Drupal community to come mentor, put the word out and go! As always, we offer 8 days of BuildAModule free for all students and mentors.

Kickstarters

Free Drupal High School Curriculum - Shane Thomas of CodeKarate posted a kickstarter to get the community behind building a free high school curriculum around Drupal. Shane is also a partner in STEM Fuse, a company with that sells courses to high schools across the US. They know how to wrap a curriculum to meet educational standards, and they have a solid reputation in thousands of high schools. If anyone has a chance at getting Drupal into high schools, these guys have the right resources to make it happen. BuildAModule has substantially backed this project because we believe it's a great investment, and there's only a week or so to complete the funding and make it happen. Good luck!

Kalabox 2.0 - The good and witty folks over at Kalamuna have a kickstarter going to bring the next generation of feature-complete instant development boxes into reality. If you've used tools like MAMP, or Dev Desktop, Kalabox is an alternative that aims to be neutral to cloud hosting vendors (like Acquia and Pantheon), and that supports all the tools you need as a novice and as a professional developer. We've backed the project because we think it could end up being a great tool to get started, follow best practices and publish their sites with as little hassle as possible.

Keynote!

I'll be doing a keynote at DrupalCamp Twin Cities this year, talking about what whether Drupal is on its way up, or on it's way out. It will be a blast, so if you'll be in the area, come by. The Camp is August 7-10.

Have a great week!

- Chris Shattuck

June 17th, 2014

I hope you've been enjoying the videos in the new "Drupal 8 Developer Prep" collection. If you have been following along, you may have some new skills working with object-oriented code and probably have a growing appreciation for Symfony and the various components it gives you to work with. The one thing we really haven't tackled yet - and which many of you are probably the most excited about - is how all these things relate to Drupal 8. I'm excited to share this stuff, too, because it is pretty awesome how it all comes together.

In the second half of "Drupal 8 Developer Prep", which we will start releasing in a couple weeks, we build a module in Drupal 8 from scratch to explore how to leverage the new Symfony components like routing, the dependency injection container and event dispatcher. Then we'll work through the process of upgrading a Drupal 7 module to Drupal 8, touching on numerous new APIs like the State API, the Configuration API, the plugin system and more. It's a lot of fun seeing the how the updates in Drupal 8 makes your code make more sense.

If you haven't yet taken a look at the first half of "Drupal 8 Developer Prep", now's the time to get started so you can be ready for this next set once it starts coming out. And if you're not yet a member, definitely check out the free videos.

Have a great week!

- Chris Shattuck

June 9th, 2014

In Drupal 8, everything comes back to the Dependency Injection Container (or DIC). Throughout the "Drupal 8 Developer Prep" series, we've been building up to the point where we can understand exactly what the DIC is for, and how it works under the hood. This week we wrap up our DIC coverage and briefly take a look at the incredible amount of ground we've covered so far in this series. If you've made it this far, give yourself a big hug. Nice work. :)

Why you should never use a dependency injection container within a class even though it's tempting - 0:54

Now that you have a dependency injection container at your disposal, it seems like a convenient tool to use anytime you need an object. But, to keep our code testable, we still have to use dependency injection to get objects into other objects. In this video we explain why.

Updating our framework code to leverage the dependency injection container - 1:04

We have our dependency injection container up and running, so in this video we update our framework code to use it. Instantly making it testable and more flexible.

How to use dependency injection container properties to store settings - 2:46

Not only can we use our dependency injection container to hold instances of objects, we can also store variables or properties in it, too. In this video we show a couple of practical use cases.

(FREE!) An overview of what we learned in these Symfony videos - 5:56

In the last 70 videos or so, you’ve learned a lot about Symfony and also about object-oriented coding in general. In this video we give a recap of the main things we covered, and encourage you to work through the videos a couple of times to really build your chops.

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

Loading...
Contact us

Below are the supported keyboard shortcuts for our video player.

space
Start / stop video
shift
Go to next video
shift
Go to previous video
Increase or decrease player speed by 20%
Skip ahead or go back by 15 seconds
1...9
Jump to a percentage (2 is 20%, for example)
f
Toggle full screen
Videos Pricing More Search
BuildAModule Logo Icon BuildAModule Logo Icon
Become a member!
$29
1 month
$156
6 months
10% off
$276
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?
user
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.