SlideShare a Scribd company logo
USING FEATURES
        Badiu Alexandru




   So you’ll have more free time too


       Drupalcamp Bucharest 2011
MIGHT HAVE
HAPPENED TO YOU
• The dev – staging – production issue
• You build the site
• Client wants new stuff
• You build it on dev, passes staging
• Replicate on live site
• Write update functions, manual exporting of
  views, cck


             Drupalcamp Bucharest 2011
MIGHT HAVE
HAPPENED TO YOU
• The “I’ve done this before” issue
• You build some feature for client A
• Along comes client B who wants the same
  thing
• Take code, exported views, cck, push to dev
• Work
• Replicate on prod


             Drupalcamp Bucharest 2011
MIGHT HAVE
HAPPENED TO YOU
• The “Is there anyone editing file x.module?”
  issue
• You work on a large project
• Each dev pushes code to a repository or no
  repo at all
• What about database changes?
• Export views, cck and push them as well
• Make sure each dev imports stuff after each
  update

             Drupalcamp Bucharest 2011
MIGHT HAVE
HAPPENED TO YOU
• The “What the f**k do I do now?” issue
• Drupal is hard for beginners
• Lots of modules
• Building a feature requires multiple modules
  usually and some knowledge about them
• Drupal recipes are good



             Drupalcamp Bucharest 2011
DO YOU SEE A
       PATTERN?
• Wouldn’t it be nice if you had a repository of
  “modules” that create functionality a little
  bit more than “list all blog posts” or “have a
  block with latest promoted posts in category
  A”?
• Learn the open source way
• Instant gratification
• Uuuu, this is cool


              Drupalcamp Bucharest 2011
DO YOU SEE A
       PATTERN??
• Wouldn’t it be nice if you could avoid all the
  manual exporting and importing of new
  features / changes and just package
  functionality in a “module” that can be
  updated?
• Modules are code, code can be put into
  versioning control (and you should do it)
• Database changes can’t (easily)


              Drupalcamp Bucharest 2011
DO YOU SEE A
       PATTERN?

• Made some code or db changes?
• Just click to generate a new version of the
  “module“
• Check in, others check out, update is done
• Less wrinkles and teeth grinding




             Drupalcamp Bucharest 2011
SO WHAT IS THE
      PROBLEM?
• This is not necessarily a Drupal only
  problem
• It’s the nature of web development and the
  way we do it
• Coding != Site building
• If only products of site building could be
  exported…
• Oh wait


             Drupalcamp Bucharest 2011
SO WHAT IS THE
   PROBLEM?




   Drupalcamp Bucharest 2011
EXPORTAB
• Exportables are ways of, well, exporting
  things from Drupal into code bits
• Pioneered by Views, CCK is also using this
• Imagecache, Spaces, Context, Strongarm
• Is this enough?
• No, replication is still a… not a piece of cake
• Lots of missing modules (like taxonomy)


              Drupalcamp Bucharest 2011
MODULAR
• It can also help if your site functionality is
  broken into a modular design
• Like maybe prefixing presets and views with
  blog_ or joblistings_
• Or use image_blog_medium rather than
  image_blog_300x50
• Or have site_blog.module and
  site_listings.module rather than that gigantic
  site.module
• These are nice first steps

              Drupalcamp Bucharest 2011
MODULAR
• What about blocks?
• Block visibility: php code or list of pages? Both?
  Complex conditions?
• What about menus?
• I want this menu to appear when you’re on a blog
  post but I want this other menu to appear on
  listings.
• Sitewide conditions: this should appear only if
  none of the conditions for the other “sections” are
  met


               Drupalcamp Bucharest 2011
CONTEXT
•   Built by Development Seed
•   You create sections for your site
•   They are triggered by various conditions
•   They enable blocks, activate menus
•   They can be global
•   They can act as failbacks
•   They stack
•   http://drupal.org/project/context

                Drupalcamp Bucharest 2011
ALMOST
• We can organize “visual” bits and pieces of
  our site using contexts
• We can use the same organization to name
  the products of our various site building
  tools
