ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Managing versions of my app

February 02, 2009 10:05am

Subscribe [8]
  • #1 / Feb 02, 2009 10:05am

    mvdg27

    120 posts

    Hi guys,

    I’ve been searching this forum for my question, and I did find some topics on it. But I’m not completely clear on how to apply it to our situation. Our situation is as follows:

    We have developed a CMS application in CI and we now have a few customers using it. Now off course we’re updating our software regularly: bugfixes, new features etc.

    The problem we’re facing, is managing these different versions. Though we have a very small team of 3 developers, it sometimes is a hassle to 1) manage the code across developers, 2) putting online the versions as a beta, and keeping track of them, and 3) making the beta changes into live versions. The biggest issue is losing track on the things that are changed. Currently we have our live version, and we continue working on the development version. Whenever we feel we’ve tested the development version enough, we simple rename de folder ‘cms_live’ to ‘cms_old’ and ‘cms_dev’ to ‘cms_live’, and the version is live for all users. Somehow, we feel this method is not going to be feasible in the long run ..

    I think our solution lies in using something like SVN. But I’m having troubles understanding exactly how it works, and how to implement.

    In our setup we have 3 developers working locally on a Linux machine and a dedicated webserver, which hosts the customers.

    Can anyone share their experience in similar situations? Maybe some good tutorials?

    Thanks in advance for the input!

    Michiel

  • #2 / Feb 02, 2009 10:26am

    SVN is good, Git is better, in my opinion.
    our set up looks something like this

    [master repository]
            |
        +-------+-------+-------+
        |       |       |       |
     [dev 1] [dev 2] [staging] [live]

    workflow
    dev 1 - is a working copy, developer 1 works away and once she’s happy with her work she commits her changes to the master repo.
    dev 2 - same as above.
    staging - our test server, everything is tested for production here
    live - our live, remote hosted website.

    This way we can update the live site (once we’re happy that dev 1 & 2’s work won’t break anything) by just running ‘svn up’ on the live server.

  • #3 / Feb 03, 2009 2:29am

    ray73864

    268 posts

    Would be interested in knowing how you set this up, as i would like to do something similar.

  • #4 / Feb 03, 2009 6:18am

    mvdg27

    120 posts

    Yes same here! I’ve looked into git a bit, and it does sound like a very useful piece of software for this. Could you share with us a bit how you’ve set it up (local/ remote) and how you use it in everyday practice?

    Thanks!

  • #5 / Feb 05, 2009 5:12pm

    whobutsb's avatar

    whobutsb

    126 posts

    Here is a guide I found not too long ago all about how to setup Git on a windows machine. 
    Illustrated Guide to Git on Windows

    I have not followed the tutorial yet or setup a GIT Repo yet on a machine, so I won’t be much help with questions. 

    Learning Git and setting up a repository for my code is on my To-do.

    But I would love to hear about everyone’s thoughts of using Git and how they are making out with setting it up on their own servers.

  • #6 / Feb 05, 2009 5:21pm

    NateL's avatar

    NateL

    248 posts

    I think GIT is really catching on, and I’ve heard some really promising things about it. but I think Subversion is easier to come by. Coda has Subversion abilities built right into it, and so I use Coda for my programming right now.

    Unfuddle has Subversion and Git, so I have the option to use both 😊

  • #7 / Feb 05, 2009 5:23pm

    whobutsb's avatar

    whobutsb

    126 posts

    Besides the nice integration with Coda (I use and love Coda), what are the benefits to Subversion vs. Git?  Do you have any tutorials on how to get started with Subversions.

  • #8 / Feb 05, 2009 7:23pm

    mania's avatar

    mania

    8 posts

    Besides the nice integration with Coda (I use and love Coda), what are the benefits to Subversion vs. Git?  Do you have any tutorials on how to get started with Subversions.

    I think GIT lets you work with developers on a different network. you don’t have to all be working off one server. We are going to try it soon.

  • #9 / Feb 05, 2009 7:47pm

    Michael Wales's avatar

    Michael Wales

    2070 posts

    I think GIT lets you work with developers on a different network. you don’t have to all be working off one server. We are going to try it soon.

    Meh, had an explanation - wasn’t as good as I would have liked.

  • #10 / Feb 05, 2009 9:19pm

    kyleect

    58 posts

    Does anyone have a fantastic guide to setting up a version control system on OSX? All, and I mean ALL, the ones I’ve seen online have been utter shit. I am not familiar with Unix, using the command line and or compiling programs. However I can follow exact step by step instructions. I would use Windows but my windows machine has been dead for a while.

    Note, I have tried to do this in the past but I always to a point where I can’t procede do to the instructions being incomplete or wrong. At that point I have stuff half installed on my system and I don’t even know where it’s located. This is partially due to the fact that OSX hides some directories outside of the terminal.

  • #11 / Feb 05, 2009 9:25pm

    Michael Wales's avatar

    Michael Wales

    2070 posts

    I am not familiar with Unix, using the command line and or compiling programs.

    You will have to use the command line for a version control system, in most cases.

    If you are looking for the easiest solution - that will keep you away from the command line - use Beanstalk or Unfuddle to host your repository. This will keep you out of the command line in setting up your repository.

    For working with that repository, use Versions - by far one of the most user friendly SVN clients.

  • #12 / Feb 05, 2009 9:33pm

    NateL's avatar

    NateL

    248 posts

    The easiest way I can suggest:

    Get a free account with Unfuddle.
    Create a project with a Subversion repository
    Unfuddle will give you an http:// address - this is your repository address.

    In Coda -
    Create a new Site
    Edit the Site info, and scroll down to Source Control
    Enable Source Control by clicking the button “Checkout Source”
    Paste that http:// address that unfuddle has given you
    Put in your unfuddle username and password

    start programming!

    You’re now using version control, and you can make commits, add comments to those commits, remove files, revert files, etc. etc. etc…everything Subversion.

    Occasionally, I do run into issues and I do use command line.  I learned from someone else - just like you, i found the documentation confusing and always ran into problems. Your best bet is to find someone local to you that is a professional and can answer questions on the fly.  gold. 😉

  • #13 / Feb 06, 2009 9:23am

    whobutsb's avatar

    whobutsb

    126 posts

    I have a question about the SVN and previewing/testing the application.  When I work on my applications I two versions of it.  A production version, which is currently being used, and a development version which resides on another remote server, which I continually work on.  When I’m working on my development app in Coda, i’m continually making changes and then saving it then opening it in Firefox for testing. 

    When I’m working on my application with SVN do I want to download my entire site from the repository and work on it the way I have been?  Or do I download individual files?  If I do it that way, how do I test the application? 

    Also when do I “commit” my changes that I made?  Is commiting finalizing the changes and adding them back to the repository?

    Thanks for the help with these questions.  I know I need to start using some sort of Code Versioning system I just unsure how it will fit into my work flow.

  • #14 / Feb 06, 2009 11:44am

    maesk's avatar

    maesk

    83 posts

    I’m also in the process of setting up some kind of version control and there are so many options that I can’t decide what’s best.

    GIT vs. subversion (I only heard of GIT today, in this thread)
    Hosted solution vs. your own svn server (possibly with web interface such as warehouse?)

    From the hosted solutions, which one of these do you think is “the best”?
    - beanstalk
    - unfuddle
    - springloops

    Basecamp integration and bug tracking would be nice but not essential. But I need a solution that allows to immediately deploy changes to the dev server.
    And do you know if the version control functions from within applications such as TextMate, Dreamweaver and Oxygen work with the hosted solutions?

    Any advice would be greatly appreciated.

  • #15 / Feb 06, 2009 7:54pm

    Michael Wales's avatar

    Michael Wales

    2070 posts

    When I’m working on my application with SVN do I want to download my entire site from the repository and work on it the way I have been?  Or do I download individual files?  If I do it that way, how do I test the application?

    Typically, you would have 3 areas of development. You develop locally, on your machine, and do your testing there. This is also where your checked out repository (working directory) will reside.

    As you make changes, you commit them to your development server. This is kind of a staging area, and this is where you make sure everything will work perfectly in an environment that mirrors your production environment.

    Finally, when all is done with a particular feature/application, etc. you will jump on your production server and perform an export of your SVN repository - bringing all of those new files over to the production server.

    Also when do I “commit” my changes that I made?

    When you are fearful that what you just completed may be lost, or break something. In general: commit when you are done working for the day, complete a feature, or complete a major milestone when working on a feature.

    For instance, let’s say we’re allowing users to upload an avatar. I would commit when I finished the models, one for the avatar and altering the user model (to support avatars) and I would commit after completing the controller and view. Depending on what you are working on this may be more often or less often.

    Is commiting finalizing the changes and adding them back to the repository?

    Committing just sets a “marker” - it is a point in the development of your application that you can consistently return to. Using our Avatar example above (committing after the model changes and another commit after feature completion) we could easily roll our code back to when avatars didn’t exist, or if we felt the model was solid but the implementation side of things (controller/view) were weak, had bugs, or presented security issues, we could just roll back to before they existed.

    A very common way of developing applications is to use “branches.” For instance, let’s say adding in avatar support is a small part of completing updating user profiles and making them more powerful/customizable. We would probably want to start a whole new branch for these changes. We would make hundreds of code changes and commits, rolling forward and backward, making sure everything is good within this branch. Once we know that this branch is final - it’s good to go, we would then merge that branch back into the trunk - which is the master, final version, of the code.

    After a bit of testing in development environment - off it goes to production.

    By using branches, you allow other work to continue within the trunk (or other branches), without the possibility of messing up what you are working on. When you go to merge, you’ll be presented with any “collissions” that occur and will than have to fix those. But, that’s a lot better than working on one file for a few days, trying to commit only to find out someone changed it, so you update your local copy, and then learn everything you’ve been working on is completely different now.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases