Yuriy Gerasimov Madcap B.V. [email_address] skype yuriy_gerasimov Code Driven Development
Problems in development <ul><li>Distributed team workflow
No separation from content
Pushing changes to Staging / Production
No version control </li></ul>
Benefits to keep all settings in code <ul><li>Version control
Resolving conflicts between developers
Push settings between installations (to production)
See if client didn’t change anything
Keep client’s testing data on staging site </li></ul>
Step 1: Installation profile <ul><li>Add all needed modules, and Controller module </li></ul>
Step 2: Use features where possible <ul><li>Variables (strongarm)
Content types (all CCK fields settings)
Views
Panels
Imagecache presets
Blocks visibility (context) </li></ul>
Creating feature
Step 3: All changes in Controller module <ul><li>features_install_modules(array('views'));
Upcoming SlideShare
Loading in...5
×

Code Driven Development Zaporozhye DrupalForum

8,974

Published on

Presentation about Code Driven Development

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
8,974
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
14
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Code Driven Development Zaporozhye DrupalForum

  1. 1. Yuriy Gerasimov Madcap B.V. [email_address] skype yuriy_gerasimov Code Driven Development
  2. 2. Problems in development <ul><li>Distributed team workflow
  3. 3. No separation from content
  4. 4. Pushing changes to Staging / Production
  5. 5. No version control </li></ul>
  6. 6. Benefits to keep all settings in code <ul><li>Version control
  7. 7. Resolving conflicts between developers
  8. 8. Push settings between installations (to production)
  9. 9. See if client didn’t change anything
  10. 10. Keep client’s testing data on staging site </li></ul>
  11. 11. Step 1: Installation profile <ul><li>Add all needed modules, and Controller module </li></ul>
  12. 12. Step 2: Use features where possible <ul><li>Variables (strongarm)
  13. 13. Content types (all CCK fields settings)
  14. 14. Views
  15. 15. Panels
  16. 16. Imagecache presets
  17. 17. Blocks visibility (context) </li></ul>
  18. 18. Creating feature
  19. 19. Step 3: All changes in Controller module <ul><li>features_install_modules(array('views'));
  20. 20. create some node, taxonomy, users space
  21. 21. create node, term </li></ul>
  22. 22. Step 4: Workflow hook_update_N()
  23. 23. Workflow
  24. 24. Workflow. New developer joins the team
  25. 25. Workflow. Also add changes to hook_install()
  26. 26. Features Namespace # Feature News (feature_news) Views feature_news_blocks feature_news_list feature_news_node feature_news_taxonomy Contexts feature_news_front feature_news_list CCK Fields field_news_pictures field_news_links Imagecache Presets news-s news-m news-l news-portrait
  27. 27. Drush features
  28. 28. Drush <ul><li>From code to database </li><ul><li>drush features-revert _feature_name_
  29. 29. drush features-revert-all </li></ul><li>From database to code </li><ul><li>drush features-update _feature_name_
  30. 30. drush features-update-all </li></ul><li>Diff (need to install diff module) </li></ul>
  31. 31. Drush features-diff _feature_name_
  32. 32. Release to staging / production <ul><li>release the code
  33. 33. drush updatedb – run all updates
  34. 34. drush features-revert-all – update settings from features
  35. 35. drush cc – clear caches </li></ul>
  36. 36. Resources <ul><li>http://nuvole.org/blog/2010/aug/24/features-based-development-workflow
  37. 37. http://drupal.org/project/features
  38. 38. http://drupal.org/project/kit </li></ul>
  39. 39. Future <ul><li>Feature-branch development for site development </li></ul>
  40. 40. Yuriy Gerasimov Madcap B.V. [email_address] skype yuriy_gerasimov twitter @ygerasimov Code Driven Development Thanks!
  1. Gostou de algum slide específico?

    Recortar slides é uma maneira fácil de colecionar informações para acessar mais tarde.

×