• We can follow a modular approach when
  developing our modules
• If only we could package all these changes
  into a module.

             Drupalcamp Bucharest 2011
FEATURES
• The Features module does exactly that
• It takes different clues as to what you want
  to package
• There’s the manual way too (it’s not perfect)
• It exports automatically whatever it can (not
  all modules use exportables)
• It adds it’s magic
• Generates a “feature” which is actually a
  module

              Drupalcamp Bucharest 2011
FEATURES
• The module contains all the necessary bits and
  pieces about your views, content types, presets
  etc
• Contains code to activate them (create or update
  them) and deactivate them
• Knows about dependencies so it won’t break the
  site
• It’s a module so you can hack away
• Once you add more stuff: click click => new
  version of the module


               Drupalcamp Bucharest 2011
FEATURES
• It doesn’t use update functions
• But you can write your own
• Doesn’t script site building, uses
  exportables
• This means that not all modules work
• Menu and Taxonomy have issues
• Webform creates actual nodes
• Feed nodes, ToS and Privacy Policy pages
• UUID for content

             Drupalcamp Bucharest 2011
FEATURES
•   Context, Spaces, Boxes, Strongarm, Page
    Manager (CTools)
•   ImageCache
•   Views
•   http://drupal.org/taxonomy/term/11478
•   CCK, Content types, Input filters,
    Permissions

              Drupalcamp Bucharest 2011
YOUR
•   You have two options to integrate
•   CTools Export API (recommended)
•   Features hooks
•   Before that you might have to
    prepare


            Drupalcamp Bucharest 2011
SHARE
• A feature can be installed on any other site
  that has the required modules
• You can put it on d.org
• Features server: repository of features
• Internal or external
• Get notified of updates
• List of repos: http://groups.drupal.org/
  node/50278


              Drupalcamp Bucharest 2011
BASIC
• Simple demo
   We are going to build a blog feature
   Use a context to “group” it
   Create a content type for it
   Make it use a vocabulary
   Create a listing and a block using views
   Package it using Features
   Deploy it on another site


              Drupalcamp Bucharest 2011
BASIC
•   We’re going to use BuildKit
•   Drupal install profile with Features
•   drush make "http://drupalcode.org/
    project/buildkit.git/blob_plain/refs/
    tags/7.x-2.0-beta2:/distro.make"
    sitedir


             Drupalcamp Bucharest 2011
ADVANCE
• The next step: the Spaces module
• Again, Development Seed
• Makes a Drupal site act like multiple sites
• Makes features spaces aware: selective
  enabling of features on a per group basis




              Drupalcamp Bucharest 2011
RESOURCE
• http://drupal.org/project/features
• http://drupal.org/project/buildkit
• http://drupal.org/project/kit
• http://drupal.org/project/context
• http://drupal.org/project/spaces
• http://drupal.org/project/uuid_features
• http://groups.drupal.org/packaging-
  deployment
• http://developmentseed.org/tags/features

            Drupalcamp Bucharest 2011
THANK
   andu@ctrlz.ro
   http://ctrlz.ro




Drupalcamp Bucharest 2011

More Related Content

What's hot

OpenNTF Webinar, October 2020
OpenNTF Webinar, October 2020OpenNTF Webinar, October 2020
OpenNTF Webinar, October 2020
Howard Greenberg
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVC
Ulrich Krause
 
Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Untangling - fall2017 - week 7
Untangling - fall2017 - week 7
Derek Jacoby
 
Untangling - fall2017 - week6
Untangling - fall2017 - week6Untangling - fall2017 - week6
Untangling - fall2017 - week6
Derek Jacoby
 
Bootstrap4XPages
Bootstrap4XPagesBootstrap4XPages
Bootstrap4XPages
Teamstudio
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
Ulrich Krause
 
Drupal's competition
Drupal's competitionDrupal's competition
Drupal's competition
Angela Byron
 
Untangling - fall2017 - week5
Untangling - fall2017 - week5Untangling - fall2017 - week5
Untangling - fall2017 - week5
Derek Jacoby
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
Ulrich Krause
 
