Features everywhere
Upcoming SlideShare
Loading in...5
×
 

Features everywhere

on

  • 1,968 views

Drupal feature-driven development. Creating resuable code using the 'Features' module.

Drupal feature-driven development. Creating resuable code using the 'Features' module.

Statistics

Views

Total Views
1,968
Views on SlideShare
1,748
Embed Views
220

Actions

Likes
1
Downloads
24
Comments
0

8 Embeds 220

http://www.mediacurrent.com 147
http://nextleveldrupal.local 21
http://mediacurrent.com 17
http://worldofdrupal.local 16
http://nextleveldrupal.com 14
http://mis-gryphon.mediacurrentstaging.info 3
http://static.slidesharecdn.com 1
http://webcache.googleusercontent.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Features everywhere Features everywhere Presentation Transcript

  • Features Everywhere! Feature Driven Development By Jay Callicott, Mediacurrent
  • Features Everywhere! Outline About Features The Problem The Solution How to Create a Feature Feature Driven Development
  • About Features Who Uses Features? Created by DevelopmentSeed Used extensively in OpenAtrium Phase2 Used extensively in OpenPublish Recommended Reading 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
  • The Problem Drupal has many items in the database Views CCK Content types Imagecache Context Settings Moving these between environments is cumbersome Backing these up is a pain No version control Developers can accidentally override each other's work
  • The Solution - Features! Features' Benefits: Work more in the ‘problem space’ Encapsulation - Yes! Backup - Yes! Version Control - Yes! Easier deployment Code reuse! A place for your form_alters and nodeapi() hooks Drush integration 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)
  • How To Create a Feature Install and Enable the Following: Features Strongarm (important) Saves additional settings with your content types that would otherwise not get save Context Recommended over admin/build/block Diff (recommended) Can view differences in code
  • How to Create a Feature Go to /admin/build/features (Sample screen)
  • How To Create a Feature Go to /admin/build/features/create and add components
  • How to Create a Feature Click download and save tar file to hard drive (this contains feature module files)
  • How to Create a Feature Extract your feature folder to your project (screenshot showing 7zip on Windows 7)
  • How to Create a Feature Add/commit to svn/git, svn up and enable on your Drupal site
  • How to Create a Feature Your views, content types, etc will now be enabled, you have just deployed a feature!
  • How to Create a Feature To update use drush features-update + svn commit to update your features or 'recreate' for additions (new views, etc)
  • 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
  • How to Create a Feature Add all your hooks to your .module file, e.g. form_alter(), nodeapi hooks, etc.
  • Feature Driven Development Kill the customcontent module Doesn't mean anything Isn't modular Create a 'Feature' for every feature on your Drupal site My methodology adapted from OpenAtrium, DevSeed, OpenPublish 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 That's it!
  • The End More Links/Resources: Features Project Page DevelopmentSeed Blog for updated information on Features Automating Drupal deployment with Drush and Features - Drupalcamp Austin Presentation by Adam Jensen and Adrian Rollett | UNT.edu