Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

php[architect]:
April 2016 Issue Released - Off the Island: Drupal
Apr 04, 2016 @ 12:13:28

php[architect] magazine has released their latest issue for April 2016 - Off the Island: Drupal:

I’m excited to see the Drupal and PHP communities building bridges to collaborate (“Getting off the island” as Larry Garfield likes to say) and also learn from each other. This month, we’ll look at how the Drupal project has embraced tools and techniques like object-oriented programming and Composer.

This month's edition includes articles about:

  • Drupal 8 Module Development
  • Composer and Drupal 8
  • Drupal Security & Vulnerability Management (this month's free article)
  • Generating documentation from source code

As usual, the regular columns have come back for another edition - Community Corner, Security Corner, Education Station and Leveling Up. You can get a copy of this issue for your very own directly from the php[architect] site or pick up a yearly subscription while you're there.

tagged: phparchitect magazine april2016 drupal island drupal8

Link: https://www.phparch.com/2016/04/april-2016-off-the-island-drupal/

SitePoint PHP Blog:
Drupal 8 Entity Validation and Typed Data Explained
Mar 30, 2016 @ 12:18:28

The SitePoint PHP blog has posted another in its series looking at Drupal 8 functionality today. In this latest post author Daniel Sipos looks at entity validation and typed data and what functionality the project provides over what was offered in previous versions (built on top of the Symfony validation component).

Data validation is a very important part of any application. Drupal 7 has a great Form API that can handle complex validation of submitted data, which can then be turned into entities. However, form level validation is problematic. [...] With the introduction of subsystems such as the REST API, Drupal 8 needed something better to handle this problem. [...] In this article, and its followup, we will explore the Drupal 8 Entity Validation API, see how it works, and how it can be extended.

He starts by looking at typed data and the consistency it provides in working with the metadata on objects. He includes a few examples of defining a string data type with a maximum length. He then applies this to content entities and enforcing the constraints provided by the types. In the next part of this series he'll look at the validation itself and how it works with these types/constraints.

tagged: drupal8 validation entity typed data tutorial introduction

Link: http://www.sitepoint.com/drupal-8-entity-validation-and-typed-data-explained/

Jeff Geerling:
Yes, Drupal 8 is slower than Drupal 7 - here's why
Mar 25, 2016 @ 12:05:44

Jeff Geerling has an interesting post to his site showing the results of some of his own testing around the performance of Drupal 8 versus Drupal 7...and that 8 comes out to be slower than 7. He also includes some of the things that the Drupal project is doing to help the situation.

When some people see reports of Drupal 8 being 'dramatically' slower than Drupal 7, they wonder why, and they also use this performance change as ammunition against some of the major architectural changes that were made during Drupal 8's development cycle.

First, I wanted to give some more concrete data behind why Drupal 8 is slower (specifically, what kinds of things does Drupal 8 do that make it take longer per request than Drupal 7 on an otherwise-identical system), and also why this might or might not make any difference in your choice to upgrade to Drupal 8 sooner rather than later.

He shares the results of some of his own benchmarking on a cluster (bramble) of Raspberry Pis for the requests per second on the standard setup for each version. He includes the output from an XHProf profiling run too, showing the large call stack on both sides, not just Drupal 8. He then talks about some of the Drupal 8 updates that are included to help mitigate some of these issues: architecture changes, easier caching, authenticated user handing and slow loading content management.

tagged: drupal8 drupal7 performance raspberrypi cluster testing results benchmark

Link: http://www.jeffgeerling.com/blog/2016/yes-drupal-8-slower-drupal-7-heres-why

SitePoint PHP Blog:
Theming Views in Drupal 8 – Custom Style Plugins
Mar 24, 2016 @ 12:40:30

The SitePoint PHP blog has another post in its series about working with Drupal 8. In this new tutorial author Daniel Sipos talks about theming views in the content management system and introducing custom style plugins.

In this article, we are going to look at how we can create a custom Style plugin for Views in Drupal 8. We will use the Bootstrap tab markup as a goal and implement a tabbed output for our View results. In the View configuration, the Style settings will allow us to specify which field will be used as the tab navigation copy, leaving the rest of the fields shown in the respective tab panes. Basically, each View result will represent a tab – so this example is not suited for Views which have more than a few results. The main goal is to illustrate how we can create our own Views Style plugins in Drupal 8.

He starts by talking about Style plugins - what they are and where they fit in the application execution flow. He then walks you through the creation of the custom style plugin to integrate the Bootstrap tabs. This also includes the creation of the theme and the matching template to build out the tab markup.

tagged: drupal8 theme view custom style plugin tutorial

Link: http://www.sitepoint.com/theming-views-in-drupal-8-custom-style-plugins/

SitePoint PHP Blog:
Your First Drupal 8 Migration
Mar 10, 2016 @ 12:20:06

In this tutorial on SitePoint.com author Daniel Sipos introduces you to the concepts behind the Migrate module in Drupal 8 and how it can be used to move content over from other sources.

Migrate is one of the most established modules in the Drupal ecosystem. So much so that with Drupal 8, a decision has been made to get some of its functionality ported and added to Drupal core. An important reason was that the traditional upgrade between major releases was replaced with a migration of Drupal 6 or 7 content and configuration to Drupal 8.

[...] In this article we are going to look at how migration works in Drupal 8 by migrating some content into node entities. For simplicity, the data we play with resides in tables in the same database as our Drupal installation.

He starts but outlining the "migration theory" and parts of the process to get the data in to your Drupal 8 instance: the source, the process and the destination. He uses a movie content example to show the setup needed to create the tables and define the configuration for the relationship to genres. He then shows how to make the migration configuration, defining the three parts and how to define the related migration classes. He ends the post with the drush command to execute the migration, get the current migration status and roll them back if something unexpected happens.

tagged: drupal8 migration data import source process destination

Link: http://www.sitepoint.com/your-first-drupal-8-migration/

SitePoint PHP Blog:
Tutorial on Using Drupal 8 Plugin Derivatives Effectively
Jan 20, 2016 @ 12:24:38

The SitePoint PHP blog has a tutorial posted for the Drupal users out there showing you how to use plugin derivatives effectively.

In this article we will explore the long answer to that and learn what derivates are and how we can use them. For the latter, we will build an example inside the demo module that can be found in this git repository and which should hopefully help us better understand what’s going on. For a slightly more complex example, the Menu system is great as it provides an individual block for each of its menus (similar to Drupal 7 but using plugins).

They're basically creating a system that allows the dynamic creation of Node Blocks for each of the article nodes but it's just an example of how (and not a recommendation on what you should do). They start in by talking about plugin derivatives - what they are and how they fit into the overall Drupal 8 code structure. The tutorial then shows the creation of the derivative class and explain each part of the code that makes it up. Following this is the other half of the functionality, is the block plugin class that will generate the instances of itself as requested.

tagged: drupal8 plugin derivatives example tutorial node block article

Link: http://www.sitepoint.com/tutorial-on-using-drupal-8-plugin-derivatives-effectively/

SitePoint PHP Blog:
Drupal 8 Queue API – Powerful Manual and Cron Queueing
Dec 14, 2015 @ 11:54:38

On the SitePoint PHP blog Daniel Sipos has written up a tutorial spotlighting a powerful feature of Drupal 8, the latest major release of this popular project: the Queue API. Queueing in Drupal allows you to offload tasks to be handled outside of the current web request.

The Queue API in Drupal allows us to handle a number of tasks at a later stage. What this means is that we can place items into a queue which will run some time in the future and process each individual item at that point and at least once. Usually, this happens on CRON runs, and Drupal 8 allows for a quick set up for cronjob based queues. It doesn’t necessarily have to be CRON, however.

They use two examples to help illustrate how to use the queueing system: one that uses the cron-based approach and another that's more manually triggered. They start out with the theory behind it all, talking about the different pieces (objects/classes) and how they fit together to make the queueing system. With that out of the way the article starts in on the code and the "Node Publish" queue, defining its basic structure and hooking it in to the framework. It shows you how to create the cron worker to process the queue and how to build the manual worker to do the same but only when specifically called.

tagged: drupal8 queue manual cron process defer processing tutorial

Link: http://www.sitepoint.com/drupal-8-queue-api-powerful-manual-and-cron-queueing/

Larry Garfield:
Drupal 8: Happy, but not satisfied
Dec 03, 2015 @ 10:53:57

In this new post to his site Drupal developer Larry Garfield talks about why he's "happy, but not satisfied" about the release of Drupal 8 and the current state of the code in this major milestone.

Two weeks ago (hey, I've been busy and trying to sleep for once), after 1716 days of work by more than 3312 people the Drupal community finally released Drupal 8, the latest release of the best community-driven web software in the world. The blogosphere is already filled with congratulatory blog posts celebrating the immense accomplishment, and deservedly so.

A number of people recently have asked me how I feel about Drupal 8's release, especially around the PHP community. Overall, my answer has to be that I'm happy, but not satisfied.

Among the things on his "happy" list are the fact that you can "teach an old codebase new tricks", that there's a real framework underneath it and that more modern development styles are being followed. On the flip side, there are some things he's not entirely satisfied with including the current state of OOP in the project, the testability of the codebase, how Composer was adopted and the lack of layout support in core. He gets into reasoning for his points on both sides but ends the post on a happier note, pointing out the people he's thankful for and the work that's been done by each to make the project what it is today.

tagged: drupal8 opinion happy satisfied release

Link: http://www.garfieldtech.com/blog/drupal8-happy-not-satisfied

Thijs Feryn:
The Drupal 8 origin story with Larry Garfield
Nov 23, 2015 @ 12:28:57

Thijs Feryn has posted the latest episode in his series of video interviews with members of the PHP community he's caught up with at conferences. In his latest show he talks with Larry Garfield, one of the more well-known members in the Drupal community about the latest milestone in Drupal, the release of Drupal 8.

Today, November 19th 2015, marks the release date of Drupal 8. To celebrate this release, I decided to publish my interview with Larry Garfield today.

Larry is a key member of the Drupal community and a core contributor to the project. Throughout the conversation, Larry tells us the origin story of Drupal 8 and how the technical challenges lead to the adoption of technology from the broader PHP community such as Composer, Twig and a set of Symfony Components.

I hope you like the interview, it gives a nice behind the scenes look at the history of Drupal 8 and how Drupal reached out to the PHP community to create a more modern code base.

You can watch the video either through the in-page video player or directly on YouTube. You can also check out his previous interviews in this archive section on his site.

tagged: thijsferyn interview larrygarfield drupal drupal8 community

Link: http://blog.feryn.eu/2015/11/19/the-drupal-8-origin-story-with-larry-garfield/

Acquia.com:
Drupal 8.0.0 released
Nov 20, 2015 @ 09:16:35

If you're already a Drupal user you know the latest and greatest news. If not, here's the scoop - the latest major version of Drupal has been released with major reworks and updates across the board: Drupal 8.0.0.

Happy Drupal 8 Day! It has been a long time coming, and we couldn't be more excited to step into this next phase of Drupal development. There's no doubt it will usher in a new era of digital experiences, and we can't wait to see how it all unfolds.

Dries discussed what the release of Drupal 8.0.0 means for the community, and you can read his full post here. We also caught him traipsing through the streets of Belgium wearing a sombrero... for your viewing pleasure!

The post includes a video of the interview with Dries. The linked post also describes the updates and "transformation' Drupal has gone through in this latest release.

tagged: drupal8 release announcement interview driesbuytaert video

Link: http://www.acquia.com/blog/drupal-8/drupal-800-released/19/11/2015/3290246