Everything in code_slides

2,083 views

Published on

Mack Hardy presenting "Everything in Code" on the drupal development tools of Features, make files and drush. Presented at the 2nd Pacific Northwest Drupal Summit http://pnwdrupalsummit.org/2010/sessions/everything-code

Mack is the founder of Affinity Bridge http://affinitybridge.com

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,083
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Content and config are separated. Config is version-ed in source control. Code can be diffed, so we can tell what changed. Building from code has PREDICTABLE, REPEATABLE results. easy to hand off a project to someone else Time is saved.
  • the initial act of building a drupal site (drush_make) choosing all these useful contrib modules that work together (install profile) the couple of hours of config you just did (feature).
  • The basics version control to save your stuff drush manage your stuff features to hold your stuff
  • If you change the sandwich in the UI, you can run the update -> code If you want your old sandwich back the way it was, revert drush features-update feature-name  and  drush features-revert feature-name
  • If you change the sandwich in the UI, you can run the update -> code If you want your old sandwich back the way it was, revert drush features-update feature-name  and  drush features-revert feature-name
  • If you change the sandwich in the UI, you can run the update -> code If you want your old sandwich back the way it was, revert drush features-update feature-name  and  drush features-revert feature-name
  • If you change the sandwich in the UI, you can run the update -> code If you want your old sandwich back the way it was, revert drush features-update feature-name  and  drush features-revert feature-name
  • If you change the sandwich in the UI, you can run the update -> code If you want your old sandwich back the way it was, revert drush features-update feature-name  and  drush features-revert feature-name
  • If you change the sandwich in the UI, you can run the update -> code If you want your old sandwich back the way it was, revert drush features-update feature-name  and  drush features-revert feature-name
  • If you change the sandwich in the UI, you can run the update -> code If you want your old sandwich back the way it was, revert drush features-update feature-name  and  drush features-revert feature-name
  • If you change the sandwich in the UI, you can run the update -> code If you want your old sandwich back the way it was, revert drush features-update feature-name  and  drush features-revert feature-name
  • If you change the sandwich in the UI, you can run the update -> code If you want your old sandwich back the way it was, revert drush features-update feature-name  and  drush features-revert feature-name
  • Knowing is half the battle
  • Post commit hooks
  • input formats taxonomy is newly node_queue block settings machine names for everything features_extra module  
  • get a make file, or make one wget http://gist.github.com/raw/441422/063be9a1c41d9a45b1f127464ba528175ba42138/simplecontext.build Show the build file http://skitch.com/mackhardy/d3tey/terminal-bash-96x24 run a build file http://skitch.com/mackhardy/d3t85/terminal-gzip-96x24 talk about  drush features-update feature-name  and  drush features-revert feature-name
  • As a Team - what should the language say here?  the message is that we take small steps to build out the framework as a team.   collaborate? just "team" - talk about how to automate a process you do it manually - drush will immediatly save you time - build from examples Tips  Next easy component:  get a feel for features. Source control - ONLY version-control the code you create yourself - your makefile, install profile, custom theme probably, and your custom modules, including features. A good learning aid with drush_make is to build with the --debug flag.
  • On Thursday, Young Hahn from Dev Seed announced that the Everything-in-Code workflow - the whole drush_make, install profile, and Features stack - can now be used on Drupal 7.   To help us all get started with that, Dev Seed has also created, for your utility and education, a D7 install profile called Build Kit .  Build Kit is specifically designed to make it easier to develop using this technique.  It comes with Everything-in-Code-tastic build tools including Features, Strongarm, Views, Panels/Ctools, Admin, Context, Diff, and Devel.  Build Kit is also designed to keep track of the ongoing developments in exportables for Drupal 7, which has been a road not without bumps D7 support for the Everything-in-Code approach is moving fast:  exportability for taxonomy vocabularies was committed to D7 HEAD on Friday.  Hooray!  Hopefully, text formats will also be totally exportable soon.  Basically Everything-in-Code is the way of the future.    
  • Everything in code_slides

    1. 1. Everything in Code Mack Hardy & Zoë Neill-St. Clair Nerds in residence at Affinity Bridge
    2. 2. WHAT do we mean by &quot;everything&quot;? <ul><li>the things we do besides code: </li></ul><ul><li>  </li></ul><ul><ul><li>the very act of downloading & installing modules </li></ul></ul><ul><ul><li>all the configuration </li></ul></ul><ul><ul><li>post-go-live changes </li></ul></ul>source control }
    3. 3. WHY are people who have Everything In Code so creepily happy? <ul><li>config != content. </li></ul><ul><ul><li>source control! </li></ul></ul><ul><ul><li>diff! </li></ul></ul><ul><ul><li>repeat, repeat, repeat </li></ul></ul>    project handoff?  --> so easy.   time saved?  --> beer.
    4. 4. WHEN is it a good idea? <ul><ul><li>always. </li></ul></ul>
    5. 5. HOW what do the kids in the audience need to try this at home? git drush features } do it
    6. 6. HOW People, it's demo time. make files drush make updating features testing } do it
    7. 7. Example of a make file do it
    8. 8. Specific options do it
    9. 9. drush make filename.make do it
    10. 10. drush generate-makefile file.make do it HOW Make the Robots do it....
    11. 11. do it FEATURIZE IT
    12. 12. do it adding a feature
    13. 13. do it the list of features
    14. 14. do it feature details - from here we can re-roll the feature
    15. 15. do it recreating a feature - components closeup
    16. 16. AND THEN some crazy person comes along and changes some settings.
    17. 17. do it the list of features, now with an override.
    18. 18. do it looking at the details of a feature with overrides
    19. 19. do it diffing the overrides.  a content type setting has been changed, and a block added to a context.
    20. 20. drush features-update my_sandwich drush features-revert my_sandwich do it
    21. 21. do it AUTOMATED TESTING CI JOE - http://github.com/defunkt/cijoe
    22. 22. do it AUTOMATED TESTING Post commit hooks to run simple tests 
    23. 23. do it AUTOMATED TESTING HUDSON -> SELENIUM -> &quot;INTELLIGENCE&quot; HUDSON http://hudson-ci.org/ SELINIUM http://seleniumhq.org/
    24. 24. SOME THINGS ARE NOT (YET) EXPORTABLE
    25. 25. do it SOME THINGS ARE NOT (YET) EXPORTABLE <ul><li>update_N as a workaround </li></ul><ul><li>  </li></ul><ul><ul><li>use .install file update hooks to adjust </li></ul></ul><ul><ul><li>features will preserve your custom code </li></ul></ul><ul><ul><li>don't cram in a million update_N tweaks </li></ul></ul>
    26. 26. AUTOMATION Now that we know it works....
    27. 27. HOW to ease your team into it incremental small steps } start where you are
    28. 28. ONWARD to Drupal 7! what, are you scared? <ul><ul><li>all these tools work on D7 now </li></ul></ul><ul><ul><li>taxonomy is exportable </li></ul></ul><ul><ul><li>get Build Kit </li></ul></ul>
    29. 29. Resources Collaboration over Competition http://affinitybridge.com http://affinitybridge.com/category/topics/abridged http://developmentseed.org/blog/2010/sep/30/features-and-exportables-drupal-7 http://developmentseed.org/blog/2010/sep/11/aegir-04-alpha-13-drush-make-support-allows-automatically-building-drupal-distribut http://github.com/defunkt/cijoe http://hudson-ci.org

    ×