ILUG 2008 Templates, Templates Everywhere
ILUG 2008 Templates, Templates EverywhereILUG 2008 Templates, Templates Everywhere
ILUG 2008 Templates, Templates Everywhere
Kevin Pettitt
 
Evolution of Drupal and the Drupal community
Evolution of Drupal and the Drupal communityEvolution of Drupal and the Drupal community
Evolution of Drupal and the Drupal community
Angela Byron
 
Dd13.2013.milano.open ntf
Dd13.2013.milano.open ntfDd13.2013.milano.open ntf
Dd13.2013.milano.open ntf
Ulrich Krause
 
Upgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasUpgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and Gotchas
Suzanne Dergacheva
 
Chocolatey + Artifactory = A Sweet Solution for Managing Windows
Chocolatey + Artifactory = A Sweet Solution for Managing WindowsChocolatey + Artifactory = A Sweet Solution for Managing Windows
Chocolatey + Artifactory = A Sweet Solution for Managing Windows
Rob Reynolds
 
Site Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSite Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp Ottawa
Suzanne Dergacheva
 
OpenNTF Webinar, March, 2021
OpenNTF Webinar, March, 2021OpenNTF Webinar, March, 2021
OpenNTF Webinar, March, 2021
Howard Greenberg
 
Preventing Drupal Headaches: Establishing Flexible File Paths From The Start
Preventing Drupal Headaches: Establishing Flexible File Paths From The StartPreventing Drupal Headaches: Establishing Flexible File Paths From The Start
Preventing Drupal Headaches: Establishing Flexible File Paths From The Start
Acquia
 
Modern Software Management on Windows with Chocolatey and Puppet
Modern Software Management on Windows with Chocolatey and PuppetModern Software Management on Windows with Chocolatey and Puppet
Modern Software Management on Windows with Chocolatey and Puppet
Rob Reynolds
 
Drupal 8: Most common beginner mistakes
Drupal 8: Most common beginner mistakesDrupal 8: Most common beginner mistakes
Drupal 8: Most common beginner mistakes
Iztok Smolic
 
Software Management with PowerShell DSC and Chocolatey - PowerShell Summit 2017
Software Management with PowerShell DSC and Chocolatey - PowerShell Summit 2017Software Management with PowerShell DSC and Chocolatey - PowerShell Summit 2017
Software Management with PowerShell DSC and Chocolatey - PowerShell Summit 2017
Rob Reynolds
 

What's hot (20)

OpenNTF Webinar, October 2020
OpenNTF Webinar, October 2020OpenNTF Webinar, October 2020
OpenNTF Webinar, October 2020
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVC
 
Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Untangling - fall2017 - week 7
Untangling - fall2017 - week 7
 
Untangling - fall2017 - week6
Untangling - fall2017 - week6Untangling - fall2017 - week6
Untangling - fall2017 - week6
 
Bootstrap4XPages
Bootstrap4XPagesBootstrap4XPages
Bootstrap4XPages
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 
Drupal's competition
Drupal's competitionDrupal's competition
Drupal's competition
 
Untangling - fall2017 - week5
Untangling - fall2017 - week5Untangling - fall2017 - week5
Untangling - fall2017 - week5
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
 
ILUG 2008 Templates, Templates Everywhere
ILUG 2008 Templates, Templates EverywhereILUG 2008 Templates, Templates Everywhere
ILUG 2008 Templates, Templates Everywhere
 
Evolution of Drupal and the Drupal community
Evolution of Drupal and the Drupal communityEvolution of Drupal and the Drupal community
Evolution of Drupal and the Drupal community
 
Dd13.2013.milano.open ntf
Dd13.2013.milano.open ntfDd13.2013.milano.open ntf
Dd13.2013.milano.open ntf
 
Upgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and GotchasUpgrading to Drupal 8: Benefits and Gotchas
Upgrading to Drupal 8: Benefits and Gotchas
 
