Luca Lusso: Perseverant in the Face of Failures and Bold in Experiments

"I don't remember why we tried Drupal, but the key factors were its features and the possibility to extend it in code."
Luca Lusso presenting at DrupalCon Lille

Luca Lusso, during his presentation at DrupalCon Lille 2023

Luca Lusso, a seasoned Drupal Developer and the author of Modernizing Drupal 10 Theme Development, in a recent email correspondence conducted by Alka Elizabeth, sub-editor with The DropTimes [TDT], narrated his evolution as a Drupal Developer. What once was an inconsequential decision framing being a cause for the significant contributions of one's life is a surprising turn of events.

Delving into his roots, Lusso revisited his foray into the Drupal world in 2007 when he realized his interest in developing tools for other Drupal developers. It was followed by his attempts to contribute to the Drupal Community with notable successes that include WebProfiler and Monolog modules.

"Maybe it was too ahead of time or complicated to use, but it was a failure."

said Luca about his initial setbacks as he indulged with Drupal. But without losing heart, he continued to contribute significantly to the community.

"For a period, WebProfiler has been included in the Devel project, and it was an honor for me to contribute to such an important module."

Luca also delves into his latest book, "Modernizing Drupal 10 Theme Development," which introduces an updated guide aligned with the latest features in Drupal 10.1, focusing on decoupled front-end development with tools like starter kits, SDC, and Next.js along with his experiments with design systems some even controversial choices.

Join us as we embark on this stimulating conversation with Luca Lusso.

TDT [1]: Mr. Lusso, can you tell us about your journey as a Drupal developer and how you got started with Drupal 5 and PHP 5 in the early days of the platform?

At that time, it was 2007; I'd just finished university, and to raise some money, I started building websites with a friend. The first one was for a Masters course at a design school. Previously, I've done a lot of work as a Java developer, but Java CMSs in those years were too complex to use and too enterprise for such a project. I don't remember why we tried Drupal, but the key factors were its features and the possibility of extending it in code. After building some websites, I realized that another topic I'm interested in was developing tools for other Drupal developers.

TDT[2]: As an open-source enthusiast and Drupal contributor, can you share some of your favorite contributions or projects you've worked on within the Drupal community?

My first attempt to contribute was a system that was supposed to help manage multiple installations of Drupal. It comprised a Java desktop application based on the Eclipse IDE and a Drupal module called Regilo. The initial set of features was like installing a module, running updates, and even creating and managing content, all without logging into the web interface of Drupal. Maybe it was too ahead of time or complicated to use, but it was a failure.

After that, I created some other minor (and now abandoned) modules, but the first real helpful contribution I made was to help port the XHProf module to Drupal 8. A few months earlier, I had started developing the module on which I invested most of my free time, WebProfiler.

TDT[3]: You maintain popular Drupal modules like WebProfiler and Monolog. Could you tell us more about the significance of these modules within the Drupal ecosystem?

Symfony has always attracted me as a framework, and when Drupal 8 was released, I tried to do things on Drupal like they're done on Symfony. I noticed that some valuable tools usually available on every Symfony project were not available on Drupal, such as the web debug toolbar and the integration with Monolog. So, in January 2014, I started the WebProfiler project.

WebProfiler prints a toolbar at the bottom of every HTML page with many useful metrics collected during the building and rendering of the page itself. You can use it to discover which route has matched and which controller has been executed, which SQL queries have run, how many blocks, views, and forms are on a page, and many more. For a period, WebProfiler has been included in the Devel project, and it was an honor for me to contribute to such an important module.

On the other hand, the Monolog project can collect and send messages logged by Drupal to different destinations and with customizable formats. It's a wrapper to the famous Monolog library, developed by Jordi Boggiano.

Lately, I've started to port the Messenger component of Symfony to Drupal, and you can read more about it here. The module is in an early alpha state, but we're using it in a couple of internal projects, and it has gained a lot of attention from the community.

Luca Lusso
Luca Lusso during his presentation at DrupalCon Lille 2023| Source: Luca Lusso

TDT[4]: You've recently shifted your focus towards front-end performance. What inspired this shift, and what specific aspects of front-end performance are you currently passionate about?

