Conversational Drupal

Drupal logo saying hello in multiple languages

At BADCamp this year I had the privilege of presenting a basic introductory session for those new to Drupal. I really started thinking about myself when I started Drupal 3 1/2 years ago. There were so many terms that had specific meaning.

My goals were to help people from many levels get familiar with the most common vocabulary we take for granted as experienced developers. Also, I wanted to familiarize them with the roles they might play as part of the Drupal Community. Finally, in the spirit of working together, I had breaks for people to introduce themselves to others. Overall it was such a positive, fun hour and I got a lot of great feedback!

You can see the slides at: 
Conversational Drupal: A Crash Course in Drupal Jargon 

About

  • Front End Developer
  • 17 years web development experience
  • 3 years of Drupal
  • k2@hook42.com
  • www.drupal.org/u/kristink2

Hook 42

  • San Francisco, California
  • Kristen Pol & Aimee Degnan
  • ~3 years, 10 employees
  • Focus Areas: SEO, Multilingual, Complex Drupal projects
  • Like Douglas Adams
  • A boutique Drupal agency
  • Say hello!
  • hook42.com
  • @hook42inc

Starting out in Drupal

When I asked other developers what words stood out for them when they first started using Drupal

  • Drupal
  • CMS
  • Core “Don’t Hack Core”
  • Modules
  • Themes
  • Contrib
  • Custom
  • Content Types
  • Node (s)
  • Views
  • Block
  • Beans
  • When I asked other developers what words stood out for them when they first started using Drupal
  • Taxonomy
  • Context
  • Features
  • Config Settings
  • Permissions
  • Drupal.org infrastructure (well organized with all projects there)
  • d.o. & g.d.o.
  • Patch
  • Release
  • rtbc
  • RC1
  • Entities
  • Hook
  • Webform (instead of just a form on the web)
  • Form API
  • Panels
  • Display Suite
  • View Modes

What we’re going to do

  • Define terms
  • Perhaps talk to people
  • Learn about roles
  • Share knowledge
  • Just the next 40 or so minutes...

I’m the boss!
Drupal Developer is going to make comments on the terms we use to define job skills and user roles in Drupal.
How many people went to Understanding Drupal or Welcome to Drupal this morning?
Don’t try to remember everything… just listen a million times to let things sink in.

Get the basics

  • Drupal means “drop”. 
  • CMS stands for “Content Management System” 
  • Drupal and CMS
  • Drupal means “drop”. The name comes from a small site called Drop.org that Dries Buytaert released in 2001 there were some other people too…. We see Dries at DrupalCon.
  • CMS stands for “Content Management System” - The idea behind CMS’s is that web developers can quickly make sites so that content can be created easily (We’ll get to more of this soon)

So let’s build a site

  • Core Specifically refers to the code base you download from https://www.drupal.org/start
  • At this point you will most likely be downloading Drupal 8.x or Drupal 7.x, but 6.x and 5.x exist and there’s still tons of support for them (if this is what you inherited)​

Site Architect 
Lead Developer
Drupal Developer
Core - D8, D7, D6, etc.

Don’t hack core!

What Core Is:

  • D7 or D8  - Core is the base code, and a specific set of modules and themes.
  • Core is just the start, but keep it clean.

What Core Is Not:

  • Custom Themes
  • Custom Modules
  • Custom anything really
  • The fun stuff

Install a Drupal site locally

  • Local Setup - MAMP / WAMP 
  • Database - MySQL
  • sites/all/default/files
  • sites/all/default/settings.php

Creator
Maintainer
Contributor
Back-end Developers 
Site Architects

Set of Functionality = Module

  • Makes it easier to turn functionality on and off.
  • Modules are the containers for sets of functionality. 
  • Modules are plugins (if you come from Word Press)

These sets include...

  • PHP Code
  • JS  and CSS (Libraries in 8)
  • Includes and Feature information

Which Modules do I need?

Common Modules

  • Views 
  • CTools 
  • Token 
  • Pathauto
  • Libraries API
  • Entities API 
  • Admin Menu
  • Webform
  • Etc., Etc. Etc...
  • That depends on what you want to do...

What’s in a Theme?

Themes are the containers for sets for front end design and UX functionality. 
These sets include...

  • HTML markup templates
    • D7 - tpl.php (Tipple Fips!) 
    • D8 - Twig files
  • CSS, Sass, Less, etc.
  • Most of the Javascript
  • template.php / mytheme.theme
  • Grunt, Gulp, Composer, etc. files
  • D7 - template.php (a way for themers to use Drupal PHP without putting it in a module)
  • D8 - mytheme.theme (a way for themers to use Drupal PHP without putting it in a module)

Front-end Developer
Themer

How can we make this faster?

Use a base theme to get going quickly.

Common Base Themes

  • Zen
  • Omega
  • Adaptive Theme
  • Zurb Foundation
  • Bootstrap (Open Framework)