Chocolatey + Artifactory = A Sweet Solution for Managing Windows
Chocolatey + Artifactory = A Sweet Solution for Managing WindowsChocolatey + Artifactory = A Sweet Solution for Managing Windows
Chocolatey + Artifactory = A Sweet Solution for Managing Windows
 
Site Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSite Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp Ottawa
 
OpenNTF Webinar, March, 2021
OpenNTF Webinar, March, 2021OpenNTF Webinar, March, 2021
OpenNTF Webinar, March, 2021
 
Preventing Drupal Headaches: Establishing Flexible File Paths From The Start
Preventing Drupal Headaches: Establishing Flexible File Paths From The StartPreventing Drupal Headaches: Establishing Flexible File Paths From The Start
Preventing Drupal Headaches: Establishing Flexible File Paths From The Start
 
Modern Software Management on Windows with Chocolatey and Puppet
Modern Software Management on Windows with Chocolatey and PuppetModern Software Management on Windows with Chocolatey and Puppet
Modern Software Management on Windows with Chocolatey and Puppet
 
Drupal 8: Most common beginner mistakes
Drupal 8: Most common beginner mistakesDrupal 8: Most common beginner mistakes
Drupal 8: Most common beginner mistakes
 
Software Management with PowerShell DSC and Chocolatey - PowerShell Summit 2017
Software Management with PowerShell DSC and Chocolatey - PowerShell Summit 2017Software Management with PowerShell DSC and Chocolatey - PowerShell Summit 2017
Software Management with PowerShell DSC and Chocolatey - PowerShell Summit 2017
 

Similar to Using Features

Last Call Media Drupal 8 Case Study
Last Call Media Drupal 8 Case StudyLast Call Media Drupal 8 Case Study
Last Call Media Drupal 8 Case Study
Design for Drupal, Boston
 
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentDrupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Mediacurrent
 
Drupal 8 deeper dive
Drupal 8 deeper diveDrupal 8 deeper dive
Drupal 8 deeper dive
Amazee Labs
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8
Acquia
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 version
David Lanier
 
Dipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module DevelopmentDipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module Development
Suzanne Dergacheva
 
Drupal 8 - Build Week Update
Drupal 8 - Build Week UpdateDrupal 8 - Build Week Update
Drupal 8 - Build Week Update
Angela Byron
 
Top modules
Top modulesTop modules
Top modules
jhamiltoorion
 
Creating a Reusable Drupal Website for Higher Education - Webinar
Creating a Reusable Drupal Website for Higher Education - WebinarCreating a Reusable Drupal Website for Higher Education - Webinar
Creating a Reusable Drupal Website for Higher Education - Webinar
Suzanne Dergacheva
 
Panopoly - Boulder DBUG 13 Nov 2013
Panopoly - Boulder DBUG 13 Nov 2013Panopoly - Boulder DBUG 13 Nov 2013
Panopoly - Boulder DBUG 13 Nov 2013
Robert Dickert
 
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
camp_drupal_ua
 
Phase2 Large Drupal Multisites (gta case study)
Phase2   Large Drupal Multisites (gta case study)Phase2   Large Drupal Multisites (gta case study)
Phase2 Large Drupal Multisites (gta case study)
Phase2
 
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech DayCreating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
Suzanne Dergacheva
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 module
tedbow
 
Fastest Way to DRUPAL
Fastest Way to DRUPALFastest Way to DRUPAL
Fastest Way to DRUPAL
Brahm
 
Top 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectTop 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal project
Iztok Smolic
 
Features, Exportables & You
Features, Exportables & YouFeatures, Exportables & You
Features, Exportables & You
jskulski
 
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
Eric Sembrat
 
Agile sites2
Agile sites2Agile sites2
Agile sites2
Michele Sciabarrà
 
Staging and Deployment
Staging and DeploymentStaging and Deployment
Staging and Deployment
heyrocker
 

Similar to Using Features (20)

Last Call Media Drupal 8 Case Study
Last Call Media Drupal 8 Case StudyLast Call Media Drupal 8 Case Study
Last Call Media Drupal 8 Case Study
 
Drupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven DevelopmentDrupal Presentation for CapitalCamp 2011: Features Driven Development
Drupal Presentation for CapitalCamp 2011: Features Driven Development
 
Drupal 8 deeper dive
Drupal 8 deeper diveDrupal 8 deeper dive
Drupal 8 deeper dive
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 version
 
Dipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module DevelopmentDipping Your Toe into Drupal 8 Module Development
Dipping Your Toe into Drupal 8 Module Development
 
Drupal 8 - Build Week Update
Drupal 8 - Build Week UpdateDrupal 8 - Build Week Update
Drupal 8 - Build Week Update
 
Top modules
Top modulesTop modules
Top modules
 
Creating a Reusable Drupal Website for Higher Education - Webinar
Creating a Reusable Drupal Website for Higher Education - WebinarCreating a Reusable Drupal Website for Higher Education - Webinar
Creating a Reusable Drupal Website for Higher Education - Webinar
 
Panopoly - Boulder DBUG 13 Nov 2013
Panopoly - Boulder DBUG 13 Nov 2013Panopoly - Boulder DBUG 13 Nov 2013
Panopoly - Boulder DBUG 13 Nov 2013
 
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
 
Phase2 Large Drupal Multisites (gta case study)
Phase2   Large Drupal Multisites (gta case study)Phase2   Large Drupal Multisites (gta case study)
Phase2 Large Drupal Multisites (gta case study)
 
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech DayCreating a Reusable Drupal Website for Higher Education - at USG Tech Day
Creating a Reusable Drupal Website for Higher Education - at USG Tech Day
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 module
 
Fastest Way to DRUPAL
Fastest Way to DRUPALFastest Way to DRUPAL
Fastest Way to DRUPAL
 
Top 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal projectTop 20 mistakes you will make on your 1st Drupal project
Top 20 mistakes you will make on your 1st Drupal project
 
Features, Exportables & You
Features, Exportables & YouFeatures, Exportables & You
Features, Exportables & You
 
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
 
Agile sites2
Agile sites2Agile sites2
Agile sites2
 
Staging and Deployment
Staging and DeploymentStaging and Deployment
Staging and Deployment
 

More from Alexandru Badiu

Behavior Driven Development with Drupal
Behavior Driven Development with DrupalBehavior Driven Development with Drupal
Behavior Driven Development with Drupal
Alexandru Badiu
 
Drupal 8
Drupal 8Drupal 8
Drupal 8
Alexandru Badiu
 
Drupal as a first class mobile platform
Drupal as a first class mobile platformDrupal as a first class mobile platform
Drupal as a first class mobile platform
Alexandru Badiu
 
Cloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloudCloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloud
Alexandru Badiu
 
REST Drupal
REST DrupalREST Drupal
REST Drupal
Alexandru Badiu
 
Cloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloudCloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloud
Alexandru Badiu
 
Learning the basics of the Drupal API
Learning the basics of the Drupal APILearning the basics of the Drupal API
Learning the basics of the Drupal API
Alexandru Badiu
 
What's new in the Drupal 7 API?
What's new in the Drupal 7 API?What's new in the Drupal 7 API?
What's new in the Drupal 7 API?
Alexandru Badiu
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhone
Alexandru Badiu
 
Publish and Subscribe
Publish and SubscribePublish and Subscribe
Publish and Subscribe
Alexandru Badiu
 
Using Features
Using FeaturesUsing Features
Using Features
Alexandru Badiu
 
Concepte de programare functionala in Javascript
Concepte de programare functionala in JavascriptConcepte de programare functionala in Javascript
Concepte de programare functionala in Javascript
Alexandru Badiu
 
Drupal and Solr
Drupal and SolrDrupal and Solr
Drupal and Solr
Alexandru Badiu
 
Prezentare Wurbe
Prezentare WurbePrezentare Wurbe
Prezentare Wurbe
Alexandru Badiu
 

More from Alexandru Badiu (14)

Behavior Driven Development with Drupal
Behavior Driven Development with DrupalBehavior Driven Development with Drupal
Behavior Driven Development with Drupal
 
