Matt Glaman, a Drupal expert and maintainer of PHPStan Drupal and Drupal Rector, dives into the revolutionary world of WebAssembly. He discusses its role in enhancing web app performance, the challenges of browser compatibility, and its potential within the Drupal ecosystem. The conversation also touches on the exciting concept of integrating interactive features and AI into Drupal sites. Additionally, they explore the advantages of dark mode for user experience and the importance of accessibility. Get ready to rethink possibilities in web development!
WebAssembly significantly enhances Drupal's performance by enabling high-level languages like C and Rust to run natively in web browsers.
The introduction of the Dark Mode JS module offers a user-friendly way for Drupal sites to implement customizable dark theme options.
The collaborative Drupal community plays a vital role in advancing WebAssembly projects, fostering innovation through open-source contributions and documentation.
Deep dives
Understanding WebAssembly
WebAssembly (Wasm) is a binary instruction format that allows high-level code to run in web browsers as if it were native code. It enables developers to run code compiled from languages such as C, C++, and Rust, which can enhance the performance of web applications significantly. By allowing scripts to execute directly in the browser, it eliminates dependence on server-side processing and thus reduces load times. The integration of Wasm with existing JavaScript code provides a versatile environment for creating more complex web applications.
Drupal's Potential with WebAssembly
The podcast highlights the potential of using WebAssembly to enhance Drupal's capabilities, particularly for in-browser experiences. One proposal includes creating a playground environment where users can run Drupal directly within their browsers, minimizing setup time and streamlining the learning process. This approach could significantly lower the barriers for newcomers to test and explore Drupal without needing extensive server-side configurations. Ultimately, leveraging Wasm could create a more interactive and user-friendly experience for Drupal developers and users.
The Module of the Week: Dark Mode JS
The podcast introduces 'Dark Mode JS' as a module that enables Drupal sites to implement a dark mode feature easily. Created by Arthur Bagdasarian, the module offers options such as where the widget appears on the page, the color schemes, and whether it matches the user’s operating system theme settings. It is actively maintained and has seen over 89 installations, indicating its acceptance in the community. The module simplifies user customization and provides an enhanced viewing experience, particularly for those who prefer dark themes.
Exploring Community and Collaboration
A notable aspect of the discussions was the collaborative nature of the Drupal community and how it supports different projects, including WebAssembly initiatives. By learning from similar projects like the WordPress Playground, contributors can build on existing frameworks and make improvements. The importance of documentation and open-source contributions is emphasized, as it encourages experimentation and fosters innovation within the community. Furthermore, leveraging generative tools and platforms can help developers overcome challenges and streamline their contributions.
Looking Forward: Use Cases and Innovations
As the podcast wraps up, potential future use cases for WebAssembly in Drupal are highlighted, such as allowing for real-time code testing with tools like Drupal Rector. Moreover, proponents suggest that integrating WebAssembly could pave the way for creating more interactive environments for components, such as experience builders. By enabling performance improvements on the client side, WebAssembly could revolutionize how Drupal applications are built and experienced. Ultimately, the conversation emphasizes the ongoing evolution of web technologies and the importance of staying adaptive to leverage these advancements.
Today we are talking about WEBAssembly, How it’s used, and cool things you can use it for with Drupal with guest Matt Glaman. We’ll also cover Darkmode JS as our module of the week.
How old: created in May 2022 by Arthur Baghdasaryan (arthur.baghdasar) of Last Call Media
Versions available: 1.0.7 which works with Drupal 9, 10, and 11
Maintainership
Actively maintained
Security coverage
Number of open issues: 1 open issues which is a bug against the current branch, but is postponed, waiting for more info
Usage stats:
89 sites
Module features and usage
The module is a wrapper for the DarkmodeJS library which gets 1,000 weekly downloads, according to NPM. That library does have its own demo / tutorial site, so if you want to understand the options it exposes, we will add a link in the show notes
The module provides options to control where on the page you want the widget to appear, what colors it should use, whether or not to store a user’s choices in cookies, and whether or not to automatically match a visitor’s OS theme setting of light/dark
Installing the module currently requires making some changes to your site’s composer.json file, then configuring how you want the widget to appear, and then placing the block in your site theme
The module also doesn’t currently include a schema file for its configuration, which can cause challenges particularly for sites that run automated tests
Get the Snipd podcast app
Unlock the knowledge in podcasts with the podcast player of the future.
AI-powered podcast player
Listen to all your favourite podcasts with AI-powered features
Discover highlights
Listen to the best highlights from the podcasts you love and dive into the full episode
Save any moment
Hear something you like? Tap your headphones to save it with AI-generated key takeaways
Share & Export
Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more
AI-powered podcast player
Listen to all your favourite podcasts with AI-powered features
Discover highlights
Listen to the best highlights from the podcasts you love and dive into the full episode