{"id":331,"date":"2011-06-08T18:22:32","date_gmt":"2011-06-08T23:22:32","guid":{"rendered":"http:\/\/xlinesoft.com\/blog\/?p=331"},"modified":"2013-02-04T12:57:01","modified_gmt":"2013-02-04T17:57:01","slug":"best-practices-multiple-developers-working-on-the-same-project","status":"publish","type":"post","link":"https:\/\/xlinesoft.com\/blog\/2011\/06\/08\/best-practices-multiple-developers-working-on-the-same-project\/","title":{"rendered":"Best practices: multiple developers working on the same project"},"content":{"rendered":"<p>Many developers have the need to work collaboratively on the same ASPRunnerPro or PHPRunner project. In this tutorial I&#8217;ll show how to make this happen with almost no effort.<\/p>\n<p>We are going to utilize the power of version control system (VCS). Version or revision control systems track and provide control over the changes to the source code. The most popular VCS systems nowadays are Subversion, Git, Mercurial and Bazaar. We plan to use Subversion (SVN) which is easy to get started with.<\/p>\n<p>I&#8217;ll cover the bare minimum you need to know about SVN in order to start. For in-depth tutorial check <a href=\"http:\/\/svnbook.red-bean.com\/\">SVN book<\/a>.<\/p>\n<h2>Software<\/h2>\n<p>We are going to need some additional software.<\/p>\n<h3>1. Server software<\/h3>\n<p>You need to install SVN server software on some server machine. We recommend to check <a href=\"http:\/\/www.visualsvn.com\/server\/\">VisualSVN<\/a>. It is easy to install and configure.<\/p>\n<p>Another option is to use a hosted SVN solution. There are quite a few of them like Unfuddle and CodeSpaces. Besides SVN they provide project management tools, bug tracking and more. In this tutorial we&#8217;ll open a free basic account with Unfuddle which is easier than managing your own SVN repository. You can upgrade to a paid plan at any moment.<\/p>\n<h3>2. Client software<\/h3>\n<p>We recommend <a href=\"http:\/\/tortoisesvn.net\/\">TortoiseSVN<\/a> client. It installs as a Windows explorer extension and available via context menu in all explorer windows.<\/p>\n<h2>Workflow<\/h2>\n<p>Before we proceed with step by step tutorial lets consider a typical scenario that involves two developers working on the same PHPRunner project.<\/p>\n<ul>\n<li>Developer 1 creates the project and makes some changes<\/li>\n<li>Developer 2 gets the copy of project, adds a new table, makes a few changes in visual templates<\/li>\n<li>Developer 1 gets the updated copy of the project and sees all changes made by Developer 2<\/li>\n<\/ul>\n<p>And here is the picture that tells it all.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-349\" title=\"svn_workflow\" src=\"http:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_workflow.png\" alt=\"SVN workflow\" width=\"693\" height=\"542\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_workflow.png 693w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_workflow-300x234.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_workflow-150x117.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_workflow-400x312.png 400w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><\/p>\n<h2>Step by step tutorial<\/h2>\n<p>Lets get started.<\/p>\n<h3>1. Create a repository<\/h3>\n<p>Create an <a href=\"http:\/\/unfuddle.com\">Unfuddle<\/a> account. Create admin user. Proceed to &#8216;Repositories&#8217; to create a new repository.<\/p>\n<p><a href=\"http:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/create_repo.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-339\" title=\"create_repo\" src=\"http:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/create_repo-300x251.png\" alt=\"Creare repository\" width=\"300\" height=\"251\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/create_repo-300x251.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/create_repo-150x125.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/create_repo-400x335.png 400w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/create_repo.png 1023w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Note the URL of your repository (http:\/\/xlinesoft.unfuddle.com\/svn\/xlinesoft_cars\/ in our example).<\/p>\n<h3>2. First checkout<\/h3>\n<p>Create a new PHPRunner project. Open project directory in Windows explorer (i.e. C:\\Users\\Sergey\\Documents\\PHPRunnerProjects\\Cars). Right click anywhere on blank space in Windows Explorer and choose <strong>SVN Checkout &#8230;<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-345\" title=\"svn_checkout\" src=\"http:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_checkout.png\" alt=\"SVN checkout\" width=\"777\" height=\"664\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_checkout.png 777w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_checkout-300x256.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_checkout-150x128.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_checkout-400x341.png 400w\" sizes=\"(max-width: 777px) 100vw, 777px\" \/><\/p>\n<p>Enter the URL of your repository. Checkout directory needs to be the same as your project drectory (C:\\Users\\Sergey\\Documents\\PHPRunnerProjects\\Cars). Click Ok. Enter username and password.<\/p>\n<p>If checkout is successful you will see a hidden .svn folder created in your project directory.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-338\" title=\"after_checkout\" src=\"http:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/after_checkout.png\" alt=\"After first checkout\" width=\"844\" height=\"573\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/after_checkout.png 844w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/after_checkout-300x203.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/after_checkout-150x101.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/after_checkout-400x271.png 400w\" sizes=\"(max-width: 844px) 100vw, 844px\" \/><\/p>\n<h3>3. Developer 1: Adding PHPRunner project to SVN<\/h3>\n<p>Make changes to your PHPRunner project. Add a few tables, make some changes in Visual Editor. Save your project.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_add1.png\" alt=\"\" title=\"svn_add\" width=\"977\" height=\"593\" class=\"alignleft size-full wp-image-705\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_add1.png 977w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_add1-300x182.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_add1-150x91.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_add1-400x242.png 400w\" sizes=\"(max-width: 977px) 100vw, 977px\" \/><\/p>\n<p>In Windows explorer select the all folders except <strong>visual<\/strong>, <strong>tmp<\/strong> and <strong>.svn<\/strong> and project file (.phpr). Right-click on selected files and choose Tortoise SVN-&gt;Add. Make sure all files and directories are selected.<\/p>\n<h3>4. Commit<\/h3>\n<p>Once files are added &#8211; right-click in the same folder and choose <strong>SVN Commit &#8230;<\/strong>. Make sure to add some comment.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-346\" title=\"svn_commit\" src=\"http:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_commit.png\" alt=\"SVN commit\" width=\"752\" height=\"582\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_commit.png 752w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_commit-300x232.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_commit-150x116.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_commit-400x309.png 400w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/p>\n<p>Congratulations! Your files are one the server now. You can logon to Unfuddle account and view your files there.<\/p>\n<p><a href=\"http:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/repo_rev1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-342\" title=\"repo_rev1\" src=\"http:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/repo_rev1-300x206.png\" alt=\"Revision 1\" width=\"300\" height=\"206\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/repo_rev1-300x206.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/repo_rev1-150x103.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/repo_rev1-400x275.png 400w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/repo_rev1.png 919w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h3>5. Developer 2: Checkout<\/h3>\n<p>Now second developer comes into the game. We want her to get a copy of the same project on her machine and make a few changes.<\/p>\n<p>Once TortoiseSVN is installed we need to create a folder where this project will be stored. Once created, open this folder in Windows Explorer and right-click anywhere. Choose <strong>SVN Checkout &#8230;<\/strong>.<\/p>\n<p>Enter repository URL and checkout folder. Enter username and password when prompted.<\/p>\n<p><strong>Note:<\/strong> we recommend to create a different user account for each user. This way you can track changes made by each developer.<\/p>\n<h3>6. Developer 2: Committing changes<\/h3>\n<p>Second developer makes a few changes in the Visual Editor and adds a new table to the project. Once project is saved she needs to add new files (if any) to repository.<\/p>\n<p>In Windows Explorer make visual folder and PHPRunner project file selected and choose SVN Commit. Check off new visual files if any. Add a meaningful comment listing changes you have made. Commit.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-347\" title=\"svn_commit_second_machine\" src=\"http:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_commit_second_machine.png\" alt=\"Commit from second machine\" width=\"929\" height=\"654\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_commit_second_machine.png 929w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_commit_second_machine-300x211.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_commit_second_machine-150x105.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_commit_second_machine-400x281.png 400w\" sizes=\"(max-width: 929px) 100vw, 929px\" \/><\/p>\n<p>Note the icons that TortoiseSVN adds to each file. The blue question icon means &#8216;not under source control&#8217;. The red exclamation point icon means &#8216;this file was modified&#8217;. The green check box icon means &#8216;normal&#8217; status.<\/p>\n<p>If you proceed to your repository at Unfuddle you can see that current revision number is 2. Each commit is associated with a new revision number.<\/p>\n<h3>7. Developer 1: Update<\/h3>\n<p>Developer 1 runs <strong>SVN Update<\/strong> in the project directory to get new files and updated project file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-348\" title=\"svn_update\" src=\"http:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_update.png\" alt=\"SVN update\" width=\"818\" height=\"577\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_update.png 818w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_update-300x211.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_update-150x105.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/svn_update-400x282.png 400w\" sizes=\"(max-width: 818px) 100vw, 818px\" \/><\/p>\n<h3>8. Profit<\/h3>\n<p>Developer 1 opens updated project file to see changes made by Developer 2. Mission accomplished.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-341\" title=\"profit\" src=\"http:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/profit.png\" alt=\"Profit!\" width=\"781\" height=\"576\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/profit.png 781w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/profit-300x221.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/profit-150x110.png 150w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2011\/06\/profit-400x295.png 400w\" sizes=\"(max-width: 781px) 100vw, 781px\" \/><\/p>\n<h2>Additional notes and questions<\/h2>\n<p>There are a few things that may require some extra setup.<\/p>\n<h3>Database connection<\/h3>\n<p>We need to make sure that database connection points to the same database on all machines. If you use a file-based database like MS Access the best approach is to put database file to the server and specify file to the database as <strong>\\\\server\\share\\database1.mdb<\/strong>.<\/p>\n<p>In case of SQL Server, MySQL, Postgre or Oracle having a centralized development database makes even more sense.<\/p>\n<h3>Output directory<\/h3>\n<p>The same story &#8211; you want output directory to point to the same directory on all machines. Something like <strong>C:\\Projects\\ProjectX<\/strong> will work just fine for this purpose.<\/p>\n<h3>I&#8217;m the only developer, should I still use SVN?<\/h3>\n<p>Yes, we strongly recommend to use SVN or any other source control system even if you are a one person shop. It gives you both backups and ability to rollback any change made to the project. What else do you need?<\/p>\n<h3>What&#8217;s the difference between Checkout, Commit and Update?<\/h3>\n<p><strong>Checkout<\/strong> &#8211; first step to get project files on a new machine. In most cases you only need to do this once.<\/p>\n<p><strong>Update<\/strong> &#8211; perform an Update every time before starting your work. You can run Update as many times as you want<\/p>\n<p><strong>Commit<\/strong> &#8211; commit changes you made. Commit at the end of the day or once you completed a large chunk of work. Run Update after Commit to incorporate changes made by other developers.<\/p>\n<p>This is all you need to know in order to start using SVN with PHPRunner or ASPRunnerPro.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many developers have the need to work collaboratively on the same ASPRunnerPro or PHPRunner project. In this tutorial I&#8217;ll show how to make this happen with almost no effort. We are going to utilize the power of version control system (VCS). Version or revision control systems track and provide control over the changes to the source code. The most popular VCS systems nowadays are Subversion, Git, Mercurial and Bazaar. We plan to use Subversion (SVN) which is easy to get started with. I&#8217;ll cover the&#8230;<span class=\"clearfix clearfix-post\"><\/span><a href=\"https:\/\/xlinesoft.com\/blog\/2011\/06\/08\/best-practices-multiple-developers-working-on-the-same-project\/\" class=\"more-link\">Continue Reading <span class=\"screen-reader-text\">&#8220;Best practices: multiple developers working on the same project&#8221;<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,4,3,8],"tags":[],"_links":{"self":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/331"}],"collection":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/comments?post=331"}],"version-history":[{"count":17,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/331\/revisions"}],"predecessor-version":[{"id":355,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/331\/revisions\/355"}],"wp:attachment":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/media?parent=331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/categories?post=331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/tags?post=331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}