SlideShare a Scribd company logo
Features Everywhere!
           Feature Driven Development


By Jay Callicott
Mediacurrent Consultant
CapitalCamp 2011
July 22, 2011
Features Everywhere! Outline
• Part I - The Basics
  o About Features
  o About Jay
  o The Problem
  o The Solution
  o How to Create a Basic Feature
• Part 2 - Diving Deeper
  o Context & Features
  o Panels & Features
  o Adding stuff that isn't exportable
  o Feature Driven Development
  o Real World Examples!
About Features

• 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
• Who Uses Features?
  o Originally created by DevelopmentSeed
      Used extensively in OpenAtrium
  o Phase2
      Used extensively in OpenPublish
      Now maintained by Phase2
About Features
OpenAtrium
About Features
About Jay
• Mediacurrent Web Developer
• Developed Drupal sites since version 4.6
• Why Features?
  o Started using features in early 2010
  o Developed features extensively on a large OpenPublish-
    based multi-site installation, working with Phase2
  o Now use features on every site big and small
• OpenChurch distribution maintainer
  o Features used extensively
The Problem

• Drupal has many items in the database
   o Views
   o CCK Content types
   o Imagecache
   o Context
   o Panels
   o Settings
   o Permissions
• 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:
   o Work more in the „problem space‟
   o Encapsulation - Yes!
   o Backup - Yes!
   o Version Control - Yes!
   o Easier deployment
   o Code reuse!
   o A place for your form_alters and nodeapi() hooks
   o Drush integration

• And much, much more!
  o Replace (or supplement) install profiles!
      Features break an install into components
  o Create a distribution with drush .make
      (music site, newspaper site, govt, blog, etc)
How to Create a Feature

• Install and Enable the Following:
   o Features
   o Strongarm (important)
       Saves additional settings with your content types that
        would otherwise not get save
   o Context
       Recommended over admin/build/block
   o Diff (recommended, only on non-production
     environments)
       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
Context & Features

• http://drupal.org/project/context
• Context is used primarily for block
  placement (admin/build/block replacement)
• Exports to features out of the box




                      Screenshots next....
Context Example Screenshot
Adding Context to a Feature
Panels & Features

• Panels export to features easily
   o Falls under 'Panels' or 'Page Manager' in
     dropdown in components
• I like panels for node layouts!
   o (overriding page manager node template)




                        Screenshots next....
Panels Feature Example


context
placed
blocks
                          panel
                          regions &
                          views
Panels Feature Underneath...
Panel Feature Underneath




Using CCK, views, panel, strongarm
Adding a Panel to a Feature




            under "Panels" or "Page Manager"
How to export non-exportables
• Features doesn't export everything, but it's
  still a module!
• Next: simple example, creating a
  vocabulary with a feature
  o (Note: features_extra does this for you)
How to export non-exportables

                                   Using hook_install() &
                                   hook_uninstall()




• Anything you can do in a module you can do in a feature
Feature Driven Development
• My methodology (adapted from OpenAtrium,
  DevSeed, OpenPublish)
  o Create a feature for every content type
  o Package with any related views
  o Package panels and node template overrides!
  o Package relevant imagecache presets
  o Sometimes directly related permissions
  o Sometimes package related contexts
  o Place all related form_alters, nodeapi hooks,
    hook_menus(), etc in the .module file
• That's it!
Real World Examples!
• Seeing is believing, some (more) real world
  screenshots of feature lists
Real World List Screenshots
Real World List Screenshots
Real World List Screenshots
Real World Screenshots


The trend is I always
have at least 1
feature for each
content type
Wait! A couple last items to cover
•   Features Extra
•   Drush Make
•   Distributions with .make
•   Features Server
•   Share Features!
•   Drupal “Apps”(introduced by Ph2)
•   What about Drupal 7?
•   I'm a beginner – is this for me?
The End
Resources
• Features Project Page
   o http://drupal.org/project/features
• Features Extra Project Page
   o http://drupal.org/project/features_extra

Related
• From Zero to Distribution using Features, Profiler, and
  Drush Make
   o http://chicago2011.drupal.org/sessions/zero-
     distribution-using-features-profiler-and-drush-make

Hit me up on twitter: http://twitter.com/drupalninja/

Questions??

More Related Content