Drupal 8
Drupal 8Drupal 8
Drupal 8
 
Drupal as a first class mobile platform
Drupal as a first class mobile platformDrupal as a first class mobile platform
Drupal as a first class mobile platform
 
Cloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloudCloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloud
 
REST Drupal
REST DrupalREST Drupal
REST Drupal
 
Cloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloudCloud to the rescue? How I learned to stop worrying and love the cloud
Cloud to the rescue? How I learned to stop worrying and love the cloud
 
Learning the basics of the Drupal API
Learning the basics of the Drupal APILearning the basics of the Drupal API
Learning the basics of the Drupal API
 
What's new in the Drupal 7 API?
What's new in the Drupal 7 API?What's new in the Drupal 7 API?
What's new in the Drupal 7 API?
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhone
 
Publish and Subscribe
Publish and SubscribePublish and Subscribe
Publish and Subscribe
 
Using Features
Using FeaturesUsing Features
Using Features
 
Concepte de programare functionala in Javascript
Concepte de programare functionala in JavascriptConcepte de programare functionala in Javascript
Concepte de programare functionala in Javascript
 
Drupal and Solr
Drupal and SolrDrupal and Solr
Drupal and Solr
 
Prezentare Wurbe
Prezentare WurbePrezentare Wurbe
Prezentare Wurbe
 

Recently uploaded

Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 

Recently uploaded (20)

Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 

