ideas@sullice.com

Tagging tens of thousands of Drupal entities in under half a second

1 August, 2023

To be precise, I just added an entity reference item to 20,263 webform submissions in 449 milliseconds to verify that statistic 😀. This post is a technical but hopefully readable description of how you can add entity field items, en masse, without the need for a batch process, and how I arrived at that solution. But first, why did I need to figure that out in the first place?

Please publish a stable release

8 July, 2021

Stable releases are more than a useful tool for others, they’re a useful tool for their maintainers because stable software is easier to maintain than unstable software. Stable releases increase adoption. More users brings more eyes on your project’s features. More eyes find more bugs. Bugs are fixed by users. Therefore, stable software has more bugs fixed by others. This is not true of unstable software because users are afraid to contribute to unstable projects.

A Positive Digital Experience

28 January, 2021

This is a follow up to an earlier post titled Using Drupal for Digital Experiences; that post attempted to illustrate an abstraction for thinking about digital user experiences generally and suggested that Drupal could evolve into a tool for creating them. At the end of it, I asked readers to imagine practical applications for Drupal in that role as an experience builder. In this post, I share a story about a practical digital user experience IRL! Then, the post breaks down that experience and connects it back to how Drupal could power the same kind of experience. Finally, it highlights a contributed module that has the necessary functionality already.

Why is decoupled Drupal so hard?

21 January, 2021

Building decoupled applications is hard. This post tries to explain why. It suggests that the predominant idea that decoupled applications have two elements, content and presentation, is wrong. The post introduces a third element—mechanics. It argues that most decoupled Drupal applications try to handle too much of an application’s mechanics on the front end and this leads to unnecessary complexity and difficult-to-maintain projects. It suggests that decoupled projects would be simplified if more of an application’s mechanics were handled on the back end. Finally, it makes concrete proposals for how Drupal core could do a better job promoting this architectural pattern.

Using Drupal For Digital Experiences

4 January, 2021

Drupal’s continued relevance looks to be in doubt. The way information is disseminated over the internet isn’t the same as it was when Drupal took on its present form. Information now makes its way to an organization’s audience via many different internet-connected mediums. The traditional website is just one of many mediums an organization has to be concerned with. Moreover, organizations want better ways to interact with their audience digitally. It’s not a one-way street any longer. This post argues that Drupal already has all the abstractions for this new world, but they’re hidden underneath optimizations made for the era of websites. It suggests that by removing these optimizations, Drupal could become a pivotal, free and open source tool for organizations to create digital experiences.

Third-party Content Synchronization with Drupal Migrate

6 September, 2017, Aten Design Group

Sometimes you need to pull in content or data on an ongoing basis from a third-party product or website. Maybe you want to pull in a list of books from Amazon, or show some products from your Shopify store. You may need all the flexibility of nodes in Drupal, but you don’t want to copy content manually, and you don’t want to be forced to move away from those other systems that are already serving your needs.…Here’s a recipe for synchronizing content from outside websites or products using the Migrate module.

The Art of Doing One Thing Well

14 June, 2017, Aten Design Group

It’s ingrained into nearly every programmer’s psyche … When a function gets too big, break it out into smaller ones. When a class gets too complex, break it down. It’s the essence of the Single Responsibility Principle: do one thing well.… While this good practice is etched into our brains, the actual art of composing complexity out of small, simple components is not so well developed in many of our minds. How should we break things out? Where are the component parts that can be separated? When is a little copying better than a little dependency?

Testing for the Brave and True: Part One

9 May, 2017, Aten Design Group

This is the second part of a series of blog posts about automated testing for Drupal. Its mission is to take you from zero testing experience to confidence in testing your custom Drupal work, from the ground up. Last time, in we defined exactly what automated testing is and discussed some of the common vocabulary of testing. It also introduced the two primary tools used by the Drupal community to test their work, PHPUnit and Behat.

Testing for the Brave and True: Part Zero

31 March, 2017, Aten Design Group

“If you’re not testing, you’re doing it wrong.” I can’t remember how many times I’ve heard those words. Each time, I’d feel a little pang of guilt, a little bit of shame that every day, I wrote code for myself and clients that wasn’t tested. I’d be frustrated with the developers who repeated that mantra. Sure, it was easy to say, but hard to live up to. How do I test? What do I test? Should I test? How would I justify the costs?

Drupal's Weak Link

12 July, 2016, Aten Design Group

One of the things I love about Drupal is the entity reference field. … However, I think as Drupal developers and architects, we’re fundamentally misusing them in far too many cases. … Mere entity references severely limit our ability to create rich, rational content type architectures and force us to jump through additional hoops and write more custom code than ought to be required. I believe that Drupal having only entity references to forge relationships between content types is a major shortcoming.

Introducing an HTTP API for Drupal 8 Entity Queries

29 April, 2016, Aten Design Group

Entity Query API allows API consumers to make queries against any entity in Drupal. From users, to nodes, to configuration entities, this is an incredibly powerful tool. By creating a standardized set of parameters for crafting these queries, Entity Query API allows developers to create generalized tooling not tied to particular views or entities.

A Reluctant Guide to Vim

18 January, 2016, Aten Design Group

Face it, it’s better than nano and easier than emacs. You’re going to edit some file, somewhere, sometime on some server. You won’t be able to click to move your cursor or scroll to the bottom of a 2000 line long configuration file. As it would for any developer, holding down the arrow keys will get old, fast. This is the reluctant guide to Vim. I’m not going to try to convince you that Vim is God’s gift to man. Here’s the low-hanging fruit that got me hooked, maybe it will hook you too.

Cleaner Code with Functional Concepts

7 December, 2015, Aten Design Group

As developers, we’re all constantly searching for the cleanest way to write something. Writing that elegant one-liner or refactoring something ugly gives us a deep sense of satisfaction. Unfortunately, working with Drupal forces us to deal with deeply nested arrays that encourage ugly, cumbersome code. … There’s another way though… With some simple concepts from functional programming, we can avoid those ugly, deeply-nested loops and conditionals that we often see in the Drupal ecosystem.

Faster SQL Syncs with Command-line Magic

11 November, 2015, Aten Design Group

Sometimes, we’ve got to stop and examine why we do things the way we’ve always done them. One of the most mundane parts of working with Drupal every day is syncing Drupal databases with Drush. At this point, I think my fingers just write drush sql-sync on muscle memory. There is a faster way though…

An Introduction to Containers

5 November, 2015, Aten Design Group

Containers are an incredibly powerful tool for deploying and scaling sites. For a long time, though, I felt as though I’d missed the boat on what they are and how to use them. Every post I could find was a tutorial that explained how to start one, but not what they are. This is the post I wish I had found first. It’s not a tutorial and it’s not about lessons learned. We’re going to start with the basics and work our way up to understanding containers as a concept.