PDF
Drupal 8 Vocab Lesson
KEY
Let's dig into the Omega Theme!
PDF
Speed up Drupal development with Drush
PPTX
Drupalcampatl d7
PDF
Best Practice Site Architecture in Drupal 8
PPT
How a Content Delivery Network Can Help Speed Up Your Website
PDF
Everything You Need to Know About the Top Changes in Drupal 8
PDF
Drupal 8: frontend development
Drupal 8 Vocab Lesson
Let's dig into the Omega Theme!
Speed up Drupal development with Drush
Drupalcampatl d7
Best Practice Site Architecture in Drupal 8
How a Content Delivery Network Can Help Speed Up Your Website
Everything You Need to Know About the Top Changes in Drupal 8
Drupal 8: frontend development

What's hot (20)

PDF
Drupal 8 - A Brief Introduction
PDF
10 New Things You Can Do with Drupal 8 Out-of-the-Box
PPTX
Top 8 Improvements in Drupal 8
PDF
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
PDF
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
PDF
Composer & Drupal
PDF
Docker, Ansible and Symfony micro-kernel
PDF
[drupalday2017] - Speed-up your Drupal instance!
PDF
Lean Drupal Repositories with Composer and Drush
PDF
Development Workflow Tools for Open-Source PHP Libraries
PDF
Drupal Camp LA 2011: Typography modules for Drupal
PDF
DrupalCampLA 2011 - Drupal frontend-optimizing
PDF
Common Pitfalls for your Drupal Site, and How to Avoid Them
PPT
Taking your module from Drupal 6 to Drupal 7
PDF
Evolution of Drupal and the Drupal community
PPTX
WP-CLI - A Good Friend of Developer
PDF
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
PDF
"Paragraphs are more powerful than you can expect" from Vasily Jaremchuk for ...
PDF
Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...
PDF
Once upon a time, there were css, js and server-side rendering
Drupal 8 - A Brief Introduction
10 New Things You Can Do with Drupal 8 Out-of-the-Box
Top 8 Improvements in Drupal 8
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Composer & Drupal
Docker, Ansible and Symfony micro-kernel
[drupalday2017] - Speed-up your Drupal instance!
Lean Drupal Repositories with Composer and Drush
Development Workflow Tools for Open-Source PHP Libraries
Drupal Camp LA 2011: Typography modules for Drupal
DrupalCampLA 2011 - Drupal frontend-optimizing
Common Pitfalls for your Drupal Site, and How to Avoid Them
Taking your module from Drupal 6 to Drupal 7
Evolution of Drupal and the Drupal community
WP-CLI - A Good Friend of Developer
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
"Paragraphs are more powerful than you can expect" from Vasily Jaremchuk for ...
Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...
Once upon a time, there were css, js and server-side rendering
Ad

Viewers also liked (12)

PDF
Starting & growing a drupal based business- 6 valuable lessons i have learned
PDF
Cod preso
PPTX
Happiness is an Organized Case Queue - Drupalcamp Atlanta 2011
PPTX
Learning the Craft of Marketing and Selling Drupal Services
PPTX
Elegant CSS Design In Drupal: LESS vs Sass
PDF
Creating a Blog in Drupal 8 & Configuration API
PPTX
Drupal 8 Vocabulary Lesson
PPTX
One-hour Drupal 8 Theming
PDF
Business benefits of Drupal 8
PDF
Put the RFP Down
PDF
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
KEY
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...
Starting & growing a drupal based business- 6 valuable lessons i have learned
Cod preso
Happiness is an Organized Case Queue - Drupalcamp Atlanta 2011
Learning the Craft of Marketing and Selling Drupal Services
Elegant CSS Design In Drupal: LESS vs Sass
Creating a Blog in Drupal 8 & Configuration API
Drupal 8 Vocabulary Lesson
One-hour Drupal 8 Theming
Business benefits of Drupal 8
Put the RFP Down
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Learn Drupal's Most Powerful Site-Building Modules: Display Suite, Context, V...
Ad

Similar to Drupal Presentation for CapitalCamp 2011: Features Driven Development (20)

