FlashInTO SVN Presentation

2,554 views

Published on

FlashInTO SVN Presentation

Published in: Economy & Finance, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,554
On SlideShare
0
From Embeds
0
Number of Embeds
80
Actions
Shares
0
Downloads
64
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • FlashInTO SVN Presentation

    1. 2. Who Am I <ul><li>I’m a Flex developer currently working at Questrade, an online brokerage </li></ul><ul><li>I did my first freelance web work in 1998 and have been doing Flash work from the tail-end of Flash 4 and the beginning of Flash 5 </li></ul><ul><li>I’ve been using Subversion since September 2005 </li></ul>
    2. 3. What is version control? <ul><li>aka as revision control or source control </li></ul><ul><li>it’s the management of different versions of the same files </li></ul><ul><li>from myFile_version1, myFileVersion2 to complicated version control systems like Subversion </li></ul><ul><li>without a proper version control system, I remember years ago getting files such as this: </li></ul><ul><ul><li>final_final_final_reallyfinal_asset.jpg </li></ul></ul><ul><li>Dreamweaver & Flash have (had?) a simple check-in/check-out system </li></ul>
    3. 4. History of SVN <ul><li>SVN Developed in 2000 based off of CVS (Concurrent Versioning System) </li></ul><ul><li>CVS developed in 1985 was in turn based off of RCS (Revision Control System) </li></ul><ul><li>RCS developed in the early 1980’s was based off SCCS (Source Code Control System) </li></ul><ul><li>SCCS developed in 1972 was the first source code revision control system run in Bell Labs for UNIX </li></ul>
    4. 5. The Repository <ul><li>Almost all version control systems including SVN use a centralized client/server model </li></ul><ul><li>For SVN this doesn’t mean you have to run a server, as you can set up a repository locally </li></ul><ul><li>In SVN the central store for all the files is called a repository </li></ul>
    5. 6. The Repository – v2 <ul><li>Tracks every change to every file that is a part of the repository </li></ul><ul><li>This includes </li></ul><ul><ul><li>changes to the directory tree </li></ul></ul><ul><ul><li>deletion and renaming of files </li></ul></ul><ul><li>Users not only have access to the latest files but can go backwards to every previous state of the file system </li></ul><ul><li>Stores all the raw data as a database, recording not new versions of the files, but the changes made to the files, keeping the file size low </li></ul><ul><li>Each new change gets a new version number </li></ul>
    6. 7. The Repository – v3
    7. 8. <ul><li>SVN supports the file locking model </li></ul><ul><li>This system locks down files to stop two people working on the same file at the same time </li></ul>File Sharing v2 – File Locking
    8. 9. File Sharing v2 – Merging v1 <ul><li>SVN like many other version control systems uses a version merge model </li></ul><ul><li>All users get a copy of the files from the repository and can work on files simultaneously </li></ul><ul><ul><li>When a user finishes with a file, they commit it to the repository </li></ul></ul><ul><ul><li>If no changes are made to that file, it’s simply added to the repository and users can get the latest changes when they ask for an update </li></ul></ul><ul><ul><li>If user A has committed a file that user B is working on, when user B goes to commit it, SVN will let user B know it’s out of date </li></ul></ul><ul><ul><li>If user B worked on a different part of the file that user A worked on the file can be merged together </li></ul></ul>
    9. 10. File Sharing v2 – Merging v2 <ul><li>function foo () </li></ul><ul><li>{ </li></ul><ul><li>} </li></ul><ul><li>function bar() </li></ul><ul><li>{ </li></ul><ul><li>} </li></ul>function foo () { trace(‘foo’); } function bar() { } function foo () { } function bar() { trace(‘bar’); } function foo () { trace(‘foo’); } function bar() { trace(‘bar’); }
    10. 11. File Sharing v2 – Merging v3 <ul><li>Now if user A commits a file and user B worked on the same part of the file, SVN will flag a conflict </li></ul><ul><li>User A will have to examine the differences and decide what should be finalized and committed to the repository </li></ul><ul><li>Commits are atomic operations, which means that if users commit files at the same time it will not cause a corruption or inconsistency in the repository </li></ul>
    11. 12. File Sharing v2 – Merging v4
    12. 13. SVN Clients <ul><li>SVN is command-line driven! </li></ul><ul><li>There are many SVN clients out there to give users a GUI to work with SVN </li></ul><ul><li>TortoiseSVN is one of the more popular SVN clients for Windows </li></ul><ul><ul><li>Is a Windows shell extension, which means it runs, right out of Windows Explorer </li></ul></ul><ul><li>For Flex developers there’s the Subclipse plugin that intergrates into the Eclipse IDE for Flex Builder </li></ul><ul><li>For Mac users, Aral Balkan recommends SyncroSVN </li></ul><ul><li>Dreamweaver CS4 beta includes subversion integration </li></ul><ul><ul><li>Might Flash CS4 also include subversion integration? </li></ul></ul><ul><li>There's also several SVN client for Microsoft Visual Studio </li></ul><ul><li>Wikipedia has a list and comparison of SVN clients </li></ul>
    13. 14. SVN Quick Start <ul><li>Install SVN </li></ul><ul><li>Install a SVN client </li></ul><ul><li>Using your SVN client </li></ul><ul><ul><li>Create a repository locally or on a server </li></ul></ul><ul><ul><li>Create a local directory for the files </li></ul></ul><ul><ul><li>Connect your local directory to the repository </li></ul></ul>
    14. 15. TortoiseSVN
    15. 16. Branching v1 <ul><li>Is the ability to isolate whole projects into separate lines of development </li></ul><ul><li>The standard is to have 3 folders: </li></ul><ul><ul><li>trunk </li></ul></ul><ul><ul><li>branches </li></ul></ul><ul><ul><li>tags </li></ul></ul><ul><li>Trunk generally have the “main line” of development </li></ul><ul><li>Branches are generally contain copies of the trunks where development has gone in a different direction </li></ul><ul><li>Tags are generally stable builds or milestones of the project </li></ul><ul><li>Most SVN clients allow you to switch your local files (delete and repopulate with new files) from one repository folder to another </li></ul>
    16. 17. Branching v2
    17. 18. SVN on the web <ul><li>SVN can be set up as part of Apache server so that you access a repository over the web </li></ul><ul><li>You can even browse through a repository online without an SVN client </li></ul><ul><li>A growing number of web hosts now include SVN with hosting </li></ul><ul><li>A lot of open source projects are hosted with Google Code, which the source is available via SVN </li></ul><ul><li>Example of Papervision3d’s repository: http://papervision3d.googlecode.com/svn/ </li></ul><ul><li>WordPress can be installed and updated with SVN </li></ul>
    18. 19. Other SVN features <ul><li>Can include user name and passwords with different permissions </li></ul><ul><li>Hooks scripts can be added to SVN so that certain server scripts can be triggered with certain SVN actions </li></ul><ul><li>Every file and directory can have version metadata </li></ul>
    19. 20. Other version control systems – v1 <ul><li>Microsoft Visual SourceSafe </li></ul><ul><ul><li>doesn't support branching </li></ul></ul><ul><ul><li>apparently can be quite problematic when used with a team larger than 10 people </li></ul></ul><ul><ul><li>if a client machine crashes in the middle of updating a file, it can leave that file in a corrupted state </li></ul></ul><ul><ul><li>Microsoft themselves didn't use it in-house </li></ul></ul><ul><li>Microsoft Team Foundation Server </li></ul><ul><ul><li>replaces Visual SourceSafe and improves </li></ul></ul><ul><ul><li>is not just for version control, but also includes complex reporting, a bug tracking tool, integration with Microsoft's SharePoint and more </li></ul></ul><ul><ul><li>is quite expensive </li></ul></ul>
    20. 21. Other version control systems – v2 <ul><li>Adobe Version Cue CS3 </li></ul><ul><ul><li>Is actually a Digital Asset Management system that includes a version control system built into it </li></ul></ul><ul><ul><li>Runs off a Java server </li></ul></ul><ul><ul><li>Uses the file-lock model since merge model doesn't work well with media assets </li></ul></ul><ul><ul><li>It’s optimized for server use and saves pixel-level changes over the network rather than the entire document </li></ul></ul><ul><ul><li>Has no interface on it's own and uses Adobe Bridge as it's &quot;client“ </li></ul></ul><ul><ul><li>Integrated also into Flash CS3, Illustrator CS3, Photoshop CS3, InDesign CS3 and InCopy CS3 </li></ul></ul><ul><ul><li>Similar to SVN can be installed locally </li></ul></ul><ul><ul><li>workgroups larger than 25 users may need something more robust </li></ul></ul><ul><ul><li>Good website about Version Cue is: versioncue.blogspot.com </li></ul></ul><ul><ul><li>An Adobe pre-recorded presentation on Adobe Version Cue CS3: http://seminars.adobe.acrobat.com/p64264587/ </li></ul></ul>
    21. 23. Links and resources: <ul><li>Subversion website: http://subversion.tigris.org/ </li></ul><ul><li>O'Reilly &quot;Version Control with Subversion&quot; that is FREE online (a lot of the graphics used in this presentation were taking from this book): http://svnbook.red-bean.com/ </li></ul><ul><li>Wikipedia's list and comparison of SVN clients: http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients </li></ul><ul><li>Wikipedia's list and comparison of version control software: http://en.wikipedia.org/wiki/Comparison_of_revision_control_software </li></ul><ul><li>Version Control your Flash Development with SubVersion - A Step by Step How To Guide: http://www.ivantodorov.com/blog/?p=28 </li></ul>

    ×