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

FlashInTO SVN Presentation

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