SlideShare a Scribd company logo
1 of 29
Features,
Exportables & You


Jon Skulski
Drupal Architect, ChapterThree LLC
jon@chapterthree.com
http://www.chapterthree.com/blog/jon_skulski
Features
        http://www.drupal.org/project/features



•   by Development Seed

•   organize Components
    into Features

•   export DB Site
    Configuration to Code
Features
               what makes a feature, mr. lebowski?

•   views

•   panels

•   content types

•   drupal variables (strongarm)

•   contexts

•   spaces

•   menu items

•   imagecache presets

•   your custom code (it is a module)
Blog
                 a typical Drupal use case



•   a Content Type to save
    the data. blog_entry

•   a View to display the
    blog entries. blog

•   a Panel Variant to display
    the node. node_view
DEMO
see it in action
State of the Union
what works in features, what needs work
Works Wonderfully
    extensive use and little to no problems




• Views
• :-
Works OK
     known problems, known workarounds

• CCK/Content Types
 • basic use case is solid.
 • #693944 - field weighting of non-CCK
    fields is suspect. use form_alter.
 • #649298 - field removal doesn’t work.
    use hook_update.
 • #480978 - fieldsets need manual feature
    revert. so do it.
Works OK
     known problems, known workarounds



• Panels/Page Manager/CTools
 • basic use case is solid.
 • #740074 - multiple (i.e. node view)
    variants across separate features is
    broken. manually change the page manager
    handler name.
Works OK
     known problems, known workarounds




• Variables / Strongarm
 • basic use case is solid.
 • nothing specific, just suspect. sometimes
    it seems like variables don’t get included.
    Be careful and check your work.
Works OK
     known problems, known workarounds




• drush features-update
 • using drush has sometimes failed to
    include new files in the feature. use the
    download button in admin/build/features.
