In many modern frameworks, data modeling is done by building out database tables. In Drupal, we use a web-based interface to build our models. This interface makes building the database accessible for people with no database experience. However, this easy access can lead to overly complex content models because it’s so easy to build out advanced structures with a few hours of clicking. It’s surprising how often Drupal developers are expected to be content modeling experts.
Drupal sites often suffer from a less than ideal editor experience. While Drupal 8 improves on the default experience by providing inline editting, working preview, and moving the ‘advanced’ options to the sidebar, there’s still common mistakes that will lead to poor a experience. As a part of my on-going Drupal 8 Best Practices series, lets look at what we can do to build good admin interfaces. Here are a few major principles behind the admin experience: Use as few content types as reasonable.
Breadcrumbs are a pain point in Drupal 7. If you don’t know how breadcrumbs are supposed to work, go read this. The crumb should start with home and continue through to an unlinked crumb of the current page. Crumbs were implemented poorly, and breadcrumbs were difficult to modify in a module. Further, they were based on items in the menu. The breadcrumbs didn’t even allow you to edit the home title or include the current page title as an unlinked crumb.
Don’t store site configuration in the database during development because putting configuration in the database makes configuration difficult to track in version control. Instead, use the file system! Putting configuration in a database also makes it more difficult to restore, compare, sync, deploy, modify, and review the site config. Drupal 8 uses Yml files for configuration which are a perfect format for file-based configuration. In fact, this is the only method for storing configuration in BackdropCMS because BackdropCMS uses JSON files to store site configuration.
These core concepts apply to Drupal 8 site builds. However, many often apply to the other major web framework from WordPress to Node projects. Many of these ideas are documented on Drupal.org as well. I’m rewriting them here because I disagree with the documentation in several key areas. Use The Same Development Environment Everyone on your team should have exactly the same development environment. Using the same development environment ensures that the project runs exactly the same for each team member working on a project.
I’ve taught an beginners course during Drupal Global Training Days many times in portland, and I give students an introduction to Drupal 8 for site builders. I spend the day simplifying Drupal for new developers. But once you’re beyond the basics of the interface, there are many different ways to accomplish a task in Drupal and Drupal 8 only adds to the choices. So, if you’re a Drupal developer looking to craft easier to maintain Drupal 8 sites, this series is for you.
I’m excited to announce that I’m joining the ThinkShout team as a senior software enginer. ThinkShout is a mission-driven team that delivers engaging work for some amazing non-profit organizations. ThinkShout caught my eye a couple years ago when they launched the RedHen CRM platform for Drupal. I was impressed not only because RedHen is free and open source, but because Sean Larkin took the time to walk us through working with the CRM inside the Drupal platform.
Dries, the creator of Drupal recently started a conversation about WordPress vs. Drupal. This is the first time I’ve read a great discussion about the pros and cons of each platform. John Eckman, the founder of one of the best WordPress agencies responded well on his blog. John’s experience with the two communities seems similar to my own because I’ve also been an active participant in both communities. In fact, 3 years ago, I considered myself a WordPress expert.
Devsigner is celebrating the cross-overs, the multi-disciplinarians, the coders who paint and the designers who send pull requests — and those who want to develop some new left-right brain skills. We’re looking for folks to break out of their familiar meetup silos and apply their knowledge across the crafts of development and design. Join me at Devsigner in Portland, Oregon, May 23-25! Tickets are now on sale, and session submissions are open until this Friday, May 2!