Two sets of users, two themes

  • Admin Theme
  • Admin Theme is usually “Seven”
  • Think intranet and internet...

Contrib and Custom

It is customary (not required but most people do it) to make two directories in your Module and Theme folders to hold the different contrib and custom modules and themes.

Modules and Themes can be: 
In Core (you just get them when you download)
Contrib - Downloaded from Drupal.org
Custom - Written by you, custom for your site!
(You might want to turn around and contribute this…) 
Yours, mine and ours...

Woo Hoo - Let’s Review

  • Drupal
  • CMS
  • Core “Don’t Hack Core”
  • Modules
  • Themes
  • Tipple Fip (tpl.php)
  • Twig
  • Admin Theme
  • Contrib
  • Custom
  • You’ve learned a lot already.
  • Site Architect
  • Lead Developer
  • Drupal Developer
  • Creator
  • Maintainer
  • Contributor
  • Back-end Developers 
  • Site Architects
  • Front-End Developer
  • Themer

 Introduce yourself to a friend - tell them what job you do / are training to do.

Good Job! Here’s a picture of a kitten.
Awwww…..

Get Back to Work!
Ok Break’s Over! 

Now we need content.

  • Content types, node(s), views, blocks and beans.
  • Content Types are Sets of fields
  • Examples: Blog, Article, News, List of Contacts, Etc.
  • Example Article Content Type
  • Title
  • Picture
  • Body 
  • Content Types and Fields
  • Site-Builder
  • Sets of fields that work together to make up a set of content on the site - like a blog post, article, news clip, gallery of images, list of contacts, etc.
  • Example Press Content Type

Content and Nodes

  • One set of content becomes a node.
  • Each time you create a new piece of content, it becomes a node
  • Each Node has a unique ID

Views let you do more
This is where Drupal gets powerful.

  • Create lists of data
  • Pull from Content Types, Fields, Users, etc.
  • Want to show your site information in a specific way? Make a view!

Example of a View

  • This shows a list of nodes (each node of the press content type, sorted by date) made by views. 
  • Sets of fields that work together to make up a set of content on the site - like a blog post, article, news clip, gallery of images, list of contacts, etc.

Blocks and Regions

  • Content placed in a region.
  • Simple HTML (add > block)
  • Blocks can be made by, menus, views, search, etc.
  • Blocks are placed in regions
  • Regions are defined in the theme

Example of Blocks

  • Blocks here are in pink - it is a container for many different things

Beans

  • If content types and Blocks had a baby...
  • Site-Builder
  • More control over blocks
  • Add fields
  • Reuse same block with different view modes

Make your site work.

  • Drupal standards, these also come in core.
  • Menus
  • Taxonomy
  • Vocabularies
  • Configuration
  • Site-Builder
  • Menus - add Taxonomy, a powerful core module, gives your sites use of the organizational keywords known in other systems as categories, tags, or metadata. It allows you to connect, relate and classify your website’s content. In Drupal, these terms are gathered within "vocabularies." The Taxonomy module allows you to create, manage and apply those vocabularies.

Drupal Goodies!

  • So many modules, so little time!
  • Context
  • Features
  • Permissions
  • CTools 
  • Token
  • Context - let’s you have things appear based on rules (not to be confused with rules module)
  • Features - save configuration as a file, so it can easily be put up to different sites
  • Permissions - allow different access based on user roles
  • CTools - if you are using views or panels you turn this on
  • Token - replacing fields - make a field then use it in a block title for example
  • Libraries API
  • Entities API 
  • Admin Menu
  • Pathauto
  • Etc., Etc. Etc...

Woo Hoo - Let’s Review

  • Content Type
  • Field
  • Node
  • View
  • Block
  • Regions
  • Beans
  • Menus
  • Taxonomy
  • Vocabularies
  • Configuration
  • Context
  • Features
  • Permissions
  • CTools 
  • Token
  • Libraries API
  • Entities API 
  • Admin Menu
  • Pathauto

 Introduce yourself to another friend - tell them what tool you might be interested in using

Good Job! Here’s a picture of a puppy.
Awwww…..

Get Back to Work!
Ok Break’s Over! 

Our site needs some layout.

  • Terms for Themers and Front-end Developers
  • Panels
  • Display Suite
  • View Modes
  • Themer
  • Front-end Developer
  • Panels is a system that combines layout, blocks, views, etc.
  • Display Suite makes a GUI for managing content types and layout
  • View modes are to present the same content in different ways - list teaser, list, full content

Hooks

  • Hooks are the design and the building blocks, 42 is the answer.
  • A hook is a PHP function that is named foo_bar(), where "foo" is the name of the module (whose filename is thus foo.module) and "bar" is the name of the hook. Each hook has a defined set of parameters and a specified result type. To extend Drupal, a module need simply implement a hook. - from wintercreative Basic Code Design Pattern of Drupal PHP
  • The way PHP Functions are (usually) called in Drupal
  • Defined set of parameters 
  • Back-end Developer

