Feature Based Web Development with Bazaar


Published on

We take a look at feature based development using Bazaar. We cover version control evolution, what a feature is, how to develop features rathr than file changes and finally providing those features for provisioning of your web app!

Published in: Business, Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Specifically going to focus on version control which is the glue that holds a web app together. * Who uses FTP to update sites ? * Hands up who uses version control * Who uses CVS ? * Who uses Subversion ? * Who uses Bazaar or Git ? For FTP users, this may tread some new territory but it's worth making the hike. For CVS and Subversion users, you will notice some similarities but there are also some major differences in the workflow. Mayl take time to wrap your head around these.
  • Feature Based Web Development with Bazaar

    1. 1. Feature Based Development for Web Apps <ul><ul><li>with Bazaar </li></ul></ul><ul><ul><li>A Sydney PHP Group presentation </li></ul></ul><ul><ul><li>1 st May 2008 </li></ul></ul><ul><ul><li>James Ellis </li></ul></ul><ul><ul><li>customr.net </li></ul></ul>
    2. 2. WHY <ul><ul><li>? </li></ul></ul>
    3. 3. A feature is... <ul><ul><li>A common set of changes that combine to produce the required result </li></ul></ul>
    4. 4. Version Control Evolution <ul><li>File clobber (no control) – e.g transferring files with FTP </li></ul><ul><li>Enter the Tree (Concurrent Version Systems) </li></ul><ul><li>Improving CVS with Subversion (SVN) </li></ul><ul><li>Distributed – (centralise if you wish) </li></ul>
    5. 5. File Clobber with FTP <ul><li>Destructive Revision Control </li></ul><ul><li>Does not scale beyond one developer </li></ul><ul><li>(Supported in Bazaar via a plugin) </li></ul><ul><li>Manual Merges – who is doing the washing up? </li></ul>
    6. 6. Tree Versioning - centralised <ul><li>(-) Supports only one model of work </li></ul><ul><li>(-) Branches and merges should be easier </li></ul><ul><li>(+/-) Connection to remote server required </li></ul><ul><li>(+) Much better QA </li></ul><ul><li>(-) The freeze (please don't commit!) </li></ul><ul><li>“ Subversion has been the most pointless project ever started... Subversion used to say, 'CVS done right.' With that slogan there is nowhere you can go. There is no way to do CVS right.” Linus Torvalds via /. </li></ul>
    7. 7. Tree Versioning – distributed <ul><li>Common tasks are implicit rather than explicit </li></ul><ul><li>No file clobber – allows multiple branch dev. </li></ul><ul><li>Similar tools – Bazaar, Git </li></ul><ul><li>Implicit supports for standard protocols (http, ftp, sftp etc etc) that we already use every day. </li></ul><ul><li>Does everything centralised does (and better) </li></ul><ul><li>Allows scaling Up and Out </li></ul>
    8. 8. Everything is a branch <ul><li>Developers work in their own local branches </li></ul><ul><li>Checkouts do exist – these are “bound” branches </li></ul><ul><li>Developers provide patches to release managers </li></ul><ul><li>Patches are merged into other branches </li></ul><ul><li>QA step prior to publishing web app updates </li></ul>
    9. 9. Choose a development model <ul><li>No model is bad in Bazaar </li></ul><ul><li>Easy to change between models without changing tools </li></ul><ul><li>Centralised – SVN style single developer </li></ul><ul><li>Centralised – SVN style multi developer </li></ul><ul><li>Distributed – Allow committing to a “main” branch. </li></ul><ul><li>Distributed using Gatekeeper – providing features for inclusion </li></ul>
    10. 10. Providing features <ul><li>Mantra : Treat your web app like an application, not a bunch of files </li></ul><ul><li>Promotes experimentation without conflict </li></ul><ul><li>Introduces the “Gatekeeper” role(s) </li></ul><ul><li>Allows intra developer sharing (http/sftp/mdns) </li></ul><ul><li>You can go on holiday AND have version control!!! </li></ul>
    11. 11. Simple Bazaar Implementation <ul><li>Install Linux, Unix, Windows, Mac packages </li></ul><ul><li>Branch in five seconds </li></ul><ul><li>Dev : Take a branch, work, commit and provide a patch </li></ul><ul><li>QA : Preview, merge and update </li></ul><ul><li>Release : provide release archive (zip, tar etc) which can be packaged (rpm, deb, etc) </li></ul>
    12. 12. Examples <ul><li>Create a branch </li></ul><ul><li>Create a repo </li></ul><ul><li>Pull a branch and keep it up to date </li></ul><ul><li>Work on a feature then Commit </li></ul><ul><li>Patch/Push </li></ul><ul><li>Merge and optionally resolve conflicts </li></ul><ul><li>Checkout and Update (or Export) </li></ul>
    13. 13. Integration with web dev tools <ul><li>Editor plugins (eclipse) </li></ul><ul><li>Or just use the command line </li></ul><ul><li>Bzr GUI's (GTK, Qt, Tortoise) </li></ul><ul><li>Apache – virtual hosts are your friend </li></ul><ul><li>Avahi (aka Rendezvous) sharing on a local net </li></ul><ul><li>Bzr Plugins (upload) </li></ul>
    14. 14. Further reading & support <ul><li>bazaar-vcs.org </li></ul><ul><li>Bazaar documentation </li></ul><ul><li>Bazaar in Five Minutes (excellent) </li></ul><ul><li>Bazaar Mailing Listings </li></ul><ul><li>Commercial Support provided by Canonical </li></ul><ul><li>Experiment </li></ul><ul><li>Remember the Five Steps </li></ul>