The Pantheon Stack
FreePantheon's hosting stack, which underlies the whole system is optimized for running fast, stable, and scalable Drupal sites. In this tutorial we'll peek behind the curtain to see how Pantheon does what it does. We'll be introduced to the application container technology they use and review what software is running on your Pantheon environments, and get an overview of how caching works there.
Additional resources
All About Application Containers (pantheon.io)
In this tutorial we'll provide an overview of how to make your Pantheon sites take the best advantage of the robust infrastructure Pantheon provides. We'll discuss the balance of high performance and availability, along with a comparison of different server architectures and why Pantheon has chosen to use application containers. In that comparison we'll point out the pros and cons, and then we'll go through a checklist of the tools and techniques for optimizing your site for this architecture.
Additional resources
Optimizing Your Pantheon Site (pantheon.io)
Prepare for Launch
FreeWith everything on your site ready to go, the final step to a successful project is to launch it! In this presentation we'll outline the steps you'll need to take to get your site out in public, using your domain name. The Live environment has a public URL and technically your site is "out there" but it is using a subdomain of Pantheon. To set up your own domain and really launch the site, you'll need to make sure you're ready to launch and sign up for the right plan. In addition to reviewing the different plans, with guidance on how to pick the right one, we'll walk through a Drupal launch checklist to avoid common mistakes.
Additional resources
Going Live on Pantheon (pantheon.io)
In this tutorial we'll review the Pantheon plan choices, and explain how to pick the right one for your project. Each site gets its own plan, so you need to choose this based on each site's individual needs. You can also quickly and easily choose a plan, and send that information to your client to have them pay for getting things set up. This makes it super easy to hand over the project to the person or organization who needs to be the owner. We'll go ahead and actually choose a plan and get ready to launch our site.
Additional resources
Going Live on Pantheon (pantheon.io)
Your finally ready to share your site with the world! In this tutorial we'll walk through the process of launching our Pantheon site. We'll review all of the settings to add our domain name to the Live environment and explain how it all works.
Additional resources
Going Live on Pantheon (pantheon.io)
Core in Drupal 8 comes with a built-in solution for providing creating a REST API without writing a single line of code.
NOTE: We now have a full series on Web Services in Drupal that goes into much more detail about building your API for a decoupled site.
In this lesson we will talk about the core modules that help create a REST API, including:
- REST module
- Serializer
- HAL
- Basic Authentication
- and the RESTUI contributed module
Self-check question: Can you find examples in Drupal core of plugins that expose data to the REST server?
Notes:
- The video covers creating a node (via POST) twice, using two different versions of the Postman Chrome extension.
- The REST_UI module has been updated since the creation of this video. Rather than providing unique permissions for users it now leverages entity permissions to determine if a user has access to a particular operation or not.
Additional resources
In this tutorial, I'll introduce the API Blueprint specification and take a look at a few tools we can use to provide documentation and testing for our API.
The tools we'll look at include:
By the end of the tutorial you'll have a better understanding of the API Blueprint specification and be able to use Dredd and Aglio to ensure your API documentation and testing stay up-to-date.
Self-check question: Could you write a script that could be run after every commit that would keep your documentation up-to-date, and provide API test results?
Additional resources
In this series, we’ll continue to build the spaceship app that we’ve started in Introduction to Object-Oriented PHP and Object-Oriented PHP Part 2. In this tutorial, I’ll show you how to use the extends
keyword in PHP so that you can use it to inherit properties and methods from another class
.
Additional resources
In this tutorial, I will show you how to override a method that you’ve inherited from another class. By having two classes we are starting to shape the different behaviors and properties of each, while still keeping most things in common and not duplicated.
In this tutorial, I will show you the difference between public, private, and protected methods or properties in PHP classes. By the end of this lesson you will learn how to make things private at first, protected once you need to access them in a subclass, and public when you need to use it outside of its class and subclass.
Additional resources
In this tutorial, I will show you how to get around the problem of calling a function that you have overridden in your class: how to call the parent class method.
Additional resources
In this tutorial, I will show you how we can build a better blueprint and hierarchical structure for our app’s classes through the use of abstract classes.
Additional resources
In this tutorial, I will show you the power of abstract classes and how you can enforce subclasses to define certain functions. In this way, you can share logic but for things that are really specific to subclasses, you can force them to define certain functions, but with the specific logic required.
Additional resources
In this tutorial, I will show you how to extend an abstract class and ensure that all the methods that are required by the abstract class are included in this new class.
Additional resources
In this tutorial, I will show you how to handle new requirements for data storage by creating two smaller abstract classes out of our original data storage class. By creating these new abstract classes, we can build more flexibility into our code.
Additional resources
Now that we have created new abstract classes, we need to load and utilize them in our code. In this tutorial, I will show you how we can refactor our code to make use of our new abstract data loading classes.
We have an abstract class with methods that we require, but there’s no logic in these abstract methods. This is a perfect opportunity to use interfaces. In this tutorial, I will show you how to create and implement Interfaces. I will also explain how interfaces are useful when you will be sharing your code. But even if you’re not creating interfaces to share, chances are, if you’re using open source code — and definitely in Drupal — you will need to know how to implement interfaces.
Additional resources
This brief video demonstrates how to use the embedded video feature within a tutorial on our site.
Additional resources
This tutorial is for PHP developers—including Drupal 7 developers—who want to get a local development environment up and running for Drupal 8 development work. In this tutorial, we will install Drupal 8, fire up the built-in PHP web server, set some variables in php.ini, initialize a Git repository, and discuss how Composer will impact what you commit to Git now and in the future. Finally, we'll walk through how to configure PhpStorm for Symfony development that plays nicely with Drupal 8 projects as well.
Additional resources
Development Environments
Local Development Guide (drupal.org)
PhpStorm
The Wonderful World of Composer — Drupalize.Me
PHP's Built-in web server (manual) — php.net
In this tutorial, we'll create a new module and create a route and controller for it. Remember hook_menu
? Well, hook_menu
is out and routes and controllers are in! If the YAML files in this lesson piqued your interest, check out our introduction to YAML tutorial to learn more.
Note: See Create an Info File for a Module for up-to-date instructions on info file requirements, which have changed since this video was recorded.
Additional resources
Create an Info File for a Module
An Introduction to YAML — Drupalize.Me
PHP Namespaces in 120 seconds
Clear Drupal's Cache