1. Features Everywhere!
Feature Driven Development
By Jay Callicott, Mediacurrent
2. Features Everywhere! Outline
How to Create a Feature
Feature Driven Development
3. About Features
Who Uses Features?
Created by DevelopmentSeed
Used extensively in OpenAtrium
Used extensively in OpenPublish
Managing and deploying configuration with exportables
and the Features module - DrupalCon presentation by
Jeff Miccolis of Development Seed
Making and Using Features in Drupal - Blog by Young
Hahn of Development Seed
4. The Problem
Drupal has many items in the database
CCK Content types
Moving these between environments is cumbersome
Backing these up is a pain
No version control
Developers can accidentally override each other's work
5. The Solution - Features!
Work more in the ‘problem space’
Encapsulation - Yes!
Backup - Yes!
Version Control - Yes!
A place for your form_alters and nodeapi() hooks
And much, much more!
Replace install profiles!
Features break an install into components
Create a distribution with drush .make
(music site, newspaper site, govt, blog, etc)
6. How To Create a Feature
Install and Enable the Following:
Saves additional settings with your content types that
would otherwise not get save
Recommended over admin/build/block
Can view differences in code
7. How to Create a Feature
Go to /admin/build/features
8. How To Create a Feature
Go to /admin/build/features/create and add components
9. How to Create a Feature
Click download and save tar file to hard drive (this contains
feature module files)
10. How to Create a Feature
Extract your feature folder to your project (screenshot showing
7zip on Windows 7)
11. How to Create a Feature
Add/commit to svn/git, svn up and enable on your Drupal site
12. How to Create a Feature
Your views, content types, etc will now be enabled, you have
just deployed a feature!
13. How to Create a Feature
To update use drush features-update + svn commit to update
your features or 'recreate' for additions (new views, etc)
14. How to Create a Feature
Revert components if you a) updated a feature on another
environment or b) want to restore a feature to it's original state
15. How to Create a Feature
Add all your hooks to your .module file, e.g. form_alter(),
nodeapi hooks, etc.
16. Feature Driven Development
Kill the customcontent module
Doesn't mean anything
Create a 'Feature' for every feature on your Drupal site
My methodology adapted from OpenAtrium, DevSeed,
Create a feature for every content type
Package with any related views
Package relevant imagecache presets
Sometimes directly related permissions
I package all context in it's own feature, but some
package related context in each feature
Place all related form_alters, nodeapi hooks,
hook_menus(), etc in the .module file
17. The End
Features Project Page
DevelopmentSeed Blog for updated information on
Automating Drupal deployment with Drush and Features -
Drupalcamp Austin Presentation by Adam Jensen and
Adrian Rollett | UNT.edu