Broken :-(
  known problems, unknown workarounds



• Dependencies
 • basic use case is solid.
 • #649604 adding new dependencies
    leads to a race condition. use
    hook_update & drupal_install_modules()
    to enforce a dependencies.
Broken :-(
  known problems, unknown workarounds




• Taxonomy
 • no default hook
Broken :-(
  known problems, unknown workarounds



• Anything without a Default Hook
 • A default hook is a pattern in drupal
    that allows code to add objects like
    views, content types, etc.
  • By design, features uses default hooks.
    So anything without one isn’t going to
    work. Use exportables...
Exportables
      http://www.drupal.org/project/exportables


•   by jazzslider & dmitrig01

•   provides an API for
    adding Default Hook-ish
    Functionality

•   allows DB Site
    Configuration to be
    exported to Code
Exportables
       never send a human to do a machine’s job


•   allows an exportable to give a machine name to the
    nameless

•   maintains a link between the sequential ID and the
    declared machine name

•   pays attention to changes in the database versus our
    default code

•   pretty good at caching the right stuff
Exportables
       never send a human to do a machine’s job


•   hook_exportables allows us to define the default, load, save,
    delete functions our exportable will use

•   exportables_sync uses the default, load and save functions to
    add our exportable to the database

•   exportables_unsync uses the delete function to remove our
    exportable from the database

•   i’ll get to a real example in a minute...
Exportables
never send a human to do a machine’s job

       So we can use this export
             taxonomies!
Exportables
never send a human to do a machine’s job




               Well, no.
Exportables
never send a human to do a machine’s job
Exportables
        never send a human to do a machine’s job




Taxonomies use sequential IDs and exportables allow
   us to link that to a machine name. So what’s the
                        problem?
Exportables
never send a human to do a machine’s job


   Views filters in code look like:
Exportables
never send a human to do a machine’s job


     Which translates into this:
Exportables
         never send a human to do a machine’s job




 So what happens when you push a new feature and it
installs the vocabulary at VID = 18 because a client had
                created new vocabularies?
Exportables
never send a human to do a machine’s job
Case Study:
    Reserved Taxonomy
•   Reserved Taxonomy solves this problem by giving developers an
    exportable with feature integration to install vocabularies and
    terms at specific vocabulary IDs and term IDs

•   The idea is that you set aside a block of IDs for your terms
    and vocabularies. More than you will ever need. Say, 1-100000.
    Then any terms that the clients or you add later will start at
    1000001.

•   That way if you need to add more later, you can without
    conflicts.
CODE
see it in motion
Questions?
Comments? Experiences?
Thanks!


Jon Skulski
Drupal Architect, ChapterThree LLC
jon@chapterthree.com / jonskulski

More Related Content

What's hot

In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataStacy London
 
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Max Andersen
 
Command Box ColdFusion Package Manager, Automation
Command Box ColdFusion Package Manager, AutomationCommand Box ColdFusion Package Manager, Automation
Command Box ColdFusion Package Manager, AutomationColdFusionConference
 
Git and Github - a 90 Minute interactive workshop
Git and Github - a 90 Minute interactive workshopGit and Github - a 90 Minute interactive workshop
Git and Github - a 90 Minute interactive workshopBram Luyten
 
Play framework: lessons learned
Play framework: lessons learnedPlay framework: lessons learned
Play framework: lessons learnedPeter Hilton
 
Integration Testing With Cucumber How To Test Anything J A O O 2009
Integration Testing With  Cucumber    How To Test Anything    J A O O 2009Integration Testing With  Cucumber    How To Test Anything    J A O O 2009
Integration Testing With Cucumber How To Test Anything J A O O 2009Dr Nic Williams
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressRami Sayar
 
Dev112 let's calendar that
Dev112   let's calendar thatDev112   let's calendar that
Dev112 let's calendar thatHoward Greenberg
 
BP204 It's Not Infernal: Dante's Nine Circles of XPages Heaven
BP204 It's Not Infernal: Dante's Nine Circles of XPages HeavenBP204 It's Not Infernal: Dante's Nine Circles of XPages Heaven
BP204 It's Not Infernal: Dante's Nine Circles of XPages HeavenMichael McGarel
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationNicolas Fränkel
 
Telosys project booster Paris Open Source Summit 2019
Telosys project booster Paris Open Source Summit 2019Telosys project booster Paris Open Source Summit 2019
Telosys project booster Paris Open Source Summit 2019Laurent Guérin
 
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi   SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi Sencha
 
Servlets made easy. 
Write once and run everywhere.
Servlets made easy. 
Write once and run everywhere.Servlets made easy. 
Write once and run everywhere.
Servlets made easy. 
Write once and run everywhere.ICON UK EVENTS Limited
 
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages HeavenIBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages HeavenPaul Withers
 
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...Sencha
 
Play framework 2 : Peter Hilton
Play framework 2 : Peter HiltonPlay framework 2 : Peter Hilton
Play framework 2 : Peter HiltonJAX London
 
Dr. Strangelove, or how I learned to love plugin development
Dr. Strangelove, or how I learned to love plugin developmentDr. Strangelove, or how I learned to love plugin development
Dr. Strangelove, or how I learned to love plugin developmentUlrich Krause
 

What's hot (20)

In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
 
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
 
Command Box ColdFusion Package Manager, Automation
Command Box ColdFusion Package Manager, AutomationCommand Box ColdFusion Package Manager, Automation
Command Box ColdFusion Package Manager, Automation
 
ColdFusion builder plugins
ColdFusion builder pluginsColdFusion builder plugins
ColdFusion builder plugins
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
Git and Github - a 90 Minute interactive workshop
Git and Github - a 90 Minute interactive workshopGit and Github - a 90 Minute interactive workshop
Git and Github - a 90 Minute interactive workshop
 
Play framework: lessons learned
Play framework: lessons learnedPlay framework: lessons learned
Play framework: lessons learned
 
Integration Testing With Cucumber How To Test Anything J A O O 2009
Integration Testing With  Cucumber    How To Test Anything    J A O O 2009Integration Testing With  Cucumber    How To Test Anything    J A O O 2009
Integration Testing With Cucumber How To Test Anything J A O O 2009
 
Here Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPressHere Be Dragons - Debugging WordPress
Here Be Dragons - Debugging WordPress
 
Dev112 let's calendar that
Dev112   let's calendar thatDev112   let's calendar that
Dev112 let's calendar that
 
Keep Applications Online
Keep Applications OnlineKeep Applications Online
Keep Applications Online
 
BP204 It's Not Infernal: Dante's Nine Circles of XPages Heaven
BP204 It's Not Infernal: Dante's Nine Circles of XPages HeavenBP204 It's Not Infernal: Dante's Nine Circles of XPages Heaven
BP204 It's Not Infernal: Dante's Nine Circles of XPages Heaven
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
 
Telosys project booster Paris Open Source Summit 2019
Telosys project booster Paris Open Source Summit 2019Telosys project booster Paris Open Source Summit 2019
Telosys project booster Paris Open Source Summit 2019
 
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi   SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
 
Servlets made easy. 
Write once and run everywhere.
Servlets made easy. 
Write once and run everywhere.Servlets made easy. 
Write once and run everywhere.
Servlets made easy. 
Write once and run everywhere.
 
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages HeavenIBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
 
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
 
Play framework 2 : Peter Hilton
Play framework 2 : Peter HiltonPlay framework 2 : Peter Hilton
Play framework 2 : Peter Hilton
 
Dr. Strangelove, or how I learned to love plugin development
Dr. Strangelove, or how I learned to love plugin developmentDr. Strangelove, or how I learned to love plugin development
Dr. Strangelove, or how I learned to love plugin development
 

Similar to Features, Exportables & You

Staging and Deployment
Staging and DeploymentStaging and Deployment
Staging and Deploymentheyrocker
 
Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013Mikael Svenson
 
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011camp_drupal_ua
 
Customizing ERModernLook Applications
Customizing ERModernLook ApplicationsCustomizing ERModernLook Applications
Customizing ERModernLook ApplicationsWO Community
 
JSLink for ITPros - SharePoint Saturday Jersey
JSLink for ITPros - SharePoint Saturday JerseyJSLink for ITPros - SharePoint Saturday Jersey
JSLink for ITPros - SharePoint Saturday JerseyPaul Hunt
 
Web Components
Web ComponentsWeb Components
Web ComponentsFITC
 
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!Lorenzo Barbieri
 
A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5SSW
 
SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"Inhacking
 
Wessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdf
Wessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdfWessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdf
Wessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdfWessel Loth
 
The Basic Concept Of IOC
The Basic Concept Of IOCThe Basic Concept Of IOC
The Basic Concept Of IOCCarl Lu
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your WebsiteAcquia
 
Namespace less engine
Namespace less engineNamespace less engine
Namespace less engineshaokun
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Dutyreedmaniac
 
Sync Workitems between multiple Team Projects #vssatpn
Sync Workitems between multiple Team Projects #vssatpnSync Workitems between multiple Team Projects #vssatpn
Sync Workitems between multiple Team Projects #vssatpnLorenzo Barbieri
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedGil Fink
 

Similar to Features, Exportables & You (20)

Staging and Deployment
Staging and DeploymentStaging and Deployment
Staging and Deployment
 
Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013
 
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011
 
Customizing ERModernLook Applications
Customizing ERModernLook ApplicationsCustomizing ERModernLook Applications
Customizing ERModernLook Applications
 
JSLink for ITPros - SharePoint Saturday Jersey
JSLink for ITPros - SharePoint Saturday JerseyJSLink for ITPros - SharePoint Saturday Jersey
JSLink for ITPros - SharePoint Saturday Jersey
 
Web Components
Web ComponentsWeb Components
Web Components
 
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
 
A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5
 
SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"
 
Alex Theedom Java ee revisits design patterns
Alex Theedom	Java ee revisits design patternsAlex Theedom	Java ee revisits design patterns
Alex Theedom Java ee revisits design patterns
 
Wessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdf
Wessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdfWessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdf
Wessel Loth - Fire your Frontend Framework with Lit - TEQnation 2022.pdf
 
The Basic Concept Of IOC
The Basic Concept Of IOCThe Basic Concept Of IOC
The Basic Concept Of IOC
 
Using Features
Using FeaturesUsing Features
Using Features
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your Website
 
Namespace less engine
Namespace less engineNamespace less engine
Namespace less engine
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 
Sync Workitems between multiple Team Projects #vssatpn
Sync Workitems between multiple Team Projects #vssatpnSync Workitems between multiple Team Projects #vssatpn
Sync Workitems between multiple Team Projects #vssatpn
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
 
SDWest2005Goetsch
SDWest2005GoetschSDWest2005Goetsch
SDWest2005Goetsch
 

Recently uploaded

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Features, Exportables & You

  • 1. Features, Exportables & You Jon Skulski Drupal Architect, ChapterThree LLC jon@chapterthree.com http://www.chapterthree.com/blog/jon_skulski
  • 2. Features http://www.drupal.org/project/features • by Development Seed • organize Components into Features • export DB Site Configuration to Code
  • 3. Features what makes a feature, mr. lebowski? • views • panels • content types • drupal variables (strongarm) • contexts • spaces • menu items • imagecache presets • your custom code (it is a module)
  • 4. Blog a typical Drupal use case • a Content Type to save the data. blog_entry • a View to display the blog entries. blog • a Panel Variant to display the node. node_view
  • 5. DEMO see it in action
  • 6. State of the Union what works in features, what needs work
  • 7. Works Wonderfully extensive use and little to no problems • Views • :-
  • 8. Works OK known problems, known workarounds • CCK/Content Types • basic use case is solid. • #693944 - field weighting of non-CCK fields is suspect. use form_alter. • #649298 - field removal doesn’t work. use hook_update. • #480978 - fieldsets need manual feature revert. so do it.
  • 9. Works OK known problems, known workarounds • Panels/Page Manager/CTools • basic use case is solid. • #740074 - multiple (i.e. node view) variants across separate features is broken. manually change the page manager handler name.
  • 10. Works OK known problems, known workarounds • Variables / Strongarm • basic use case is solid. • nothing specific, just suspect. sometimes it seems like variables don’t get included. Be careful and check your work.
  • 11. Works OK known problems, known workarounds • drush features-update • using drush has sometimes failed to include new files in the feature. use the download button in admin/build/features.
  • 12. Broken :-( known problems, unknown workarounds • Dependencies • basic use case is solid. • #649604 adding new dependencies leads to a race condition. use hook_update & drupal_install_modules() to enforce a dependencies.
  • 13. Broken :-( known problems, unknown workarounds • Taxonomy • no default hook
  • 14. Broken :-( known problems, unknown workarounds • Anything without a Default Hook • A default hook is a pattern in drupal that allows code to add objects like views, content types, etc. • By design, features uses default hooks. So anything without one isn’t going to work. Use exportables...
  • 15. Exportables http://www.drupal.org/project/exportables • by jazzslider & dmitrig01 • provides an API for adding Default Hook-ish Functionality • allows DB Site Configuration to be exported to Code
  • 16. Exportables never send a human to do a machine’s job • allows an exportable to give a machine name to the nameless • maintains a link between the sequential ID and the declared machine name • pays attention to changes in the database versus our default code • pretty good at caching the right stuff
  • 17. Exportables never send a human to do a machine’s job • hook_exportables allows us to define the default, load, save, delete functions our exportable will use • exportables_sync uses the default, load and save functions to add our exportable to the database • exportables_unsync uses the delete function to remove our exportable from the database • i’ll get to a real example in a minute...
  • 18. Exportables never send a human to do a machine’s job So we can use this export taxonomies!
  • 19. Exportables never send a human to do a machine’s job Well, no.
  • 20. Exportables never send a human to do a machine’s job
  • 21. Exportables never send a human to do a machine’s job Taxonomies use sequential IDs and exportables allow us to link that to a machine name. So what’s the problem?
  • 22. Exportables never send a human to do a machine’s job Views filters in code look like:
  • 23. Exportables never send a human to do a machine’s job Which translates into this:
  • 24. Exportables never send a human to do a machine’s job So what happens when you push a new feature and it installs the vocabulary at VID = 18 because a client had created new vocabularies?
  • 25. Exportables never send a human to do a machine’s job
  • 26. Case Study: Reserved Taxonomy • Reserved Taxonomy solves this problem by giving developers an exportable with feature integration to install vocabularies and terms at specific vocabulary IDs and term IDs • The idea is that you set aside a block of IDs for your terms and vocabularies. More than you will ever need. Say, 1-100000. Then any terms that the clients or you add later will start at 1000001. • That way if you need to add more later, you can without conflicts.
  • 27. CODE see it in motion
  • 29. Thanks! Jon Skulski Drupal Architect, ChapterThree LLC jon@chapterthree.com / jonskulski

Editor's Notes