SlideShare uma empresa Scribd logo
1 de 32
Baixar para ler offline
Drupal development:
   The workflow
     Anna Fedoruk, Sterno.ru
Gold Sponsor of
DrupalCamp Kyiv 2011
Silver Sponsors of
DrupalCamp Kyiv 2011
Table of contents

1.Dark side of Drupal's power
2.What's the problem and how to deal with
  settings in DB
3.Approach 1: migraine-powered workflow
4.Approach 2: features-driven development
Why developers cry?

Drupal is great:
• Flexible
• Build whatever you want
• Powerful tools like CCK, Views, Rules, Panles
  etc.
              So what's the problem?
Why developers cry?

OMG, the settings in DB!
• Enabled modules and their settings
• Blocks, taxonomy vocabularies, CCK content
  types
• User roles, permissions
• Views, Rules, Contexts, Panels...
Why developers cry?




Migrations of DB-ed settings are very time-
   consuming, boring and error-prone
What can we do?

We need to:
• Track configuration changes
• Migrate these changes

Approaches:
• Migrate changes in DB via versioned dumps
• Move settings into code: Features ecosystem
The developer's best friend: Drush

Tons of useful tools:
• Modules enabling, disabling, downloading
• Updates
• Cache clearing
• Dumps, backups, sync
• ...
• + modules add-ons
Approach 1: versioned DB dumps
Our experience with Migraine

• Migraine by Noosphere Networks
 http://ashearer.com/software/server-administration/migraine
• D6 modification by mukesh.agarwal17
 http://www.blisstering.com/migraine-synchronize-your-
 development-staging-and-production-sites-databases-drupal-6
• drush
• drush add-on by Danil Semelenov
The point of Migraine

Migraine knows how to deal with different types of
tables:
 • Config tables
 • Content tables
 • Temporary tables
 • Cache tables
 • Ignore tables
Migraine Drush add-on

A wrapper for migraine commands:
• Create local DB dump
• Restore DB from local dump
• Full site migration including source code and DB
• Sync files on local server with remote server
Migraine: workflow

Developer 1:             Developer 2:
• Works with code and    • pull
  configuration          • Restores from special
• Makes special dump       dump
• Lets Migraine know     • Config migrates!
  about new tables (if
  any)
• commit, push
Migraine: workflow

Migration from @dev to @test:
• Make special dump
• Sync files
• Migrate DB

Migration from @dev to @prod:
• Migration doesn't affect content tables
• Manually correct content tables schema
Migraine: pros and cons

Advantages:
• As all tables are classified, no need to think
• Doesn't require anything from components

Disadvantages:
• Hard to resolve conflicts in dumps
• Chaos reigns
• In fact you still need to think
Approach 2: code-driven development
Features: the idea




Image source: http://developmentseed.org/blog/2009/may/29/making-and-using-features-drupal
Features

• Code-driven development: put all the settings
  into code
• Features know how to deal with Views, CCK,
  Imagecahe, node types, user roles and
  permissions, Panels, Contexts, Rules and more
Features ecosystem

• Features
• Ctools exportables
• Strongarm — variables
• Boxes — custom blocks (replaces core «add
  block»)
• Context — blocks, breadcrumbs and so on
• Diff — a tool for work with features states
Feature is a module

•   .info — meta-info, dependencies
•   .module — place your code here
•   .install — usual install file
•   .features.inc

Configuration blocks:
• feature_name.<smthng>.inc — generated by
  Features module
Feature state can be:

• Default — config in code = config in DB
• Overriden — config in code != config in DB
  (needs revert or update)
• Needs review — config in code != config in DB,
  code was changed
A feature workflow

Developer 1           Developer 2
• Creates feature     • Pull
• Enables feature     • Enables/revert feature
• Works with config   • Config migrates!
• Updates feature
• commit, push
Features management

• Web UI
• Drush commands:
  o   view features list
  o   creates new feature
  o   updates code state from DB
  o   updates DB state from code (revert)
  o   view differencies between code and DB states
Features without UI

To create feature or add component:
• Add meta-info and dependencies in .info file
• Update feature
What about our coworkers?

feature is a module, so one can use hook_install()
и hook_update() to:
 • Enable modules
 • Add roles, url aliases etc.
 • Any custom code