PDF
Features everywhere
PDF
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
PDF
Features++
ZIP
Using Features
ODP
Drupal distributions - how to build them
PDF
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
PDF
Drupal 8 - Build Week Update
PDF
WebObjects Developer Tools
PDF
Spark: Authoring Experience++ in Drupal 7, 8, and Beyond
PDF
Recipes for Drupal distributions
PDF
Next Step, Android Studio!
PPTX
Panopoly - Boulder DBUG 13 Nov 2013
PDF
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
PPTX
Git Going w/ Git
PDF
Desktop apps with node webkit
PDF
Improve Your IBM Domino Designer Experience
PDF
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
PDF
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
PPTX
O365 Developer Bootcamp NJ 2018 - Material
PPT
Drupal: an Overview
Features everywhere
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
Features++
Using Features
Drupal distributions - how to build them
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Drupal 8 - Build Week Update
WebObjects Developer Tools
Spark: Authoring Experience++ in Drupal 7, 8, and Beyond
Recipes for Drupal distributions
Next Step, Android Studio!
Panopoly - Boulder DBUG 13 Nov 2013
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
Git Going w/ Git
Desktop apps with node webkit
Improve Your IBM Domino Designer Experience
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
O365 Developer Bootcamp NJ 2018 - Material
Drupal: an Overview

More from Mediacurrent (20)

PDF
Penn State News: Pivoting to Decoupled Drupal with Gatsby
PDF
Evolving How We Measure Digital Success in Higher Ed
PDF
Penn State scales static Drupal to new heights
PDF
Delivering Meaningful Digital Experiences in Higher Ed
PDF
Content Strategy: Building Connections with Your Audience
PDF
Decoupled Drupal and Gatsby in the Real World
PDF
A Better Way to Build and Manage Sites with Rain for Drupal 9
PPTX
Drupal Security: What You Need to Know
PDF
Leveraging Design Systems to Streamline Web Projects
PPTX
Reimagining Your Higher Ed Web Strategy
PPTX
How to Digitally Transform Higher Ed with Drupal
PPTX
Is my website accessible? Common mistakes (and how to fix them)
PDF
Managing Images In Large Scale Drupal 8 & 9 Websites
PDF
Paragraphs v Layout Builder - The Final Showdown
PDF
MagMutual.com: On the JAMStack with Gatsby and Drupal 8
PDF
Creating an Organizational Culture of Giving Back to Drupal
PPTX
Level Up Your Team: Front-End Development Best Practices
PPTX
Best Practices for Moving to Drupal 9
PPTX
How to Prove Marketing ROI: Overcoming Digital Marketing Challenges
PDF
Prepare Your Drupal 9 Action Plan
Penn State News: Pivoting to Decoupled Drupal with Gatsby
Evolving How We Measure Digital Success in Higher Ed
Penn State scales static Drupal to new heights
Delivering Meaningful Digital Experiences in Higher Ed
Content Strategy: Building Connections with Your Audience
Decoupled Drupal and Gatsby in the Real World
A Better Way to Build and Manage Sites with Rain for Drupal 9
Drupal Security: What You Need to Know
Leveraging Design Systems to Streamline Web Projects
Reimagining Your Higher Ed Web Strategy
How to Digitally Transform Higher Ed with Drupal
Is my website accessible? Common mistakes (and how to fix them)
Managing Images In Large Scale Drupal 8 & 9 Websites
Paragraphs v Layout Builder - The Final Showdown
MagMutual.com: On the JAMStack with Gatsby and Drupal 8
Creating an Organizational Culture of Giving Back to Drupal
Level Up Your Team: Front-End Development Best Practices
Best Practices for Moving to Drupal 9
How to Prove Marketing ROI: Overcoming Digital Marketing Challenges
Prepare Your Drupal 9 Action Plan

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Approach and Philosophy of On baking technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Encapsulation theory and applications.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Cloud computing and distributed systems.
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Teaching material agriculture food technology
Approach and Philosophy of On baking technology
NewMind AI Weekly Chronicles - August'25 Week I
Diabetes mellitus diagnosis method based random forest with bat algorithm
Unlocking AI with Model Context Protocol (MCP)
Encapsulation theory and applications.pdf
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Cloud computing and distributed systems.
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Reach Out and Touch Someone: Haptics and Empathic Computing
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Network Security Unit 5.pdf for BCA BBA.
“AI and Expert System Decision Support & Business Intelligence Systems”
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Big Data Technologies - Introduction.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Per capita expenditure prediction using model stacking based on satellite ima...

