Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Version Control


Published on

This was a training session given at BYOL 2009 in Salt Lake City

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Version Control

  1. 1. Gates Matthew Stoner University of Arizona [email_address] Version Control in elearning development
  2. 2. Who am I? <ul><li>Associate Specialist, Interactive Learning, Az Center for Integrative Medicine </li></ul><ul><li>Adjunct Lecturer, Communication </li></ul><ul><li>Developing elearning since 1998 </li></ul>
  3. 3. Quick Poll: How many times have you overwritten a file you made and regretted it instantly?
  4. 4. Agenda <ul><li>What is version control? </li></ul><ul><li>Why version control for elearning? </li></ul><ul><li>What tools are needed to use version control? </li></ul><ul><li>Version Control Exercise </li></ul>
  5. 5. Questions you may have <ul><li>I'm a mac person, how is this different from time machine? </li></ul><ul><li>How do I setup my own server? </li></ul><ul><li>I'm a designer, how does this affect me? </li></ul><ul><li>I work by myself, do I really care about version control? </li></ul>
  6. 6. What is version control? <ul><li>Tracking files over time </li></ul><ul><li>Alternative to “save as” </li></ul><ul><li>Useful for team development </li></ul><ul><li>Most applicable to code files (Flash, HTML, etc), but also useful for binary files like Photoshop, Word Documents, Presentations, etc </li></ul>
  7. 7. Version Control versus Other Solutions <ul><li>FTP writes (and overwrites) files to a server </li></ul><ul><li>Version Control stores files into a repository and tracks each version written to the repository </li></ul><ul><li>Backups archive files but without meta data found in version control systems </li></ul>
  8. 8. Lingo Repository The database in which files are stored Subversion Server The computer storing & hosting the repository
  9. 9. Lingo Working Set/Working Copy Local directory where you make changes Trunk/Main The primary location for code in the repository
  10. 10. Version Control Systems <ul><li>Popular version control frameworks </li></ul><ul><ul><li>Concurrent Versions System (CVS) </li></ul></ul><ul><ul><li>Subversion (SVN) </li></ul></ul><ul><ul><li>GIT </li></ul></ul><ul><ul><ul><li>See comparison of version control software @ </li></ul></ul></ul>
  11. 11. Why do I need it? <ul><li>Backup and Restore Files are saved as they are committed, and you can jump to any moment in time. Need that file as it was on Feb 23, 2007? No problem. </li></ul><ul><li>Synchronization Lets people share files and stay up-to-date with the latest version. </li></ul><ul><li>Short-term undo Monkeying with a file and messed it up? (That’s just like you, isn’t it?). Throw away your changes and go back to the “last known good” version in the database. </li></ul>
  12. 12. Why do I need it? <ul><li>Track Changes As files are updated, you can leave messages explaining why the change happened (stored in the VCS, not the file). This makes it easy to see how a file is evolving over time, and why. </li></ul><ul><li>Track Ownership VCS tags every change with the name of the person who made it. Helpful for blamestorming or giving credit. </li></ul>
  13. 13. Why do I need it? <ul><li>Sandboxing, or insurance against yourself Making a big change? You can make temporary changes in an isolated area, test and work out the kinks before “checking in” your changes. </li></ul><ul><li>Branching and merging A larger sandbox. You can branch a copy of your code into a separate area and modify it in isolation (tracking changes separately). Later, you can merge your work back into the common area. </li></ul>
  14. 14. Version control for elearning <ul><li>Faculty changes their mind (Like that ever happens). Let’s you go back to a previous deployment or version </li></ul><ul><li>Development Teams Easily share projects with a development team without worrying about overwriting/losing files </li></ul>
  15. 15. Version control for elearning <ul><li>Reusability Setup course/flash/web templates to a repository to checkout and apply to new projects </li></ul><ul><li>Evolution Track changes from semester to semester of a course. Never lose that old activity or web page. </li></ul>
  16. 16. Activity one <ul><li>Setting up a subversion repository with </li></ul><ul><li>Go to </li></ul><ul><li>Sign up for a free account </li></ul>
  17. 17. production Example Darin web developer Jane graphic artist Step 1. Darin develops some course web pages Step 2. Darin commits to repository Step 3. Jane creates graphics & media for the course Step 4. Jane checks out Darin’s files from repository Step 5. Jane inserts media into webpages Step 6. Jane commits changes to repository
  18. 18. production Example Sally Instructor Step 7. Jordan reviews course before deployment to development server Step 8. Jordan deploys files to development server Step 9. Sally reviews course web site and suggests changes Step 10. Darin makes changes and commits new version to repository for review and deployment Jordan supervisor
  19. 19. FTP Perspective intro.html 9-1-2009 12:05 pm glosssary.html 9-1-2009 12:05 pm activity.html 9-1-2009 12:05 pm conclusion.html 9-1-2009 12:05 pm Typical file structure view for web pages uploaded to a server Darin uploads his web pages to the server
  20. 20. Subversion Perspective intro.html 9-1-2009 12:05 pm glosssary.html 9-1-2009 12:05 pm activity.html 9-1-2009 12:05 pm conclusion.html 9-1-2009 12:05 pm Similar to FTP view, but meta data is stored as to whom committed the files and any notes they added v1 Darin uploads his web pages to the repository r1
  21. 21. FTP Perspective intro.html 9-3-2009 2:05 pm glosssary.html 9-2-2009 10:33 am activity.html 9-3-2009 2:15 pm conclusion.html 9-1-2009 12:05 pm File save times reflect changes on server but no meta information If anyone updated the files between the time Jane retrieved them, those changes are lost Jane downloads files from server and makes her changes graphics 9-3-2009 2:05 pm
  22. 22. Subversion View Darin’s files remain unchanged in revision 2, but the graphics folder is added Jane commits the graphics to the repository r2 graphics 9-3-2009 2:05 pm intro.html 9-1-2009 12:05 pm glosssary.html 9-1-2009 12:05 pm activity.html 9-1-2009 12:05 pm conclusion.html 9-1-2009 12:05 pm
  23. 23. Subversion View New versions of Darin’s files are committed to the database, but originals remain in database Jane commits updated web pages to the repository r3 intro.html 9-3-2009 2:05 pm glosssary.html 9-2-2009 10:33 am activity.html 9-3-2009 2:15 pm conclusion.html 9-1-2009 12:05 pm graphics 9-3-2009 2:05 pm
  24. 24. In Summary <ul><li>FTP Perspective only gives us the last saved version of files. Changes between files are lost. </li></ul><ul><li>FTP does not give any meta-information beyond the last time a file was saved. </li></ul>
  25. 25. Are you ready to take the plunge?
  26. 26. SVN Tools <ul><li>Clients </li></ul><ul><ul><li>Windows - TortoiseSVN </li></ul></ul><ul><ul><li>Mac - Versions </li></ul></ul><ul><ul><li>Subclipse </li></ul></ul><ul><ul><li>Dreamweaver CS4 </li></ul></ul>
  27. 27. Activity two <ul><li>Log into my sample repository at Spring Loops using your subversion client </li></ul><ul><li> </li></ul><ul><li>Username: demo9 Password: elearning </li></ul><ul><li>You will find Darin’s 4 web pages and Jane’s graphics folder </li></ul>
  28. 28. Diffs <ul><li>Diffs allow you to compare two text files for changes between revisions </li></ul><ul><li>Only works with code projects, not binary files </li></ul><ul><li>Similar to track changes in Microsoft Word </li></ul>
  29. 29. Diffs <ul><li>Let’s review Darin’s intro.html file </li></ul>r3 r1
  30. 30. Commits <ul><li>After you make some changes to Darin’s files, its time to commit them to the repository </li></ul><ul><li>When checking in files, you will want to leave a comment on what you changed in this version </li></ul><ul><ul><li>N.B. With development teams, each member would have their own login. </li></ul></ul>
  31. 31. When to Commit? <ul><li>Clean, working version </li></ul><ul><li>To share the file </li></ul><ul><li>You are at a breaking point </li></ul><ul><li>End of the day </li></ul>
  32. 32. Conflicts
  33. 33. Conflicts <ul><li>Version control will alert you to conflicts and encourage you to resolve them with the other team member </li></ul><ul><li>Rather than make it too easy , the philosophy is to encourage discussion </li></ul>
  34. 34. Advanced Concepts
  35. 35. Self versus Remote Hosting Self Remote <ul><li>Full control of data and code </li></ul><ul><li>Maintain backups </li></ul><ul><li>Access rights </li></ul><ul><li>Security concerns </li></ul><ul><li>Fees </li></ul><ul><li>Access rights restrictions </li></ul><ul><li>Security concerns </li></ul>
  36. 36. Some Hosting Services
  37. 37. Activity three <ul><li>Using the account you created earlier, commit some code of your own </li></ul>
  38. 38. Server Resources <ul><li>Installing a subversion server on Leopard </li></ul><ul><ul><li> </li></ul></ul><ul><li>htpasswd - Manage user files for basic authentication </li></ul><ul><ul><li> </li></ul></ul>
  39. 39. Quick Poll: Who is planning to implement version control for their production environment?
  40. 40. <ul><li>I hope you have taken away some knowledge of version control and will be able to start implementing it into your development process </li></ul>In Conclusion