I’ve been working with Drupal since the days of Drupal 4.7. Back then I was a green intern at the Iona Group working on some very basic Drupal sites. And when I say “green” I mean, I didn’t know anything about Drupal. In fact, I really had only begun to understand HTML and CSS (I distinctly remember a CSS Zen Garden assignment giving me fits). A CMS and dynamic websites in general must’ve seemed like “black magic” to me. What do I mean by “black magic”? I mean being completely unsure of how the hell something was built on the web. Black Magic.
Anyways, I’ve been reflecting a lot lately on my career and the growth of CHROMATIC. Through that, I realized how much I now take for granted. What I mean is, the “black magic effect” is no longer something that occurs to me (at least not often). I can now easily look at a piece of functionality on the web and figure out how the developers pulled it off. I can look at the source code and know they’re using jQuery for front-end effects. I can look for “tells” in the document's head to see what CMS they’re using. I can use Dev Tools to inspect CSS3 styles and know exactly how they pulled off that slick gradient.
I take all of this for granted. From the skills I’ve learned to the
tools I rely on every day, this stuff is just a part of my routine. It
wasn’t always this transparent. When I first started developing
websites, I realize I simply didn’t know what I didn’t know. I didn’t
have the knowledge and the experience I have today. For new
developers, this stuff can be hard. This stuff is hard.
All that said, I wanted to write a short guide for new Drupal developers; the guide that I wish I would’ve had when I started. Sort of a short outline of stuff that would’ve been helpful to me back when I was cutting my teeth.
Learn the basics
Knowing how to program (even just the basics) can get you a long way. If you can write basic PHP and understand basic programming principles, you’re well on your way. Get your hands dirty with some tutorials on variables, conditionals, loops, functions, etc. and you’ll have a foundation to build on. A fundamental understanding of these things is the basis for life as a developer. Without them, much of the web will seem like black magic. This ground-up approach isn’t the only way to learn, but I sure wish I would’ve learned this way. This looks like a very good roundup from Drupal.org itself.
From there, try reading some code (like that of the examples module). I can’t tell you how much I’ve learned (and continue to learn) simply by reading code. Seeing the actual code that runs a module will often times get you to the “Aha!” moment where you understand how something is actually done.
The Drupal Web Developer Toolbox
Here’s a rundown of things I use just about every day: (sorry, I’m a Mac guy)
- Chrome Dev Tools - in browser debugging of HTML, CSS and JavaScript (I currently prefer this to Firebug)
- Devel module - THE debugging module for Drupal
- Drush - drupal control from the command line
- You need a top notch text editor. These are the standouts for me:
- Sublime Text 2 (my favorite)
- BBEdit
- Coda
- Tower - GUI for Git on the Mac, great for Git beginners
- Sequel Pro - the best GUI for db management on the Mac
- 1Password - sane password management
Tinker
This is probably the best way to learn, in my opinion. Just get in there and get your hands dirty. The beauty of what we do is that there is very little cost to tinker. Other professions have greater expenses to learn. Painters need paints, brushes, etc. Mechanics need parts, tools, and garages. We need a text editor and an internet connection.
If you want to be a module developer, start by writing a simple module and tinkering with hooks. Maybe try to replicate the functionality of a simple module. Or follow the Module Developers Guide on Drupal.org (your new home away from home). The examples module (mentioned above) is also a great place to start.
If you want to be a themer, try to replicate your favorite website’s look and feel with a custom Drupal theme. I started using Zen as the base for my themes years ago and haven’t looked back. Zen is great because it's really well documented and gives you a great jumping off point for many of the most used theme hooks.
Learn Git
I’ll be honest. Git was probably the last thing I learned that seemed truly like black magic at the time. In fact, it still feels that way sometimes. If you want to be a true developer these days, you’re going to have to learn to work with version control systems. Git isn’t the only version control tool, but it certainly is one of the most popular. This is the version control system Drupal uses, so for new devs looking to work with Drupal, it’s a pretty safe bet.
Read the online version of Pro Git to get started and consider buying Tower if you’re new to the command line. Focus on understanding commits, pushes/pulls and merges. This will be a good start. At CHROMATIC, we use GitHub to host all of our project repositories, so you might try their services as well. GitHub is your friend.
Command Line is also your friend
I avoided using the command line for years. It scared the shit out of me. Now, I spend lots and lots of time there. For me, I didn’t quite get why I’d want to use the command line until I started using Drush. It was only then that I realized how much faster you can get (most) things done from within a terminal window. It takes some getting used to, but once you learn the basics, there is a whole other world of computing out there. The command line is powerful and virtually all devs can benefit from being familiar with it. My friends at Lullabot have a great series on learning the command line available for free on their Drupal training site Drupalize.me.
Sharpen, Tune, Refine
Being a web developer means adaptation. The web is an ever-evolving beast and if you want to be a developer ten years from now, you’re going to have to continue to learn and refine your skills. This was one of the main reasons I got into this field. I love getting better, learning new things, not knowing everything. As a rule, I try to spend five-ten hours a week on honing my craft. Whether it’s reading blog posts on emerging technologies, following code tutorials or trying out new modules, I try to keep up on things as best I can. Making time to continue to learn is really important. I can’t stress this one enough.
Let Go
This could be an entire post on its own. The point here is that it's OK to not know everything. No one does! It’s OK if you don’t yet know Git. That doesn’t mean you can’t make kick ass websites. It’s OK if you’re still writing vanilla CSS, that doesn’t mean you can’t make beautiful themes.
If I’m honest, this is the hardest one for me. I’m always thinking, “Shit. I really need to learn X or get caught up on Y.” The part I often forget is that you can’t know everything. Maybe I’m an awesome module developer but I’m not the best with Sass yet. That’s OK!
Wrapping Up
I’m hoping developers new to Drupal (or development in general) find this post useful. I’d hardly say this everything you need but I think it will get you headed in the right direction. Leave a comment if you have things you’d like to add and happy Drupaling!