Latest stories

Preparing for the Acquia Certified Developer Exam Drupal 8

P

The Acquia Certified Developer exam Drupal 8 just launched a couple of months ago. I was interested in studying for this exam as I have been working in Drupal 8 for the last six months and future projects look most likely to be Drupal 8 based. I had looked at the various Acquia certification tracks in the past, however I was never fully committed to the Drupal 7 track so I was happy when Acquia...

Dependency Injection / Service Container Example

D

In an earlier post, I outlined the basics of dependency injection and talked a little bit about the Drupal 8 service container and how we can use this in our code. Day 16 of Drupal Activity Cards provides a task for us to implement dependency injection in one of the Drupal 8 Example modules. The examples module is a great resource for developers getting started in Drupal coding. The modules...

Best Nginx PHP-FPM MySQL (MariaDB) stack for Windows

B

I own a laptop which has a dedicated graphics card. I am a developer who prefers using Linux OS. I’ve tried 3 distros of Linux, Mint, Ubuntu, OpenSuse. No matter what version of Linux I use, the OS fails to recognize the AMD graphics card in my laptop and the WiFi connection always drops. I fixed the WiFi issue by upgrading the driver but the GPU installation always fails. Hence, I...

Logging in Drupal 8

L

Logging is very important in any production site because we don’t have the same ability to debug code that we have in our development environments. Drupal 7 had a very robust logging system called watchdog(), which has been replaced by logger in Drupal 8. This post summarizes a basic use case for logging in Drupal 8 continuing the Drupal 8 Activity Cards series on Day 13. Amber Matz breaks...

Introduction to Drupal 8 Theming

I

Drupal 8 has a new theme engine, however many of the concepts we are familiar with in Drupal 7 are still in place in this new version. Themes still have the same ability to overwrite various templates within core, only now instead of modifying .tpl.php files, you will be creating Twig files in their place. Theme functions are still available to use, however they are now kept in the .theme file...

Creating a Custom Content Entity Type

C

Drupal 8 has seen a lot of improvements for content entities and with the new Drupal console, setting up a content entity has been made a lot easier with the addition of boilerplate code generation. Day 11 of the Drupal 8 Activity Card set focuses on content entities, how they can be setup in Drupal 8, how we might add our own custom fields to the boilerplate code provided, and how this is...

Configuring your Local Drupal 8 Development Environment

C

I have struggled with properly optimizing my local environment in terms of enabling debugging and disabling cache for a while. There isn’t that many steps you need to cover in order to have a proper working development environment. After reviewing Day 10 I completed setting up my environment the correct way and have outlined this in the following sections. Step 1 Enable settings.local.php...

Attaching JS and CSS Assets in Drupal 8

A

Drupal 8 has introduced a different way of attaching JavaScript and CSS to themes and custom modules via a new concept called libraries, which are covered in Day 9. Libraries are essentially .yml files that define different groups of assets that can later be attached via module code. When I started working with the theme layer in Drupal 8, I quickly realized that certain things are very...

Drupal 8 Plugin System

D

There is a lot of new terminology in Drupal 8 and for anyone not familiar with Object Oriented programming, some of it can be downright confusing. For myself, I have worked with OOP for quite a while, however I have not spent as much time writing custom modules for Drupal 7. While I am familiar on the surface with the hook system and API at a very novice level, I have never really had to do any...

Cron Queuing in Drupal 8

C

Day 7 focuses mainly on the Drupal Queue API. The main resource for this card is an article called Drupal 8 Queue API – Powerful Manual and Cron Queueing, which I had referenced in an earlier post. Before completing any of the materials, I had no previous experience with the Queue API, nor hook_entity_insert, which was used to create a demo queue system in the referenced article. After going...

Services and Dependency Injection

S

For several years I have worked as an ASP.NET MVC developer and have become intimately familiar with terms such as services and dependency injection and services. It is refreshing to see some of these familiar concepts surfacing in Drupal 8. Day 6 focuses mainly on introducing us to services and dependency injection via several online resources. There is no exercises or tasks in this card as the...

The New Block System in Drupal 8

T

Among the many changes in Drupal 8, the blocks system received an overhaul, which has improved much of its functionality significantly. Some of the most notable take aways include the new block page layout and UI for updating, adding, and editing blocks, the addition of custom blocks and fieldable types (similar to content types), and integration with display view modes to allow for...

Drupal 8 Migration

D

I have had some exposure to the migrate module in the past, mostly with Drupal 7 and more recently for a Drupal 8 migration project that required importing of a small (under 1000) set of records stored in a CSV file. Todays D8Card focuses on the new migration module that comes partly with core and also partly in the form of contributed modules. Migrate Core & Migrate Contrib The purpose of...

Building Configuration Forms

B

In Day 3 we are starting to accelerate in terms of skills developed by the cards. This card has us create our first Drupal 8 module, learn about Drupal 8 Form API and learn about the Configuration API. The card starts off with directing you to several Drupal.org documentation pages including Creating a Custom Page,  Defining and using your own configuration in Drupal 8, Providing...

Paragraphs Module

P

I have to be honest, before completing Day 2 tasks, I had never actually used the Paragraphs module before. I heard others mention it in the past and considered looking at it at some point, however until today I did not realize what I was missing in terms of the power and flexibility that this module has to offer. The d8cards.com Paragraphs Module card begins with directing you to YouTube...

Drupal 8 Configuration Management

D

THE 21 DAY CHALLENGE I’ve been trying to learn Drupal 8 for the last couple of months as I was landed in the middle of a D8 project at work. Being involved on the project has taught me a lot about Drupal 8 module development and Symfony in general, however I have started questioning the way I am writing code and if in fact it is the best way or the ‘Drupal’ way. I decided I needed some additional...

Xdebug + Scotchbox Vagrant + PHPStorm in Three Steps

X

I come from a .NET background where I was spoiled by the ease of use and integration of Visual Studio. Recently much of my development work has moved to the open source and the world of Drupal 8 where I have gotten by until recently with Sublime Text and Atom. Since I have started writing custom modules, I needed a way to effectively debug my code and I had heard good things about the PHP...

Using PostGreSQL with Scotchbox Vagrant LAMP Stack

U

I have been using Scotchbox for a while now and continue to be impressed by it’s simplicity and ease of use compared to other Vagrant environments I have used in the past. Recently I started working on a Drupal 8 project that required the use of a PostGreSQL (PostGres) database. Thankfully, when I checked the Scotchbox 2.0 documentation, it appeared that PostGres came packaged up with the...

Namecheap Review 2018: Cheap SSL certificates and domains

N

Last week, I was thinking about registering a new domain name for my new project. My first choice was GoDaddy. I had shortlisted a few TLDs from GoDaddy, but I was not able to buy a domain name for less than 10$. GoDaddy runs a promotion wherein new customers can register a TLD for USD 0.99. I’ve been using GoDaddy for three years. Hence, I was not eligible for this offer. I...

About Author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

Follow Me