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
Object-Oriented PHP Part 3
CourseMeet Drupal Developer Kate Marshalkina
Blog postIn this Drupalize.Me interview, we talk with Kate Marshalkina, senior developer at SystemSeed, based in Moscow, Russia. This interview is part of an ongoing series where we talk with a variety of people in the Drupal community about the work they do. Each interview focuses on a particular Drupal role and this interview with Kate focuses on the developer role.
Drupalize.Me Is Going to ZendCon
Blog postWe'll be attending ZendCon 2015 this week, learning about what the PHP community is up to, and sharing our Drupal knowledge.
Meet Project Manager Jeanne Cost
Blog postIn this Drupalize.Me interview, we talk with Jeanne Cost, project manager at Fuse IQ, based in Seattle, Washington. This interview is part of an ongoing series where we talk with a variety of people in the Drupal community about the work they do. Each interview focuses on a particular Drupal role and this interview with Jeanne focuses on the project manager role.
How to Log Messages in Drupal 8
Blog postDevelopers familiar with Drupal 7 will also be familiar with watchdog(), an API function that allows you to create a log message that appears on the Reports page in the Drupal administrative UI. Implementing D7’s hook_watchdog allows module developers to customize the destination of these log messages. In Drupal 8, both functions are replaced by a PSR-3-compatible logging interface (change notice).
Meet Front-End Developer Tiffany Tse
Blog postIn this Drupalize.Me interview, we talked with Tiffany Tse, front-end developer, Creative Director for Coldfront Labs, Inc., and instructor at Alongquin College. This interview is part of an ongoing series where we talk with a variety of people in the Drupal community about the work they do. Each interview focuses on a particular Drupal role and this interview with Tiffany focuses on the front-end developer and themer role.
Drupal 8, Release Candidate 1
Blog postMeet Drupal Site Builder Scott Wilkinson
Blog postIn this Drupalize.Me interview, we interview Scott Wilkinson, a builder of Drupal sites that solve problems for his freelance clientele. This interview is part of an ongoing series where we talk with a variety of people in the Drupal community about the work they do. Each interview focuses on a particular Drupal role and this interview with Scott focuses the site builder role, filled by a person who builds Drupal sites by expertly piecing together and configuring modules, themes, and settings.
What's New at Drupalize.Me - September
Blog postIt's that time again! Here's an overview of our big accomplishments in September, including the inside scoop on a Drupal 8 release and what that means for our training, the tutorials we've published this month, and tech updates for the site.
Meet Project Manager Alice Jensen
Blog postWe interview Alice Jensen about what it means to be a project manager and share advice from her experience. Copenhagen-based Project Manager (PM) Alice Jensen has been Drupaling since 2012. Her coworkers describe her with affection, using words such as "fearless", "calm", and "passionate". Read more about Alice's approach to her job as a project manager in this Drupalize.Me interview, part of our Drupal roles series.
In this series, I will show you how to integrate Node.js with Drupal using the Node.js Integration module.
At its core, the Node.js Integration module provides an API that other modules can use to add real time capabilities to Drupal. We will cover all but one of the submodules available in the Node.js Integration module, as well as the set up and configuration of the Node.js application that ships with the Node.js Integration module.
The Node.js Actions module makes use of the Drupal Core module, Trigger, and adds a new Action type that allows for real time notifications to be sent for various Trigger events. Check out this lesson to see it all in action!
In this lesson, I will show you how to:
- Enable the Node.js Actions module
- Explore the various notification types
- Enable notifications for users logging in and out of the site
The Node.js Integration module has a number of other contributed modules that depend on it. Node.js Checker is one such module. We'll take a look at how this is set up with the Node.js Integration module by adding a dependency to our Node.js server configuration, and then see it all in action!
In this lesson, I will show you how to:
- Install the Node.js Checker module
- Enable the extension in the Node.js server configuration
- Configure the Node.js Checker block
Additional resources
Once you're happy with your Node.js setup in a local development environment, there are some further steps to take before running this set up in a production environment.
While not a requirement, I would highly recommend you use an SSL certificate, and configure your Node.js application and the Drupal Node.js module to run in HTTPS. You can read more about SSL certificates at The Linux Documentation Project.
Up until this point, we have been starting our Node.js application manually, from the command line. This is not a good method for a production environment, so we'll use PM2 to manage the running of our application.
In this lesson, I will show you how to:
- Install PM2, a Node.js module to manage your Node applications
- Configure PM2
- Add SSL configuration for the Node.js server
- Start up our Node.js application with PM2
Additional resources
What Is Node.js?
FreeThis series is about integrating Node.js with Drupal 7 using the Node.js Integration contributed module on Drupal.org. The Node.js Integration project contains a number of submodules, and a separate Node.js application written in Javascript, that uses the Express, Socket.io, and Request packages.
Node.js is really fantastic for real time communications, something that Drupal is not particularly good at, out-of-the-box. The Drupal Node.js Integration module brings a host of real time capabilities and a client for your site to enable notifications when a variety of events occur, so your users can receive overlay notifications directly in their browser without page reloads!
In this series we'll cover:
- What Is Node.js?
- Install Node.js and the Node.js Drupal Module
- Configure Your Node.js Application
- Node.js Notifications Module
- Node.js Actions in Action!
- Content Update Messages with Node.js Subscribe
- Real-Time Log Viewing with Node.js Watchdog
- Node.js Checker, a Status Tool
- Get Ready for Production with Node.js
This series is a walk-through of how to get Node.js installed in your system, and how to install and configure the Node.js Drupal module, as well as a look at the related submodules. We'll install a different module that's dependent on the Node.js Drupal module. With this, you'll see how dependencies work in the context of the Node.js Drupal module's Node.js application's configuration.
Now, this series is not for the faint of heart. You'll need some Drupal administration knowledge, installing and configuring modules. We shall also be wildly typing things at the command line, so if you have some experience with command line use, that will definitely be helpful!
If you want to take your learning further, look for the self-check questions in the description for each tutorial in this series. These questions are presented to help you make sure you’re understanding the material, and to encourage you to explore how what you've just learned could apply to your own use case.
If you want to integrate Node.js and Drupal 7 so you can provide real time update notifications on your site, as well as a number of other real time communication options, this series is for you!
Additional resources
The Node.js Subscribe module lets you configure your site to allow users to subscribe to real time notifications through your site's UI for particular content types. The Node.js Subscribe module uses the Node.js Notifications module to provide the UI for the notifications, which we covered in Node.js Notifications Module.
In this lesson, I will show you how to:
- Enable Node.js Subscribe
- Set permissions to allow users to subscribe to content
- Subscribe to some content and see Node.js Subscribe in action
To use the Drupal Node.js Integration module, you need Node.js installed on your system, so in this tutorial, I will show you how to get this and the other dependencies installed on your system.
In this lesson, you will learn how to:
- Install Node.js on your system
- Test the version of Node.js installed
- Test the version of NPM installed
- Install the Node.js Drupal module
- Install the Node.js project dependencies with NPM
At the time of recording, I installed version v0.12.5 of Node.js. As the note on Node.js Previous Releases states: "Releases 1.x through 3.x were called "io.js" as they were part of the io.js fork. As of Node.js 4.0.0 the former release lines of io.js converged with Node.js 0.12.x into unified Node.js releases." - which explains the rapid version jump to the current 4.x releases.
You should make sure you have the latest version Node.js installed, particularly if there are security releases.
Note: Starting with version 7.x-1.11 of the Drupal module, the Node.js application is no longer bundled with the download. It can be downloaded seperately from GitHub or NPM.
Self-check question: Which version of Node.js do you have installed?
Additional resources
Have you ever wanted to watch the "Recent Log Messages" page of Drupal load automatically? This module can be really helpful if you'd like to do just that.
In this lesson, I will show you how to:
- Enable Node.js Watchdog module
- Generate and watch log messages in real time