hook_update() to share with those who work in the
same time
hook_install() to share with new developers
Contoller feature

• Includes other features as dependencies
• hook_install() and hook_updates() relfect
  general changes in the site's state
Features: The Workflow
Features: advantages

• Easy to work with code in VCS
• Features are reusable
• Beautiful
Features: disadvantages

• Requires more efforts to keep system's state up-
  to-date
• Complex dependencies
• Some components aren't exportable
Useful links

• More about Migraine
  o   http://www.slideshare.net/drupalindia/migraine-drupal-syncing-
      your-staging-and-live-sites-presentation
• More about Features
  o   http://developmentseed.org/blog
  o   http://nuvole.org/blog/code-driven-development
  o   http://openatrium.com/
Contacts

    Anna Fedoruk,
    Sterno.ru

    afedoruk@sterno.ru
    @sternodevteam
    http://devteam.sterno.ru

Mais conteúdo relacionado

Mais procurados

Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database DesignAndrei Solntsev
 
Drush to simplify Drupalers work - Sivaji
Drush to simplify Drupalers work - SivajiDrush to simplify Drupalers work - Sivaji
Drush to simplify Drupalers work - SivajiDrupal Camp Delhi
 
Common Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid ThemCommon Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid ThemAcquia
 
vBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: Monitoring
vBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: MonitoringvBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: Monitoring
vBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: MonitoringDan Barr
 
CMake: Improving Software Quality and Process
CMake: Improving Software Quality and ProcessCMake: Improving Software Quality and Process
CMake: Improving Software Quality and ProcessMarcus Hanwell
 
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)Nuvole
 
Drupal 8 Configuration Management
Drupal 8 Configuration ManagementDrupal 8 Configuration Management
Drupal 8 Configuration ManagementPhilip Norton
 
Javascript Bundling and modularization
Javascript Bundling and modularizationJavascript Bundling and modularization
Javascript Bundling and modularizationstbaechler
 
Develop plugin for Mozilla Firefox and structure a JS-based application
Develop plugin for Mozilla Firefox and structure a JS-based applicationDevelop plugin for Mozilla Firefox and structure a JS-based application
Develop plugin for Mozilla Firefox and structure a JS-based applicationAfshin Mehrabani
 
JBoss AS7 web services
JBoss AS7 web servicesJBoss AS7 web services
JBoss AS7 web servicesalepalin
 
A WordPress workshop at Cefalo
A WordPress workshop at Cefalo A WordPress workshop at Cefalo
A WordPress workshop at Cefalo Beroza Paul
 
13 deploying cloud applications
13   deploying cloud applications13   deploying cloud applications
13 deploying cloud applicationsdarwinodb
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
Academy PRO: Entity Framework Сore
Academy PRO: Entity Framework СoreAcademy PRO: Entity Framework Сore
Academy PRO: Entity Framework СoreBinary Studio
 
Uno! Deux! Three! Making Localization of XPages as Easy as 1-2-3
Uno! Deux! Three! Making Localization of XPages as Easy as 1-2-3Uno! Deux! Three! Making Localization of XPages as Easy as 1-2-3
Uno! Deux! Three! Making Localization of XPages as Easy as 1-2-3Kathy Brown
 
Introduction to Wildfly 8 - Marchioni
Introduction to Wildfly 8 -  MarchioniIntroduction to Wildfly 8 -  Marchioni
Introduction to Wildfly 8 - MarchioniCodemotion
 
Improving Domino Designer
Improving Domino DesignerImproving Domino Designer
Improving Domino DesignerKathy Brown
 
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)Nuvole
 

Mais procurados (20)

Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database Design
 
Drush to simplify Drupalers work - Sivaji
Drush to simplify Drupalers work - SivajiDrush to simplify Drupalers work - Sivaji
Drush to simplify Drupalers work - Sivaji
 
Common Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid ThemCommon Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid Them
 
vBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: Monitoring
vBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: MonitoringvBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: Monitoring
vBrownBag 2015-07-08 - VCP6-DCV Foundations Section 7: Monitoring
 
