How proper SEO and the Drupal CMS helped my article be a Google featured snippet
abhai
30 May 2023

Proper search engine optimization (SEO) techniques and the use of Drupal 10 played a significant role in making my article a Google search featured snippet for the keyword "Solid Principles Drupal". In this article, we will explore how these factors contributed to the success and visibility of the article.
Software Design Patterns: Drupal's architecture and reusability
abhai
30 May 2023

Software design patterns are crucial tools in the field of software development, providing developers with proven solutions to common programming challenges. These patterns encapsulate the collective wisdom and best practices of experienced software engineers, enabling the creation of robust, scalable, and maintainable code. In this article, we will explore the importance of design patterns in programming, their benefits, and some popular examples of design patterns using Drupal in most examples, because I try to bring Drupal into everything.
How to use the t() function in Drupal 9?
abhai
9 May 2023
The t() function is used for translating user-visible text in Drupal 9. It takes a string as input and returns a translated string. Variations of the t() function exist in JavaScript and Twig as well.
How does parameter upcasting work in Drupal?
abhai
9 May 2023

Parameter upcasting is a feature in Drupal 9 that allows developers to declare the type of a parameter in a controller method to be an interface or a base class, instead of a specific class. This allows the controller method to accept any class that implements that interface or extends that base class.
Design patterns in Drupal
abhai
13 April 2023

Drupal follows best practices in software development by utilizing various design patterns. Design patterns are established solutions for common programming challenges, providing a structured and reusable approach to software design. In Drupal, these design patterns are used to ensure extensibility, flexibility, scalability and maintainability of the CMS. From the Observer pattern for event handling, to the Plugin pattern for modular functionality, to the Factory pattern for object creation, Drupal leverages a variety of design patterns to implement its robust architecture. This introduction provides a glimpse into the key design patterns used in Drupal CMS, which play a crucial role in shaping its modular and flexible nature
SOLID principles in Drupal
abhai
12 April 2023

As one of the most popular open-source content management systems (CMS), Drupal provides a powerful platform for building complex web applications. To ensure that Drupal projects are scalable, maintainable, and extensible, it is essential to follow best practices for writing modular and clean code. One such set of principles that can greatly aid in achieving these goals is SOLID principles. SOLID is an acronym that represents a set of five principles - Single Responsibility Principle (SRP), Open/Closed Principle (OCP), Liskov Substitution Principle (LSP), Interface Segregation Principle (ISP), and Dependency Inversion Principle (DIP). In this article, we will explore how to apply SOLID principles in Drupal development with examples.
How dependency injection works in Drupal?
abhai
12 April 2023

In Drupal, dependency injection is implemented using the Symfony Dependency Injection component, which is a popular PHP library for managing dependencies in object-oriented applications. Drupal is built on top of Symfony framework and leverages its components for various functionalities, including dependency injection
Drupal 10 upgrade and readiness
abhai
20 November 2022

As Drupal 8 and Symfony are approaching EOL and with the many improvements Drupal 10 is promising, it is time existing Drupal sites start preparing for a smooth upgrade to Drupal 10 when it is made available in December 2022! Let's see what's new and how to upgrade/migrate to Drupal 10.
Can we use Webpack and TypeScript in our Drupal themes?
abhai
14 November 2022
It is possible to use webpack in Drupal theme. Follow the repo in this article for transpiling SCSS to CSS and transpiling typescript to JavaScript in your Drupal theme using webpack.
Drupal security best practices
abhai
2 November 2022

I was recently looking certain random things for all Drupal sites that I know to see what information I can get from these sites and I was surprised to see that many of them do not have the basic Drupal security recommendations done. For example, I could tell the exact Drupal, PHP and Nginx versions in many cases. Some of the sites were on Drupal versions that were vulnerable. So I decided to write a checklist that if followed exactly will take care of at least the recommended best practices.