Examples of a hook

  • Hooks are the building blocks.

modulename_hookname($variables) {
    // php code
}
themename_hookname($variables) {
    // php code
}

This example implements a hook that alters the title of a form.
Example from: http://websmiths.co/blog/very-introduction-drupals-hookformalter

More Terms for Back-end Developers.

Developers throw these around...

  • Features - a way of saving configuration settings into a file so that they can be checked into git and moved around development environments (or from site to site)
  • Entities - fields on other things In earlier versions of Drupal, the field system was only used on content types. Now, thanks to the Entity API, we can add fields to other things, like comments. Fieldable entities make Drupal eminently flexible. An entity type is a useful abstraction to group together fields. Below are the Entities in Drupal core: Nodes (content), Comments, Files, Taxonomy terms, Taxonomy vocabularies, Users - EVERYTHING IS AN ENTITY IN D8 (not all fieldable)
  • Form API - Quickly generating forms in code in Drupal - Add, modify forms (node/add) and admin forms
  • Entityforms - Turns forms into entities! - Same fields you use for content types 
  • Webform - A way to add forms quickly and easily to the site (ton of forms - not using same fields as content types, it’s own thing) (not to be confused with the Form API)

Example of using Form API

  • In the theme! We can do that!

Buzz - Frontend

  • Headless Drupal
  • Decoupled
  • Node.js
  • angularjs
  • Grunt
  • Gulp
  • Gossip, gossip, gossip
  • Headless Drupal / Decoupled - the concept of using drupal for the back-end (using some glue like Node.js, angularjs) and anything else for the the front-end - think iPhone App, Android App, some other crazy thing
  • Node.js, angularjs - powerful new systems in Javascript, for Drupal a way to glue front-end and back-end together
  • Grunt and Gulp - task managers for front-end developers (think watch sass, clear drush cache, reload browser without doing anything!)
  • Also to look into: Ruby, npm, rvm, bundle, package.json, etc.

Buzz - Back-end

  • Stack
  • Git
  • Varnish
  • New Relic
  • NoSQL 
  • Redis, MongoDB, Solr
  • Gossip, gossip, gossip
  • Stack - the full list of tools you use to do your development (Language, Web Framework, Database, App Server, Hosting, Testing, etc.)
  • Git - Version repositories, a way to pass things around for multiple developers
  • Varnish - reduces the load on a web server - caching HTTP reverse proxy
  • New Relic - a company with tools for web application performance
  • NoSQL - databases that don’t do tabular data, but are faster
  • Redis - key value data store (also speeds things up)

Buzz - Testing

  • Behat
  • CI (continuous integration)
  • Selenium
  • Saucelabs
  • Gossip, gossip, gossip
  • Behat - With BDD, you write human-readable stories that describe the behavior of your application. These stories can then be auto-tested against your application.
  • CI (Continuous Integration) - Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
  • Selenium - web browser automation tools
  • Saucelabs - a company with tools for taking screenshots, and running selenium tests automatically

There is so much help!

  • Drupal.org, Groups.drupal.org, IRC
  • Drupal.org infrastructure (well organized with all projects there)
  • d.o. & g.d.o.
  • IRC
  • drupal.org
  • groups.drupal.org

And you can help too!

  • Contributing, patches, peer reviews.
  • Patch
  • Release
  • rtbc - “reviewed and tested by the community” (used to be “ready to be committed”)
  • RC1 - release candidate 1
  • RC1 = release candidate 1 “release candidate”
  • alpha => beta => release candidate => official release
  • rtbc is a drupal term too
  • “reviewed and tested by the community” (used to be “ready to be committed”)

You learned a lot!
The list from the beginning, now making more sense!

  • Drupal
  • CMS
  • Core “Don’t Hack Core”
  • Modules
  • Themes
  • Contrib
  • Custom
  • Content Types
  • Node (s)
  • Views
  • Block
  • Beans
  • Taxonomy
  • Context
  • Features
  • Config Settings
  • Permissions
  • Drupal.org infrastructure (well organized with all projects there)
  • d.o. & g.d.o.
  • Patch
  • Release
  • rtbc
  • RC1
  • Entities
  • Hook
  • Webform (instead of just a form on the web)
  • Form API
  • Panels
  • Display Suite
  • View Modes
  • Wave at your presenter and get your questions ready.

Now, Get a Job!

You now know what to call your skill set.

  • Site Architect
  • Lead Developer
  • Drupal Developer
  • Creator
  • Maintainer
  • Contributor
  • Site Builder
  • Back-end Developers 
  • Front-End Developer
  • Themer
  • Content Manager
  • Content Creator
  • We Need More People

Good Work Today! Here’s a picture of a forest Forest Chibi Dragon Spirit.
Awww...
LisaToms.diviantart.com

But wait, there’s more...

Just for Reference...
Sites I used to make this presentation - good references.

So long, and thanks for all the fish!

Questions? I know I had many….
Have more questions?
Email us at:
answers@hook42.com