Drupal Presentation for CapitalCamp 2011: Features Driven Development

  • 1. Features Everywhere! Feature Driven Development By Jay Callicott Mediacurrent Consultant CapitalCamp 2011 July 22, 2011
  • 2. Features Everywhere! Outline • Part I - The Basics o About Features o About Jay o The Problem o The Solution o How to Create a Basic Feature • Part 2 - Diving Deeper o Context & Features o Panels & Features o Adding stuff that isn't exportable o Feature Driven Development o Real World Examples!
  • 3. About Features • 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 • Who Uses Features? o Originally created by DevelopmentSeed  Used extensively in OpenAtrium o Phase2  Used extensively in OpenPublish  Now maintained by Phase2
  • 6. About Jay • Mediacurrent Web Developer • Developed Drupal sites since version 4.6 • Why Features? o Started using features in early 2010 o Developed features extensively on a large OpenPublish- based multi-site installation, working with Phase2 o Now use features on every site big and small • OpenChurch distribution maintainer o Features used extensively
  • 7. The Problem • Drupal has many items in the database o Views o CCK Content types o Imagecache o Context o Panels o Settings o Permissions • Moving these between environments is cumbersome • Backing these up is a pain • No version control • Developers can accidentally override each other's work
  • 8. The Solution - Features! • Features' Benefits: o Work more in the „problem space‟ o Encapsulation - Yes! o Backup - Yes! o Version Control - Yes! o Easier deployment o Code reuse! o A place for your form_alters and nodeapi() hooks o Drush integration • And much, much more! o Replace (or supplement) install profiles!  Features break an install into components o Create a distribution with drush .make  (music site, newspaper site, govt, blog, etc)
  • 9. How to Create a Feature • Install and Enable the Following: o Features o Strongarm (important)  Saves additional settings with your content types that would otherwise not get save o Context  Recommended over admin/build/block o Diff (recommended, only on non-production environments)  Can view differences in code
  • 10. How to Create a Feature Go to /admin/build/features (Sample screen)
  • 11. How to Create a Feature Go to /admin/build/features/create and add components
  • 12. How to Create a Feature Click download and save tar file to hard drive (this contains feature module files)
  • 13. How to Create a Feature Extract your feature folder to your project (screenshot showing 7zip on Windows 7)
  • 14. How to Create a Feature Add/commit to svn/git, svn up and enable on your Drupal site
  • 15. How to Create a Feature Your views, content types, etc will now be enabled, you have just deployed a feature!
  • 16. How to Create a Feature To update use drush features-update + svn commit to update your features or 'recreate' for additions (new views, etc)
  • 17. 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
  • 18. Context & Features • http://drupal.org/project/context • Context is used primarily for block placement (admin/build/block replacement) • Exports to features out of the box Screenshots next....
  • 20. Adding Context to a Feature
  • 21. Panels & Features • Panels export to features easily o Falls under 'Panels' or 'Page Manager' in dropdown in components • I like panels for node layouts! o (overriding page manager node template) Screenshots next....
  • 24. Panel Feature Underneath Using CCK, views, panel, strongarm
  • 25. Adding a Panel to a Feature under "Panels" or "Page Manager"
  • 26. How to export non-exportables • Features doesn't export everything, but it's still a module! • Next: simple example, creating a vocabulary with a feature o (Note: features_extra does this for you)
  • 27. How to export non-exportables Using hook_install() & hook_uninstall() • Anything you can do in a module you can do in a feature
  • 28. Feature Driven Development • My methodology (adapted from OpenAtrium, DevSeed, OpenPublish) o Create a feature for every content type o Package with any related views o Package panels and node template overrides! o Package relevant imagecache presets o Sometimes directly related permissions o Sometimes package related contexts o Place all related form_alters, nodeapi hooks, hook_menus(), etc in the .module file • That's it!
  • 29. Real World Examples! • Seeing is believing, some (more) real world screenshots of feature lists
  • 30. Real World List Screenshots
  • 31. Real World List Screenshots
  • 32. Real World List Screenshots
  • 33. Real World Screenshots The trend is I always have at least 1 feature for each content type
  • 34. Wait! A couple last items to cover • Features Extra • Drush Make • Distributions with .make • Features Server • Share Features! • Drupal “Apps”(introduced by Ph2) • What about Drupal 7? • I'm a beginner – is this for me?
  • 35. The End Resources • Features Project Page o http://drupal.org/project/features • Features Extra Project Page o http://drupal.org/project/features_extra Related • From Zero to Distribution using Features, Profiler, and Drush Make o http://chicago2011.drupal.org/sessions/zero- distribution-using-features-profiler-and-drush-make Hit me up on twitter: http://twitter.com/drupalninja/ Questions??