Using Features

  • 1. USING FEATURES Badiu Alexandru So you’ll have more free time too Drupalcamp Bucharest 2011
  • 2. MIGHT HAVE HAPPENED TO YOU • The dev – staging – production issue • You build the site • Client wants new stuff • You build it on dev, passes staging • Replicate on live site • Write update functions, manual exporting of views, cck Drupalcamp Bucharest 2011
  • 3. MIGHT HAVE HAPPENED TO YOU • The “I’ve done this before” issue • You build some feature for client A • Along comes client B who wants the same thing • Take code, exported views, cck, push to dev • Work • Replicate on prod Drupalcamp Bucharest 2011
  • 4. MIGHT HAVE HAPPENED TO YOU • The “Is there anyone editing file x.module?” issue • You work on a large project • Each dev pushes code to a repository or no repo at all • What about database changes? • Export views, cck and push them as well • Make sure each dev imports stuff after each update Drupalcamp Bucharest 2011
  • 5. MIGHT HAVE HAPPENED TO YOU • The “What the f**k do I do now?” issue • Drupal is hard for beginners • Lots of modules • Building a feature requires multiple modules usually and some knowledge about them • Drupal recipes are good Drupalcamp Bucharest 2011
  • 6. DO YOU SEE A PATTERN? • Wouldn’t it be nice if you had a repository of “modules” that create functionality a little bit more than “list all blog posts” or “have a block with latest promoted posts in category A”? • Learn the open source way • Instant gratification • Uuuu, this is cool Drupalcamp Bucharest 2011
  • 7. DO YOU SEE A PATTERN?? • Wouldn’t it be nice if you could avoid all the manual exporting and importing of new features / changes and just package functionality in a “module” that can be updated? • Modules are code, code can be put into versioning control (and you should do it) • Database changes can’t (easily) Drupalcamp Bucharest 2011
  • 8. DO YOU SEE A PATTERN? • Made some code or db changes? • Just click to generate a new version of the “module“ • Check in, others check out, update is done • Less wrinkles and teeth grinding Drupalcamp Bucharest 2011
  • 9. SO WHAT IS THE PROBLEM? • This is not necessarily a Drupal only problem • It’s the nature of web development and the way we do it • Coding != Site building • If only products of site building could be exported… • Oh wait Drupalcamp Bucharest 2011
  • 10. SO WHAT IS THE PROBLEM? Drupalcamp Bucharest 2011
  • 11. EXPORTAB • Exportables are ways of, well, exporting things from Drupal into code bits • Pioneered by Views, CCK is also using this • Imagecache, Spaces, Context, Strongarm • Is this enough? • No, replication is still a… not a piece of cake • Lots of missing modules (like taxonomy) Drupalcamp Bucharest 2011
  • 12. MODULAR • It can also help if your site functionality is broken into a modular design • Like maybe prefixing presets and views with blog_ or joblistings_ • Or use image_blog_medium rather than image_blog_300x50 • Or have site_blog.module and site_listings.module rather than that gigantic site.module • These are nice first steps Drupalcamp Bucharest 2011
  • 13. MODULAR • What about blocks? • Block visibility: php code or list of pages? Both? Complex conditions? • What about menus? • I want this menu to appear when you’re on a blog post but I want this other menu to appear on listings. • Sitewide conditions: this should appear only if none of the conditions for the other “sections” are met Drupalcamp Bucharest 2011
  • 14. CONTEXT • Built by Development Seed • You create sections for your site • They are triggered by various conditions • They enable blocks, activate menus • They can be global • They can act as failbacks • They stack • http://drupal.org/project/context Drupalcamp Bucharest 2011
  • 15. ALMOST • We can organize “visual” bits and pieces of our site using contexts • We can use the same organization to name the products of our various site building tools • We can follow a modular approach when developing our modules • If only we could package all these changes into a module. Drupalcamp Bucharest 2011
  • 16. FEATURES • The Features module does exactly that • It takes different clues as to what you want to package • There’s the manual way too (it’s not perfect) • It exports automatically whatever it can (not all modules use exportables) • It adds it’s magic • Generates a “feature” which is actually a module Drupalcamp Bucharest 2011
  • 17. FEATURES • The module contains all the necessary bits and pieces about your views, content types, presets etc • Contains code to activate them (create or update them) and deactivate them • Knows about dependencies so it won’t break the site • It’s a module so you can hack away • Once you add more stuff: click click => new version of the module Drupalcamp Bucharest 2011
  • 18. FEATURES • It doesn’t use update functions • But you can write your own • Doesn’t script site building, uses exportables • This means that not all modules work • Menu and Taxonomy have issues • Webform creates actual nodes • Feed nodes, ToS and Privacy Policy pages • UUID for content Drupalcamp Bucharest 2011
  • 19. FEATURES • Context, Spaces, Boxes, Strongarm, Page Manager (CTools) • ImageCache • Views • http://drupal.org/taxonomy/term/11478 • CCK, Content types, Input filters, Permissions Drupalcamp Bucharest 2011
  • 20. YOUR • You have two options to integrate • CTools Export API (recommended) • Features hooks • Before that you might have to prepare Drupalcamp Bucharest 2011
  • 21. SHARE • A feature can be installed on any other site that has the required modules • You can put it on d.org • Features server: repository of features • Internal or external • Get notified of updates • List of repos: http://groups.drupal.org/ node/50278 Drupalcamp Bucharest 2011
  • 22. BASIC • Simple demo  We are going to build a blog feature  Use a context to “group” it  Create a content type for it  Make it use a vocabulary  Create a listing and a block using views  Package it using Features  Deploy it on another site Drupalcamp Bucharest 2011
  • 23. BASIC • We’re going to use BuildKit • Drupal install profile with Features • drush make "http://drupalcode.org/ project/buildkit.git/blob_plain/refs/ tags/7.x-2.0-beta2:/distro.make" sitedir Drupalcamp Bucharest 2011
  • 24. ADVANCE • The next step: the Spaces module • Again, Development Seed • Makes a Drupal site act like multiple sites • Makes features spaces aware: selective enabling of features on a per group basis Drupalcamp Bucharest 2011
  • 25. RESOURCE • http://drupal.org/project/features • http://drupal.org/project/buildkit • http://drupal.org/project/kit • http://drupal.org/project/context • http://drupal.org/project/spaces • http://drupal.org/project/uuid_features • http://groups.drupal.org/packaging- deployment • http://developmentseed.org/tags/features Drupalcamp Bucharest 2011
  • 26. THANK andu@ctrlz.ro http://ctrlz.ro Drupalcamp Bucharest 2011

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n