mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
146 lines
10 KiB
Markdown
146 lines
10 KiB
Markdown
|
[#]: subject: "16 reasons DDEV will be your new favorite development environment"
|
|||
|
[#]: via: "https://opensource.com/article/22/12/ddev"
|
|||
|
[#]: author: "Randy Fay https://opensource.com/users/rfay"
|
|||
|
[#]: collector: "lkxed"
|
|||
|
[#]: translator: " "
|
|||
|
[#]: reviewer: " "
|
|||
|
[#]: publisher: " "
|
|||
|
[#]: url: " "
|
|||
|
|
|||
|
16 reasons DDEV will be your new favorite development environment
|
|||
|
======
|
|||
|
|
|||
|
In 2022, you have a wide variety of local development environments to choose from, whether you're a designer, developer, tester, or any kind of open source contributor. Because most of the tools and platforms contributors use happen to run on many different operating systems, you probably even have the choice of constructing your own environment. I'm the maintainer of [DDEV][1], and here are 15 reasons I think you'll like it for your development environment.
|
|||
|
|
|||
|
### 1. Cross-platform
|
|||
|
|
|||
|
DDEV supports and tests, and has a fully automated test suite for Linux (amd64 and Arm), WSL2, Windows, and macOS (M1 and amd64.)
|
|||
|
|
|||
|
Some tools require you to use one exact version of Docker (and they may even take the liberty of installing it themselves), DDEV works with versions of Docker that are a couple of years old, and keeps up with the latest versions, as well. Alternatively, you can use [Colima][2] or Docker installed inside WSL2.
|
|||
|
|
|||
|
DDEV’s binaries are signed and notarized on macOS and Windows, so you never have to sneak around scary operating system warnings when installing and using DDEV.
|
|||
|
|
|||
|
### 2. Performance
|
|||
|
|
|||
|
The DDEV team believes that DDEV on macOS and Windows has [the best performance][3] you can get on any local development, both in terms of starting DDEV (10 to 20 seconds) and in terms of webserving. With no setup required at all, the [Mutagen feature][4] speeds up webserving by a factor of 10, at least. And of course on Linux (including WSL2) it's truly superb.
|
|||
|
|
|||
|
### 3. Settings file management
|
|||
|
|
|||
|
DDEV is happy to get you started quickly and easily, and even manage your settings files. You can use your own repository or follow one of the [quickstart guides][5] to create something new and you'll have a project going in no time. You can also [turn off settings file management][6] to fine-tune your team's approach when you need more customization.
|
|||
|
|
|||
|
DDEV's configuration files aren't used when they're not being used in a DDEV context, so your project won't accidentally have DDEV settings if you mistakenly deploy them to production. If you have the same project setup for Lando _and_ DDEV, then the DDEV settings won't break Lando.
|
|||
|
|
|||
|
### 4. Trusted HTTPS
|
|||
|
|
|||
|
DDEV uses [mkcert][7] to allow you to conduct all your work using [locally trusted HTTPS][8], just like it will work in the real world. You don't have to click around scary browser warnings to view your project in development.
|
|||
|
|
|||
|
### 5. Database snapshots
|
|||
|
|
|||
|
DDEV has the `ddev snapshot` feature, allowing you to quickly capture the state of your [database][9] and then quickly restore to a different point. You can name snapshots for different branches of your project. It's far faster than traditional export and import.
|
|||
|
|
|||
|
### 6. Simple single-binary installation without dependencies
|
|||
|
|
|||
|
[DDEV][10] is written in [Go][11]. Because Go is a fairly new language, this can be a bit of a disadvantage in terms of community involvement, but it's a huge advantage for cross-platform support. Go does cross-platform builds with ease, and the resulting self-contained binary has no dependencies at all (aside from Docker.) There are no libraries to install, no DLLs to maintain. And responsiveness to commands is excellent!
|
|||
|
|
|||
|
### 7. Xdebug step-debugging
|
|||
|
|
|||
|
Lots of people have their first experience with a [real step-debugging environment][12] for the first time with DDEV because it's really, _really_ easy. Thanks to PHPStorm, there's no setup at all. With VSCode or [Codium][13], there's about 2 minutes of setup. There's no need for inserting print statements into code anymore!
|
|||
|
|
|||
|
### 8. Explicit support for your CMS
|
|||
|
|
|||
|
DDEV has built-in support for many popular content management systems (CMS) and platforms. "Explicit support" means that there's setting management, and an NGINX configuration customized for the specific platform you're using. Here's a partial list of what's supported:
|
|||
|
|
|||
|
- Drupal
|
|||
|
- Backdrop
|
|||
|
- WordPress
|
|||
|
- TYPO3
|
|||
|
- Magento
|
|||
|
- Laravel
|
|||
|
- Shopware
|
|||
|
|
|||
|
### 9. Integration and add-ons
|
|||
|
|
|||
|
While DDEV provides explicit support with optional settings management for your CMS of choice, many developers use other platforms, including Symfony, Moodle, Mautic, and so on. DDEV has explicit support for NodeJS, both for processing and as daemons.
|
|||
|
|
|||
|
DDEV also features a library of supported, maintained, and tested add-ons for Redis, Solr, Memcached, Elasticsearch, Mongo, Varnish, and more.
|
|||
|
|
|||
|
### 10. Gitpod
|
|||
|
|
|||
|
Your local development environment doesn't even have to be local anymore. DDEV has full support for use in [Gitpod][14] so you can move your development into the cloud.
|
|||
|
|
|||
|
### 11. No vendor lock-in
|
|||
|
|
|||
|
There is absolutely no vendor lock-in in DDEV. The idea behind the DDEV platform is that DDEV can be plugged into a dev-to-deploy workflow as pieces of a puzzle that work for you. Mix and match! DDEV is an open source community project that works great with any hosting service you can use.
|
|||
|
|
|||
|
### 12. Respect for your host computer
|
|||
|
|
|||
|
DDEV doesn't assume you use your computer (or containers) only for DDEV.
|
|||
|
|
|||
|
Too many local dev tools happily reconfigure your host computer without your full involvement. More than one of them edit your `/etc/exports` file, with no way for you to opt out. A couple of them actually overwrite your Docker installation with a different version at install time. DDEV tries to ensure that in the unlikely situation that anything needs to be changed on your computer, you're the one doing it, and you have options.
|
|||
|
|
|||
|
For example, HTTPS support requires running `mkcert -install` one time. [NFS support][15] requires a bit of additional setup. Because nearly everything is run in a container, there's very little that needs to be done on the host computer in the first place.
|
|||
|
|
|||
|
### 13. Community
|
|||
|
|
|||
|
The DDEV community has been phenomenal through the years, contributing ideas, code, and shared support. There are [open collections][16] of DDEV services, tools, snippets, approaches, as well as [blogs and presentations][17] and more from users all around the world.
|
|||
|
|
|||
|
The [DDEV Advisory Group][18] provides oversight, direction, and feedback for the project. Anyone is welcome to join.
|
|||
|
|
|||
|
### 14. Open source
|
|||
|
|
|||
|
DDEV is a small cog in the huge open source ecosystem. It couldn't even exist without the hundreds or thousands of projects that make up the Linux containers that run it, and of course, PHP itself is a fundamental upstream project. We love to contribute upstream and downstream to projects like:
|
|||
|
|
|||
|
- **Docker**: DDEV is involved with the Docker project, because DDEV users are always pushing the limits. We participate heavily in Docker issue queues.
|
|||
|
- **Mutagen**: When you edit code in containers, there's a lot of synchronization between your local host and the container environment that needs to happen. [Mutagen][19] helps bridge that gap for DDEV users.
|
|||
|
- **mkcert**: The [mkcert][7] tool allows DDEV to provide trusted HTTPS in your local development environment. We've benefited enormously from it, and have contributed back tests and bug fixes.
|
|||
|
- **Xdebug**: DDEV is great with [Xdebug][20], and of course, we hear right away when there are problems. We report our findings back to the Xdebug issue queue.
|
|||
|
- **deb.sury.org PHP packages**: The Debian PHP packages (5.6 all the way through 8.2, at the time of writing) we use come from [deb.sury.org][21]. Because the DDEV community is an early consumer of those packages, we're often in that [issue queue][22] too.
|
|||
|
|
|||
|
### 15. DDEV Keeps Up
|
|||
|
|
|||
|
DDEV is always keeping up with the dependencieis you need. For example, at this writing, neither PHP 8.2.0 nor Drupal 10 have yet been released, but both have been supported in DDEV for months.
|
|||
|
|
|||
|
### 16. Your own reason
|
|||
|
|
|||
|
I'd love to hear what makes DDEV your favorite, and the DDEV team is always [listening][23] to hear what you want in the future. Of course, we also want to hear when things don't work the way you want or expect. Visit our [Git repository][10] to contribute!
|
|||
|
|
|||
|
Note: This is an updated version of a [blog post][24] that originally appeared on ddev.com.
|
|||
|
|
|||
|
--------------------------------------------------------------------------------
|
|||
|
|
|||
|
via: https://opensource.com/article/22/12/ddev
|
|||
|
|
|||
|
作者:[Randy Fay][a]
|
|||
|
选题:[lkxed][b]
|
|||
|
译者:[译者ID](https://github.com/译者ID)
|
|||
|
校对:[校对者ID](https://github.com/校对者ID)
|
|||
|
|
|||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
|||
|
|
|||
|
[a]: https://opensource.com/users/rfay
|
|||
|
[b]: https://github.com/lkxed
|
|||
|
[1]: http://ddev.com/
|
|||
|
[2]: https://opensource.com/article/22/9/replacing-docker-desktop-mac-colima-use-ddev-first-impressions
|
|||
|
[3]: https://ddev.com/ddev-local/docker-desktop-and-colima-benchmarking-on-macos
|
|||
|
[4]: https://ddev.readthedocs.io/en/stable/users/install/performance/#mutagen
|
|||
|
[5]: https://ddev.readthedocs.io/en/stable/users/cli-usage/#quickstart-guides
|
|||
|
[6]: https://ddev.com/ddev-local/controlling-cms-settings-files-in-ddev-local/
|
|||
|
[7]: https://github.com/FiloSottile/mkcert
|
|||
|
[8]: https://ddev.com/ddev-local/ddev-local-trusted-https-certificates/
|
|||
|
[9]: https://ddev.readthedocs.io/en/stable/users/basics/database_management/
|
|||
|
[10]: https://github.com/drud/ddev
|
|||
|
[11]: https://opensource.com/article/17/6/getting-started-go
|
|||
|
[12]: https://ddev.readthedocs.io/en/latest/users/debugging-profiling/step-debugging/
|
|||
|
[13]: https://opensource.com/article/20/6/open-source-alternatives-vs-code#vscodium
|
|||
|
[14]: https://ddev.readthedocs.io/en/stable/users/install/ddev-installation/#gitpod
|
|||
|
[15]: https://ddev.com/ddev-local/ddev-local-nfs-mounting-setup-macos/
|
|||
|
[16]: https://ddev.readthedocs.io/en/latest/users/extend/additional-services/
|
|||
|
[17]: https://github.com/drud/awesome-ddev
|
|||
|
[18]: https://github.com/drud/ddev/discussions/categories/ddev-advisory-group
|
|||
|
[19]: http://mutagen.io
|
|||
|
[20]: https://xdebug.org/
|
|||
|
[21]: https://deb.sury.org/
|
|||
|
[22]: https://github.com/oerdnj/deb.sury.org/issues
|
|||
|
[23]: https://ddev.readthedocs.io/en/stable/users/support/
|
|||
|
[24]: https://ddev.com/ddev-local/whats-so-different-about-ddev-local
|