• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Drupal and Git: A collaborative development workflow

Drupal and Git: A collaborative development workflow






Total Views
Views on SlideShare
Embed Views



1 Embed 3

http://wiki.thebw.in 3



Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Drupal and Git: A collaborative development workflow Drupal and Git: A collaborative development workflow Presentation Transcript

    • --- Drupal and Git +++ A collaborative development workflow Wesley Penner and Joshua Schroeder Drupal Camp Alberta 2010 September 11, 2010
    • A brief history ๏ We build Drupal sites... ๏ ...on shared development servers... ๏ ...and it usually works reasonably well. 2
    • When it doesn’t work ๏ We want a good code history ๏ Old [production] sites need new features ๏ Working on a large product with discrete use cases 3
    • We’re book smart... ๏ Our vision at the time of proposing this session... ๏ ...vs. our reality in the past few months. ๏ We don’t really know what we’re doing... ๏ ...but here’s what we’ve learned so far. 4
    • http://www.flickr.com/photos/xtop/4088401761/ 5
    • Control your code ๏ Are you using a version control system? ๏ CVS, SVN, Git, Mercurial, Bazaar 6
    • Why choose Git? ๏ If it’s good enough for Drupal.org... (Maybe not the best justification. Case in point: CVS) ๏ But if you’re a contributor, you’ll be using it soon anyways ๏ Distributed version control. Commit anywhere. ๏ Easy branching and merging ๏ Efficient, even with large projects with long histories 7
    • Configuring Git ๏ Tell git who you are: $ git config --global user.name "Your Name Comes Here" $ git config --global user.email you@yourdomain.example.com 8
    • Seven Basic Commands ๏ These commands are a must ๏ add / commit ๏ push / pull ๏ clone (--bare) ๏ branch ๏ merge 9
    • Getting Git Going 10
    • 11
    • The trouble with Drupal ๏ Configuration and settings stored in the database ๏ How can you collaboratively build a site? 12
    • Shared dev sites ๏ Who broke the site? ๏ Somebody overwrote my work. ๏ How do we push out updates to a production site? 13
    • Local development ๏ Troublesome code is sandboxed ๏ Pushing to production is even worse ๏ How to keep developers’ local copies in sync? 14
    • Database dump? ๏ Puts the site configuration entirely into a text file ๏ Can now be version controlled ๏ Provides a revision history ๏ Make comparison easier by using drush sql-dump --ordered-dump 15
    • Ever try to perform a merge on a database dump? 16
    • Ever try to perform a merge on a database dump? 17
    • Move configuration into code Features to the rescue 18
    • What’s a feature? “A feature is a collection of Drupal entities which taken together satisfy a certain use- case.” (http://drupal.org/project/features) 19
    • Ok, so what’s a feature? ๏ A module that bundles configuration ๏ Your configuration is now code-based ๏ ... and version-able ๏ Used to create a literal feature ๏ e.g. image gallery, blog, top story rotator 20
    • A basic example 21
    • Major shortcoming ๏ Majority of contrib modules aren’t compatible with Features yet (http://drupal.org/taxonomy/term/11478) ๏ “Features provides a UI and API for taking different site building components from modules with exportables and bundling them together in a single feature module.” 22
    • Make it exportable ๏ The more of us that build in support for Features, the more useful Features becomes ๏ CTools exportables 23
    • How do I do that? http://civicactions.com/blog/2009/jul/24/ using_chaos_tools_module_create_exportables 24
    • Revolutionizing Drupal http://developmentseed.org/blog/2009/may/29/making-and-using-features-drupal 25
    • Where to see it in action 26
    • http://www.flickr.com/photos/jason_whittaker/4416219525 27
    • Questions www.jdschroeder.ca 28