In the first versions, WebProfiler can only profile the backend of a Drupal website. Then, I discovered the Performance APIs and started integrating them into the module. Using those APIs, WebProfiler can compute metrics like Time to First Byte (TTFB), Data download, and DOM building time.

Using those data, developers could discover performance regressions on the front end of their websites.

Then, at the DrupalCon Prague in 2022, I had a call with an engineer from Google who showed me the Core Web Vitals project and his interest in integrating those metrics with Drupal.

I fell in love with the opportunity to give Drupal developers a new data set. Now, WebProfiler can compute "on the lab" metrics about Cumulative Layout Shift (CLS), First Input Delay (FID), and Largest Contentful Paint (LCP).

TDT[5]: Let's talk about your latest book, "Modernizing Drupal 10 Theme Development". What prompted you to write this book, and what do you believe sets it apart from other resources on Drupal theming?

Modernizing Drupal 10 Theme Development | Book by Luca Lusso

I've always been interested in writing a book, but I've never found the time to do that. So, I couldn't resist when Packt Publishing contacted me and accepted immediately. The writing phase has taken a massive amount of time (I'm not a native English speaker), but in the end, I'm very proud to have written it.

Talking about other books about Drupal theming, there are some precious resources, but they're for Drupal 8 only. The theming landscape of Drupal is moving fast, so written material could become quickly obsolete. "Modernizing Drupal 10 Theme Development" is updated to the latest features added to Drupal 10.1, like starter kits, SDC, and Next.js to build decoupled front-ends.

TDT[6]: Can you provide an overview of what readers can expect to learn from your book, from the basics to more advanced topics in Drupal 10 theming?

One key point is that the book follows a typical workflow of a Drupal agency, where a team works on the design, and another team works on the building phase. The guide starts here to help readers convert a blank template to the expected layout.

The initial chapters discuss setting up a local development environment using DDEV and Docker. Then, the reader learns how to map an existing design system built with Storybook to Drupal by defining which data structure should be used to back a specific component. The middle part explains how to style most of the typical elements of a Drupal page, like the header and the footer, the main content, the taxonomies and the menu, and particular pages like the search results and the maintenance page. The last chapters of the book talk about accessibility, performance, and decoupled architectures.

TDT[7]: In your book, you mention working with design systems, webpack, Tailwind CSS, and Browsersync. How do these technologies play a role in modern Drupal theming, and why are they important for developers to understand?

The front-end landscape is moving fast. I chose to use those technologies because they're stable and with a lot of documentation. One controversial tool may be Tailwind, as it causes a lot of discussion between front-end developers. The book provides an excellent example of how to integrate Tailwind in a Drupal project, but in the end, I've chosen it because it has sped up the development of the demo website.

TDT[8]: Could you share an example of critical insights from your book that you believe will significantly benefit Drupal developers looking to enhance their theming skills?

There is a chapter in the initial part of the book that talks about how Drupal builds an HTML page. It is technical and may seem unnecessary for developers who only want to style a website. But, in the end, a better understanding of the Drupal render pipeline helps build fast and maintainable themes.

TDT[9]: What advice would you give to developers who are just starting with Drupal theming and want to stay up-to-date in today's fast-paced world?

Community participation is always a good starting point for every Drupal developer. Plenty of people can help you with the various touchpoints the community offers. Nowadays, one of the best places to talk about Drupal is the Slack Workspace of the Drupal Association.

When you have gained some confidence, I suggest trying to get involved in some way: write a simple patch for a theme, improve the documentation, and propose new features. And, of course, read a lot. There's a plethora of technical articles, blog posts, and books to start from.

Luca Lusso
Luca Lusso

TDT[10]: Finally, what future developments or trends in Drupal theming and front-end performance are you most excited about, and how do you plan to stay involved in these areas?

Those two trends of splitting an interface into components and building decoupled architectures are here to stay. I'll continue investigating better ways to integrate Drupal with external systems like Storybook and Backstop.js. I'm still not convinced that building a 100% decoupled website is a good idea (at least for some kind of project), so I'll keep exploring best practices and improvements in this area.

Disclaimer: The information provided about the interviewee has been gathered from publicly available resources. The responsibility for the responses shared in the interview solely rests with the featured individual.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please let us know in the comments below and we will try to address the issue as best we can.

Related Organizations

Advertisement Here

Upcoming Events

Latest Opportunities

Advertisement Here

Call for Support