To get up and running with Pantheon, you'll need to create an account. In this tutorial we'll get signed up and create our first site. Then we'll take a tour of the user dashboard and site dashboard to see what you have to work with. We'll also make sure to point out where you manage your SSH keys for Git and get your connection information to start working on your new site.
Additional resources
Pantheon registration
How to Generate SSH keys (pantheon.io)
Pantheon SSH Keys (pantheon.io)
Now that we have a site archive file, we need to get this imported into our Pantheon account. In this tutorial we will do just that. In the process we will look at the two different interfaces for doing an import. For our single-file site archive, we can use the default interface, but if you have three separate files for the database, code base, and files, we'll look at how to get those uploaded as well. If your site is too large to import using the Pantheon dashboard UI, then you should check out the instructions for Importing a Large Site on the Pantheon website.
Additional resources
Importing an Existing Drupal Site to Pantheon (pantheon.io)
Importing a Large Site (pantheon.io)
With your site created or imported into Pantheon, it's time to begin getting some work done on it. In this presentation we'll provide an overview of how Pantheon is set up to support your development workflow, from making changes to your code base on dev to getting your site launched on live. We'll discuss the three environments that Pantheon provides—Dev, Test, and Live—and review how to get access to your code.
Additional resources
Using the Pantheon Workflow (pantheon.io)
By default Pantheon provides you with three environments: Dev, Test, and Live. A lot of work can happen in Dev though, and it would be really great to be able to manage all the different branches of work that may be happening simultaneously. Pantheon's Multidev feature will do this for you. You can always create as many branches as you need for development in Git, but Multidev takes that a step further by actually providing an entire duplicate environment for each of your branches. This way you can see exactly what the site looks like with those code changes before you actually merge everything into your main Dev environment. In this presentation we'll explain the benefits that Multidev gives you and walk through the terminology you'll encounter. The Multidev process and terminology is based on Git workflows so you'll be getting a short Git overview as well.
Here is a quick list of the terms and workflow we'll be reviewing:
- environment: Independent infrastructure for a site, including code, DB, and files.
- fork: To divide in branches, copying source code to start independent development. Pantheon also copies content (files and database) when forking. commit: Record snapshot to history.
- branch: Movable pointer to a set of commits, allowing independent development and history.
- master: Name of default branch; deployed to Pantheon Dev, Test and Live environments.
- merge: Combine contents of a branch into another, like a bug fix branch into master.
Additional resources
Pantheon Multidev Workflow (pantheon.io)
Pantheon is specifically designed to make managing multiple sites very easy. The Pantheon for Agencies service is perfect for agencies or organizations that manage many sites. Getting access to Pantheon for Agencies requires that you fill out a separate registration form, and once approved, you gain access to a whole new dashboard for managing your sites and teams. In this tutorial we'll take a tour of the features you get for managing your sites, including tags and filtering. We'll also learn how to manage the people on your teams, and how you can assign different permissions to team members based on which sites they have access to. We'll finish up by explaining what upstreams are and how that can be beneficial to your organization.
Additional resources
Pantheon for Agencies (pantheon.io)
Permissions and Change Management on Pantheon (pantheon.io)
Running a Custom Upstream on Pantheon (pantheon.io)
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
Object-Oriented PHP Part 3
CourseIn 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.