CMake: Improving Software Quality and Process
CMake: Improving Software Quality and ProcessCMake: Improving Software Quality and Process
CMake: Improving Software Quality and Process
 
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
 
Drupal 8 Configuration Management
Drupal 8 Configuration ManagementDrupal 8 Configuration Management
Drupal 8 Configuration Management
 
Javascript Bundling and modularization
Javascript Bundling and modularizationJavascript Bundling and modularization
Javascript Bundling and modularization
 
Develop plugin for Mozilla Firefox and structure a JS-based application
Develop plugin for Mozilla Firefox and structure a JS-based applicationDevelop plugin for Mozilla Firefox and structure a JS-based application
Develop plugin for Mozilla Firefox and structure a JS-based application
 
Drupalcampatl d7
Drupalcampatl d7Drupalcampatl d7
Drupalcampatl d7
 
JBoss AS7 web services
JBoss AS7 web servicesJBoss AS7 web services
JBoss AS7 web services
 
Cmake kitware
Cmake kitwareCmake kitware
Cmake kitware
 
A WordPress workshop at Cefalo
A WordPress workshop at Cefalo A WordPress workshop at Cefalo
A WordPress workshop at Cefalo
 
13 deploying cloud applications
13   deploying cloud applications13   deploying cloud applications
13 deploying cloud applications
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
Academy PRO: Entity Framework Сore
Academy PRO: Entity Framework СoreAcademy PRO: Entity Framework Сore
Academy PRO: Entity Framework Сore
 
Uno! Deux! Three! Making Localization of XPages as Easy as 1-2-3
Uno! Deux! Three! Making Localization of XPages as Easy as 1-2-3Uno! Deux! Three! Making Localization of XPages as Easy as 1-2-3
Uno! Deux! Three! Making Localization of XPages as Easy as 1-2-3
 
Introduction to Wildfly 8 - Marchioni
Introduction to Wildfly 8 -  MarchioniIntroduction to Wildfly 8 -  Marchioni
Introduction to Wildfly 8 - Marchioni
 
Improving Domino Designer
Improving Domino DesignerImproving Domino Designer
Improving Domino Designer
 
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
 

Semelhante a Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011

DMann-SQLDeveloper4Reporting
DMann-SQLDeveloper4ReportingDMann-SQLDeveloper4Reporting
DMann-SQLDeveloper4ReportingDavid Mann
 
Evolutionary database design
Evolutionary database designEvolutionary database design
Evolutionary database designSalehein Syed
 
CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareAlfresco Software
 
Features, Exportables & You
Features, Exportables & YouFeatures, Exportables & You
Features, Exportables & Youjskulski
 
Jug Zurich Slides
Jug Zurich SlidesJug Zurich Slides
Jug Zurich Slideshbraun
 
Patterns&Practices-Errai
Patterns&Practices-ErraiPatterns&Practices-Errai
Patterns&Practices-Erraihbraun
 
Git Going w/ Git
Git Going w/ GitGit Going w/ Git
Git Going w/ GitheyMP
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps JumpstartOri Donner
 
Staging and Deployment
Staging and DeploymentStaging and Deployment
Staging and Deploymentheyrocker
 
Modular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter BonfireModular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter BonfireJeff Fox
 
Innovations in Sencha Tooling and Framework
Innovations in Sencha Tooling and FrameworkInnovations in Sencha Tooling and Framework
Innovations in Sencha Tooling and FrameworkSandeep Adwankar
 
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 versionDavid Lanier
 
Mixing d ps building architecture on the cross cutting example
Mixing d ps building architecture on the cross cutting exampleMixing d ps building architecture on the cross cutting example
Mixing d ps building architecture on the cross cutting examplecorehard_by
 
Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Anil Sagar
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...E. Camden Fisher
 
Managing Changes to the Database Across the Project Life Cycle (presented by ...
Managing Changes to the Database Across the Project Life Cycle (presented by ...Managing Changes to the Database Across the Project Life Cycle (presented by ...
Managing Changes to the Database Across the Project Life Cycle (presented by ...eZ Systems
 

Semelhante a Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011 (20)

DMann-SQLDeveloper4Reporting
DMann-SQLDeveloper4ReportingDMann-SQLDeveloper4Reporting
DMann-SQLDeveloper4Reporting
 
Evolutionary database design
Evolutionary database designEvolutionary database design
Evolutionary database design
 
Features
FeaturesFeatures
Features
 
CUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in ShareCUST-2 New Client Configuration & Extension Points in Share
CUST-2 New Client Configuration & Extension Points in Share
 
Ember.js: Jump Start
Ember.js: Jump Start Ember.js: Jump Start
Ember.js: Jump Start
 
Features, Exportables & You
Features, Exportables & YouFeatures, Exportables & You
Features, Exportables & You
 
Jug Zurich Slides
Jug Zurich SlidesJug Zurich Slides
Jug Zurich Slides
 
Patterns&Practices-Errai
Patterns&Practices-ErraiPatterns&Practices-Errai
Patterns&Practices-Errai
 
Git Going w/ Git
Git Going w/ GitGit Going w/ Git
Git Going w/ Git
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps Jumpstart
 
Staging and Deployment
Staging and DeploymentStaging and Deployment
Staging and Deployment
 
BackboneJS
BackboneJSBackboneJS
BackboneJS
 
Using Features
Using FeaturesUsing Features
Using Features
 
Modular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter BonfireModular PHP Development using CodeIgniter Bonfire
Modular PHP Development using CodeIgniter Bonfire
 
Innovations in Sencha Tooling and Framework
Innovations in Sencha Tooling and FrameworkInnovations in Sencha Tooling and Framework
Innovations in Sencha Tooling and Framework
 
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
 
Mixing d ps building architecture on the cross cutting example
Mixing d ps building architecture on the cross cutting exampleMixing d ps building architecture on the cross cutting example
Mixing d ps building architecture on the cross cutting example
 
Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
Managing Changes to the Database Across the Project Life Cycle (presented by ...
Managing Changes to the Database Across the Project Life Cycle (presented by ...Managing Changes to the Database Across the Project Life Cycle (presented by ...
Managing Changes to the Database Across the Project Life Cycle (presented by ...
 

Mais de camp_drupal_ua

Peter Lozovitsky.Money under your feet or why you have not already training i...
Peter Lozovitsky.Money under your feet or why you have not already training i...Peter Lozovitsky.Money under your feet or why you have not already training i...
Peter Lozovitsky.Money under your feet or why you have not already training i...camp_drupal_ua
 
Alexandr Shvets.Trends in drupal.DrupalCamp Kyiv 2011
Alexandr Shvets.Trends in drupal.DrupalCamp Kyiv 2011Alexandr Shvets.Trends in drupal.DrupalCamp Kyiv 2011
Alexandr Shvets.Trends in drupal.DrupalCamp Kyiv 2011camp_drupal_ua
 
Dmitry Kostyuk.Cloud hosting for drupal.DrupalCamp Kyiv 2011
Dmitry Kostyuk.Cloud hosting for drupal.DrupalCamp Kyiv 2011Dmitry Kostyuk.Cloud hosting for drupal.DrupalCamp Kyiv 2011
Dmitry Kostyuk.Cloud hosting for drupal.DrupalCamp Kyiv 2011camp_drupal_ua
 
Pavel Makhrinsky.Field API.DrupalCamp Kyiv 2011
Pavel Makhrinsky.Field API.DrupalCamp Kyiv 2011Pavel Makhrinsky.Field API.DrupalCamp Kyiv 2011
Pavel Makhrinsky.Field API.DrupalCamp Kyiv 2011camp_drupal_ua
 
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011camp_drupal_ua
 
Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...
Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...
Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...camp_drupal_ua
 
Sergey Korzh.CCK 3 presentation.DrupalCamp Kyiv 2011
Sergey Korzh.CCK 3 presentation.DrupalCamp Kyiv 2011Sergey Korzh.CCK 3 presentation.DrupalCamp Kyiv 2011
Sergey Korzh.CCK 3 presentation.DrupalCamp Kyiv 2011camp_drupal_ua
 
Artem Pankov.Eclipse.DrupalCamp Kyiv 2011
Artem Pankov.Eclipse.DrupalCamp Kyiv 2011Artem Pankov.Eclipse.DrupalCamp Kyiv 2011
Artem Pankov.Eclipse.DrupalCamp Kyiv 2011camp_drupal_ua
 
Vasily Yaremchuk.Single page website.DrupalCamp Kiev 2011
Vasily Yaremchuk.Single page website.DrupalCamp Kiev 2011Vasily Yaremchuk.Single page website.DrupalCamp Kiev 2011
Vasily Yaremchuk.Single page website.DrupalCamp Kiev 2011camp_drupal_ua
 
Anton Paschenko.Geolocation with Apach Solr using search API.DrupalCamp Kyiv ...
Anton Paschenko.Geolocation with Apach Solr using search API.DrupalCamp Kyiv ...Anton Paschenko.Geolocation with Apach Solr using search API.DrupalCamp Kyiv ...
Anton Paschenko.Geolocation with Apach Solr using search API.DrupalCamp Kyiv ...camp_drupal_ua
 
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011camp_drupal_ua
 
Pavel Prischepa.node load without-restrictions.DrupalCamp Kiev 2011
Pavel Prischepa.node load without-restrictions.DrupalCamp Kiev 2011Pavel Prischepa.node load without-restrictions.DrupalCamp Kiev 2011
Pavel Prischepa.node load without-restrictions.DrupalCamp Kiev 2011camp_drupal_ua
 
Eugene Poltorakov.HTML 5 and drupal.DrupalCamp Kiev 2011
Eugene Poltorakov.HTML 5 and drupal.DrupalCamp Kiev 2011Eugene Poltorakov.HTML 5 and drupal.DrupalCamp Kiev 2011
Eugene Poltorakov.HTML 5 and drupal.DrupalCamp Kiev 2011camp_drupal_ua
 
Viktor Levandovsky.Why drupal.DrupalCamp Kyiv 2011
Viktor Levandovsky.Why drupal.DrupalCamp Kyiv 2011Viktor Levandovsky.Why drupal.DrupalCamp Kyiv 2011
Viktor Levandovsky.Why drupal.DrupalCamp Kyiv 2011camp_drupal_ua
 
Petrov Olexandr.Varnish and drupal.DrupalCamp Kyiv 2011
Petrov Olexandr.Varnish and drupal.DrupalCamp Kyiv 2011Petrov Olexandr.Varnish and drupal.DrupalCamp Kyiv 2011
Petrov Olexandr.Varnish and drupal.DrupalCamp Kyiv 2011camp_drupal_ua
 
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011camp_drupal_ua
 
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011camp_drupal_ua
 
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011camp_drupal_ua
 
Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011
Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011
Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011camp_drupal_ua
 
Grigory naumovets.multilingual sites.drupal camp kyiv 2011
Grigory naumovets.multilingual sites.drupal camp kyiv 2011Grigory naumovets.multilingual sites.drupal camp kyiv 2011
Grigory naumovets.multilingual sites.drupal camp kyiv 2011camp_drupal_ua
 

Mais de camp_drupal_ua (20)

Peter Lozovitsky.Money under your feet or why you have not already training i...
Peter Lozovitsky.Money under your feet or why you have not already training i...Peter Lozovitsky.Money under your feet or why you have not already training i...
Peter Lozovitsky.Money under your feet or why you have not already training i...
 
Alexandr Shvets.Trends in drupal.DrupalCamp Kyiv 2011
Alexandr Shvets.Trends in drupal.DrupalCamp Kyiv 2011Alexandr Shvets.Trends in drupal.DrupalCamp Kyiv 2011
Alexandr Shvets.Trends in drupal.DrupalCamp Kyiv 2011
 
Dmitry Kostyuk.Cloud hosting for drupal.DrupalCamp Kyiv 2011
Dmitry Kostyuk.Cloud hosting for drupal.DrupalCamp Kyiv 2011Dmitry Kostyuk.Cloud hosting for drupal.DrupalCamp Kyiv 2011
Dmitry Kostyuk.Cloud hosting for drupal.DrupalCamp Kyiv 2011
 
Pavel Makhrinsky.Field API.DrupalCamp Kyiv 2011
Pavel Makhrinsky.Field API.DrupalCamp Kyiv 2011Pavel Makhrinsky.Field API.DrupalCamp Kyiv 2011
Pavel Makhrinsky.Field API.DrupalCamp Kyiv 2011
 
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
Vlad Savitsky.Modules parade.DrupalCamp Kyiv 2011
 
Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...
Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...
Vadim Mirgorod.Best practices for cross browser compatibility of drupal websi...
 
Sergey Korzh.CCK 3 presentation.DrupalCamp Kyiv 2011
Sergey Korzh.CCK 3 presentation.DrupalCamp Kyiv 2011Sergey Korzh.CCK 3 presentation.DrupalCamp Kyiv 2011
Sergey Korzh.CCK 3 presentation.DrupalCamp Kyiv 2011
 
Artem Pankov.Eclipse.DrupalCamp Kyiv 2011
Artem Pankov.Eclipse.DrupalCamp Kyiv 2011Artem Pankov.Eclipse.DrupalCamp Kyiv 2011
Artem Pankov.Eclipse.DrupalCamp Kyiv 2011
 
Vasily Yaremchuk.Single page website.DrupalCamp Kiev 2011
Vasily Yaremchuk.Single page website.DrupalCamp Kiev 2011Vasily Yaremchuk.Single page website.DrupalCamp Kiev 2011
Vasily Yaremchuk.Single page website.DrupalCamp Kiev 2011
 
Anton Paschenko.Geolocation with Apach Solr using search API.DrupalCamp Kyiv ...
Anton Paschenko.Geolocation with Apach Solr using search API.DrupalCamp Kyiv ...Anton Paschenko.Geolocation with Apach Solr using search API.DrupalCamp Kyiv ...
Anton Paschenko.Geolocation with Apach Solr using search API.DrupalCamp Kyiv ...
 
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
Andriy Podanenko.Drupal database api.DrupalCamp Kyiv 2011
 
Pavel Prischepa.node load without-restrictions.DrupalCamp Kiev 2011
Pavel Prischepa.node load without-restrictions.DrupalCamp Kiev 2011Pavel Prischepa.node load without-restrictions.DrupalCamp Kiev 2011
Pavel Prischepa.node load without-restrictions.DrupalCamp Kiev 2011
 
Eugene Poltorakov.HTML 5 and drupal.DrupalCamp Kiev 2011
Eugene Poltorakov.HTML 5 and drupal.DrupalCamp Kiev 2011Eugene Poltorakov.HTML 5 and drupal.DrupalCamp Kiev 2011
Eugene Poltorakov.HTML 5 and drupal.DrupalCamp Kiev 2011
 
Viktor Levandovsky.Why drupal.DrupalCamp Kyiv 2011
Viktor Levandovsky.Why drupal.DrupalCamp Kyiv 2011Viktor Levandovsky.Why drupal.DrupalCamp Kyiv 2011
Viktor Levandovsky.Why drupal.DrupalCamp Kyiv 2011
 
Petrov Olexandr.Varnish and drupal.DrupalCamp Kyiv 2011
Petrov Olexandr.Varnish and drupal.DrupalCamp Kyiv 2011Petrov Olexandr.Varnish and drupal.DrupalCamp Kyiv 2011
Petrov Olexandr.Varnish and drupal.DrupalCamp Kyiv 2011
 
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
 
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
 
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
 
Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011
Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011
Grigory Naumovets.Multilingual sites.DrupalCamp Kyiv 2011
 
Grigory naumovets.multilingual sites.drupal camp kyiv 2011
Grigory naumovets.multilingual sites.drupal camp kyiv 2011Grigory naumovets.multilingual sites.drupal camp kyiv 2011
Grigory naumovets.multilingual sites.drupal camp kyiv 2011
 

Último

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Último (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Anna Fedoruk.Theworkflow.DrupalCamp Kyiv 2011

  • 1. Drupal development: The workflow Anna Fedoruk, Sterno.ru
  • 4. Table of contents 1.Dark side of Drupal's power 2.What's the problem and how to deal with settings in DB 3.Approach 1: migraine-powered workflow 4.Approach 2: features-driven development
  • 5. Why developers cry? Drupal is great: • Flexible • Build whatever you want • Powerful tools like CCK, Views, Rules, Panles etc. So what's the problem?
  • 6. Why developers cry? OMG, the settings in DB! • Enabled modules and their settings • Blocks, taxonomy vocabularies, CCK content types • User roles, permissions • Views, Rules, Contexts, Panels...
  • 7. Why developers cry? Migrations of DB-ed settings are very time- consuming, boring and error-prone
  • 8. What can we do? We need to: • Track configuration changes • Migrate these changes Approaches: • Migrate changes in DB via versioned dumps • Move settings into code: Features ecosystem
  • 9. The developer's best friend: Drush Tons of useful tools: • Modules enabling, disabling, downloading • Updates • Cache clearing • Dumps, backups, sync • ... • + modules add-ons
  • 11. Our experience with Migraine • Migraine by Noosphere Networks http://ashearer.com/software/server-administration/migraine • D6 modification by mukesh.agarwal17 http://www.blisstering.com/migraine-synchronize-your- development-staging-and-production-sites-databases-drupal-6 • drush • drush add-on by Danil Semelenov
  • 12. The point of Migraine Migraine knows how to deal with different types of tables: • Config tables • Content tables • Temporary tables • Cache tables • Ignore tables
  • 13. Migraine Drush add-on A wrapper for migraine commands: • Create local DB dump • Restore DB from local dump • Full site migration including source code and DB • Sync files on local server with remote server
  • 14. Migraine: workflow Developer 1: Developer 2: • Works with code and • pull configuration • Restores from special • Makes special dump dump • Lets Migraine know • Config migrates! about new tables (if any) • commit, push
  • 15. Migraine: workflow Migration from @dev to @test: • Make special dump • Sync files • Migrate DB Migration from @dev to @prod: • Migration doesn't affect content tables • Manually correct content tables schema
  • 16. Migraine: pros and cons Advantages: • As all tables are classified, no need to think • Doesn't require anything from components Disadvantages: • Hard to resolve conflicts in dumps • Chaos reigns • In fact you still need to think
  • 17. Approach 2: code-driven development
  • 18. Features: the idea Image source: http://developmentseed.org/blog/2009/may/29/making-and-using-features-drupal
  • 19. Features • Code-driven development: put all the settings into code • Features know how to deal with Views, CCK, Imagecahe, node types, user roles and permissions, Panels, Contexts, Rules and more
  • 20. Features ecosystem • Features • Ctools exportables • Strongarm — variables • Boxes — custom blocks (replaces core «add block») • Context — blocks, breadcrumbs and so on • Diff — a tool for work with features states
  • 21. Feature is a module • .info — meta-info, dependencies • .module — place your code here • .install — usual install file • .features.inc Configuration blocks: • feature_name.<smthng>.inc — generated by Features module
  • 22. Feature state can be: • Default — config in code = config in DB • Overriden — config in code != config in DB (needs revert or update) • Needs review — config in code != config in DB, code was changed
  • 23. A feature workflow Developer 1 Developer 2 • Creates feature • Pull • Enables feature • Enables/revert feature • Works with config • Config migrates! • Updates feature • commit, push
  • 24. Features management • Web UI • Drush commands: o view features list o creates new feature o updates code state from DB o updates DB state from code (revert) o view differencies between code and DB states
  • 25. Features without UI To create feature or add component: • Add meta-info and dependencies in .info file • Update feature
  • 26. What about our coworkers? feature is a module, so one can use hook_install() и hook_update() to: • Enable modules • Add roles, url aliases etc. • Any custom code hook_update() to share with those who work in the same time hook_install() to share with new developers
  • 27. Contoller feature • Includes other features as dependencies • hook_install() and hook_updates() relfect general changes in the site's state
  • 29. Features: advantages • Easy to work with code in VCS • Features are reusable • Beautiful
  • 30. Features: disadvantages • Requires more efforts to keep system's state up- to-date • Complex dependencies • Some components aren't exportable
  • 31. Useful links • More about Migraine o http://www.slideshare.net/drupalindia/migraine-drupal-syncing- your-staging-and-live-sites-presentation • More about Features o http://developmentseed.org/blog o http://nuvole.org/blog/code-driven-development o http://openatrium.com/
  • 32. Contacts Anna Fedoruk, Sterno.ru afedoruk@sterno.ru @sternodevteam http://devteam.sterno.ru