The Landscape of Local Drupal Development
The Landscape of Local Drupal Development

Over the past decade, the landscape of local web development setup has evolved significantly. What once seemed like it would become simpler and more user-friendly has instead become a complex and diversified field. In this blog, we will explore the various approaches to local Drupal development and how they have evolved to meet the needs of web developers in 2023.

1. The Stack as an App: AMP and Friends

In this approach, developers download and run a native application that contains an isolated stack, including Apache, PHP, and MySQL. This method is straightforward and user-friendly, making it ideal for Mac and Windows users. It offers the advantage of easy recovery by uninstalling and reinstalling the application in case of issues.

However, there are limitations to this approach, such as difficulties in adding custom PHP extensions and potential configuration mismatches with production environments. Additionally, the skills acquired may not directly translate to production servers or when switching operating systems locally.

2. Native on the Workstation

This setup involves using the command line to install necessary software locally. Mac users may use Homebrew and Homebrew-PHP, while Linux users rely on package managers like apt or yum. Windows users now have the option of using the Linux subsystem in Windows 10.

Although slightly more complex than the *AMP application approach, this method provides transferable skills to production environments. Developers have control over what they install, but it requires a deeper understanding of the components needed.

3. Linux on the Laptop

Running a Linux distribution as the primary operating system is an excellent choice for local development. This approach ensures that everything learned is directly applicable to production environments. However, potential drawbacks include concerns about battery life and hardware compatibility with Linux.

4. Virtual Machines

Virtual machines have been a staple of development for some time. With hardware support for virtualization and ample RAM, running multiple virtual machines simultaneously is now feasible. VirtualBox, a free virtual machine application, simplifies this process and enables developers to maintain separate and isolated environments for different projects.

However, managing multiple virtual environments can be time-consuming, involving manual code copying and environment setup.

5. Vagrant

Vagrant streamlines the use of virtual machines by simplifying initial setup and code synchronization. It allows developers to create repeatable, isolated PHP environments quickly. Vagrant also supports custom base boxes with specific software configurations, making it versatile for various projects.

6. Docker

Docker, often hailed as the preferred choice for local development, leverages containerization technology. While promising, Docker can be complex, particularly on macOS and Windows where it relies on lightweight virtual machines. Developers need to ensure that in-development code is integrated seamlessly with Docker containers.

Several tools like Kalabox, Lando, and docker4drupal aim to simplify Docker-based local development. However, managing container sizes and troubleshooting can be challenging, especially for those unfamiliar with Docker’s intricacies.

7. ddev

Developed by a team with ties to the Drupal community, ddev simplifies Docker-based development. It allows site and database files to be stored outside of Docker, reducing the risk of accidental data loss. While it may limit some Docker functionalities, it prioritizes user-friendly development.

Conclusion

As of 2023, local Drupal development options have grown in number and complexity. The choice of the right approach depends on the team’s experience and requirements. For newcomers, tools like MAMP offer simplicity, while Vagrant and Docker cater to more experienced developers with diverse needs.

The future of local development may continue to evolve. Developers should remain adaptable and consider their team’s specific needs when selecting a development environment. Whether it’s the user-friendly approach of MAMP or the flexibility of Docker, the key is to choose a tool that best aligns with your project and team dynamics.

© 2013 - 2024 Foreignerds. All Rights Reserved

facebookFacebook
twitterTwitter
linkedinLinkedin
instagramInstagram
whatsapp
support