Skip to content

Instantly share code, notes, and snippets.

@mparker17
Last active December 18, 2015 08:49
Show Gist options
  • Select an option

  • Save mparker17/5756729 to your computer and use it in GitHub Desktop.

Select an option

Save mparker17/5756729 to your computer and use it in GitHub Desktop.
Basic tools used when developing Drupal sites

Advanced tools used when developing Drupal sites

Client-side developer tools

Most modern web browsers provide a set of developer tools which allow developers to examine communication between the browser and the server, inspect HTML elements and their styles, debug Javascript, execute arbitrary Javascript, and view the DOM information for each HTML element on the page. Common ones include:

  • Firefox's Firebug
  • Chrome or Safari's built-in developer tools
  • Internet Explorer's F12 Developer Tools — built in to newer versions of IE, available as a separate download for older versions.
  • The Visual Event 2 bookmarklet — displays information about which listeners are attached to

Server-side developer tools

  • Xdebug — A PHP plugin allowing developers to step through the PHP code as it executes.
    • Developers connect their editor to xdebug on the server.

Other tools

Some projects use additional tools. You might hear of these ones in day-to-day conversation.

Speed tools

When there are lots of page requests at the same time and a lot of PHP to run, the server gets slower. We use the following tools to speed that up:

  • Memcache and it's corresponding [PHP extension].(php-memcached) — caches objects in memory so PHP doesn't have to hit the database as often.
  • PHP Alternative Package Cache (APC) — because PHP is a scripting language, it normally has to be compiled every time it is run. APC caches the compiled PHP.
  • Varnish — A cache that sits between Apache and the user's browser to serve HTML from cache and save PHP from running.

Searching and indexing tools

  • Apache Solr — Drupal has an internal search system which works for basic searching, but some sites need features like promoted search results or faceted searching.

Basic tools used when developing Drupal sites

If you want to run a test Drupal site on your computer, you'll have to know about the following tools.

Client tools

Basically, web browsers. You'll need to know how to use these to view the website.

Web browsers take HTML, CSS, JavaScript and other languages used to create websites, and display them on the screen.

Server tools

A web server is just a regular computer that runs a certain set of programs (this set of programs as a whole is frequently called a "web stack"). The most important program is the HTTP server — the program that listens for web browsers trying to connect to it and replies to them.

The one you'll have to learn is:

  • The filesystem — a fancy name for files on your computer. The filesystem is used to store executable code, resources, and some configuration. It's a slower, harder-to-edit backend to the site.

Fortunately, if you got as far as opening this document, you already know as much as you need to know about the filesystem.

Unless you're a backend developer, you don't need to learn the following tools, just know what they are and that they exist.

  • Apache HTTP Server — A program to listen for web browsers and respond to them by sending files and/or running PHP scripts.
  • PHP hypertext preprocessor — A program to generate HTML on-the-fly.
    • If the user requests a file with a certain filename extension (".php"), Apache runs PHP on that file.
  • MySQL database engine — A program to provide a fast, easily-editable backend to the site.

Server-side developer tools

These programs are installed on the server to make it easy for developers to work. They're a bit more advanced than the filesystem and web browsers, and you'll need to know how to use them.

  • Git — a version-control system for managing files. Used to make changes to the filesystem.
    • Resources for learning:
    • There are some GUI tools for working with Git:
      • Github for Mac or Github for Windows — lets you import and work with projects hosted on Github. You can use it with other projects, but you have to know how to use the command-line to get them into the program.
      • SourceTree (Mac OS/X) — a more-advanced program for working with projects stored in Git. It assumes you know what you're doing.
  • Drush — a set of command-line tools to make working with Drupal faster.
  • phpMySQL (optional) — A PHP program to import, explore and change databases.
    • There aren't many good resources for learning how to import databases with this tool — most tutorials are for developers who already know SQL. Please talk to Matt if you want a primer.

Tools to run a server on your machine

Installing Apache, MySQL and PHP is difficult to do if you're not a server administrator. Fortunately, there are tools that bundle these programs and make it easy to install them on your computer.

All of these programs contain Apache, PHP, MySQL and phpMyAdmin.

There's one more tool which is becoming popular among web developers because it's easy to set up and more reliable than the above options. Not every project uses it though!

  • Vagrant — A wrapper around Virtualbox that makes it easy to set up a whole virtual web server on your computer which matches the live server as closely as possible. The files on your computer are shared with the virtual machine so you don't have to FTP the files when you change them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment