code driven development zaporozhye drupalforum
TRANSCRIPT
Yuriy GerasimovMadcap [email protected] yuriy_gerasimov
Code Driven Development
Problems in development
Distributed team workflow
No separation from content
Pushing changes to Staging / Production
No version control
Benefits to keep all settings in code
Version control
Resolving conflicts between developers
Push settings between installations (to production)
See if client didnt change anything
Keep clients testing data on staging site
Step 1: Installation profile
Add all needed modules, and Controller module
Step 2: Use features where possible
Variables (strongarm)
Content types (all CCK fields settings)
Views
Panels
Imagecache presets
Blocks visibility (context)
Creating feature
Step 3: All changes in Controller module
features_install_modules(array('views'));
create some node, taxonomy, users space
create node, term
Step 4: Workflow hook_update_N()
Workflow
Workflow. New developer joins the team
Workflow. Also add changes to hook_install()
Features Namespace
#
Feature News (feature_news)
Viewsfeature_news_blocksfeature_news_listfeature_news_nodefeature_news_taxonomy
Contexts feature_news_frontfeature_news_list
CCK Fieldsfield_news_picturesfield_news_links
Imagecache Presets news-snews-mnews-lnews-portrait
Drush features
Drush
From code to databasedrush features-revert _feature_name_
drush features-revert-all
From database to codedrush features-update _feature_name_
drush features-update-all
Diff (need to install diff module)
Drush features-diff _feature_name_
Release to staging / production
release the code
drush updatedb run all updates
drush features-revert-all update settings from features
drush cc clear caches
Resources
http://nuvole.org/blog/2010/aug/24/features-based-development-workflow
http://drupal.org/project/features
http://drupal.org/project/kit
Future
Feature-branch development for site development
Yuriy GerasimovMadcap [email protected] yuriy_gerasimovtwitter @ygerasimov
Code Driven Development
Thanks!
of