Jump to content

My Subversion Implementation


Skemcin

Recommended Posts

The attached diagram illustrates how I've implemented subversion into my development cycle. You'll see that everyone will do it differently - the working environment and personal preferences influence one's approach greatly. Since I am relatively new to all this, I would appreciate anyone's feedback to my approach. I'll try to outline it below, but if details are needed, I'd be happy to post them as needed - I just don't want to overwhelm the original post with too many details.OverviewSubversion is designed to manage revisions through a three step process - build, merge, and launch (and that is a huge generalization). But, with that, subversion stores revisions in one of three areas during this process - the trunk, branches, or tags directory. The Trunk stores a copy of the baseline, most stable code - the stuff that is going to be or already has been pushed live. The Branches store copies of the code you work on. The Tags directory stores a copy of what is live and what has been live.

  • Trunk - the most stable part of the tree, so look at it like the most stable code you have (next to what is live)
  • Branches - are easily broken, like the code you're working on. They are copies of the Trunk that you've isolated so you can break them all you want - you could always start a new branch.
  • Tags - having no relation to a the Tree metaphor but somehow part of the analogy. The Tags are far from the Trunk and Branches in the sense that each folder in the Tags directory represents a single copy (or version) of the site that has been live at some point (including right now). Its been tagged - like that little white inspection sticker you forgot to take off that shirt you just bought.

One last concept to understand about any version control software, in case it's not painfully obvious, the software, essentially, stores (databases) a copy of your code. It (being the code you see in the software) is not the code that is being edited or being served - that still resides in a physical location. That code is in a repository, a storage facility - that is what the software does. When you want to use it, you check it out (copy to your physical location) and modify it. When you're done, you check it back in (put it back in storage) so you can track the differences and more easily revert to an older copy if your new code screwed something up.EnvironmentI have three virtual servers (Windows 2003 w/ColdFusion and MS SQL) and my desktop (Windows XP w/Dreamweaver CS5, Araxis Merge, TortoiseSVN, among other things). My VMServers are identically configured and serve as my development, testing, and production (live) servers.MethodologyThe code for each web site is managed by SVN but only on the development and testing servers. For the moment, I've elected to export code from SVN to my production environment and then using Araxis Merge to compare the differences between live and test so I can remove orphaned files. There are ways around this, but there are justifications for this particular approach.DevelopmentWhen I need to make changes to my sites, I'll assign the related tasks to a Project (planning your work is key). For each project, I create a Branch (a copy from the Trunk). My Branch work is literally done on my development box - so I can review my work as I go. When testing in the development environment is stable enough for testing, it is merged back into the Trunk. The Trunk, then, is moved to the testing server (SVN updates, adds, and removes files as needed). When all the iterations of fixing things between these two areas is complete, the entire site is "tagged" with a version number. That version is then exported to the production (live) server. Janitorial tasks are performed on the production server, as noted earlier, to maintain the code there. When the production server is all set, the Branch is exported to an offline file storage system and deleted from subversion. So, when all is said and done, I can look at my subversion server and know which projects are open (by how many project folders are Branches) and what version of the site is live (by the versioning convention of folders in the Tags folder).ConclusionI've read many, many posts regarding SVN but I am, by far, not an expert as I've got much to learn. But this is the model I've developed and hope to find success in it as I begin to roll it out and work it into my day-to-day routine. I appreciate any feedback and questions on what I've described here. Feel free to tear it up if you see something fundamentally wrong.

svn_illustration.jpg

Link to comment
Share on other sites

Thanks for the overview! I was wondering about svn myself recently. It looks difficult to set up, but I imagine having the systematic workflow saves a lot of time.

Link to comment
Share on other sites

Thanks for the overview! I was wondering about svn myself recently. It looks difficult to set up, but I imagine having the systematic workflow saves a lot of time.
I just added the Overview section to my post to introduce what I later reference as Trunk, Branches, and Tags.Trust me, as I know justsomeguy will attest to later when he posts his approach, it is intimidating. That is exactly one of our motivations to introduce it here as a discussion area. But, as it turns out, it's not that hard to set up and even use. The administration side is definitely where all the expertise lies. If I manage to get caught up on some of the things I'm working on, I'll try to document a step by step set up - as I've not found one online that I've felt to be explicit enough.If you do any server side scripting, learning version control is going to be a major key to your success and your marketability as a programmer.Let me know if there is anything else I could expand on. I will offer more posts as I go down this road.Thanks for your reply.
Link to comment
Share on other sites

  • 2 weeks later...

Thanks for info. We use version control at our work but I have no idea how it is setup, just the techniques; branching, merging, diffing, etc. I often think about trying to set it up for my personal projects, but as has been mentioned, the setup/admin part of it does seem intimidating.

Link to comment
Share on other sites

Thanks for info. We use version control at our work but I have no idea how it is setup, just the techniques; branching, merging, diffing, etc. I often think about trying to set it up for my personal projects, but as has been mentioned, the setup/admin part of it does seem intimidating.
I hear ya. If this helps any, you could create a new post here and describe your configuration at work (obviously from a user's perspective) and then if you want to ask a couple questions about the how or why folks here can take a stab at it and/or we could help you understand how one might go about setting that up.As far as using it for personal projects, it could be very helpful and worth taking a stab at it. I plan to eventually put together a quick version control set up tutorial but in the meantime, describe a "personal project" (in a new post) and lets talk about how you might be able to incorporate version control and maybe we'll get you through that initial setup.
Link to comment
Share on other sites

For what it's worth, I have more problems using the thing than getting it set up. I had literally zero experience using it when I went to set it up, and after a little trial and error I got it up and running, and then the challenge was figuring out how to use it. The Collabnet Subversion Edge stack is the WAMP of SVN:http://www.open.collab.net/products/subversion/whatsnew.htmlThat includes Apache configured with WebDAV, SVN, and ViewVC. It includes a web-based interface to create and manage repositories and users, and then you can use whatever client you want (I like Tortoise, but again it's the only one I've used). I've got a friend using Bazaar, and the client interface for that was pretty slick also. But anyway, I was able to get that Edge stack set up with no prior knowledge about how it works, the main difficulty was making sure the ports were open and knowing the URL to give to the client to find the repositories.

Link to comment
Share on other sites

Forgive me for bumping the flow of the conversation but when you say:

When I need to make changes to my sites, I'll assign the related tasks to a Project (planning your work is key).
Do you use some kind of project management software integrated with your set up? What I'm asking about is scheduling, task assignment, tracking completion etc. This kind of thing has been escaping me for some time now.Superb Topic by the way.
Link to comment
Share on other sites

Forgive me for bumping the flow of the conversation but when you say:Do you use some kind of project management software integrated with your set up? What I'm asking about is scheduling, task assignment, tracking completion etc. This kind of thing has been escaping me for some time now.Superb Topic by the way.
at my work, we use the http://www.atlassian.com/ suite of products, in particular for JIRA (for project/task management), Confluence (for wiki style documentation for maintaining a knowledge base and other stuff), and Crucible/Fish Eye (a peer code review application).
Link to comment
Share on other sites

Forgive me for bumping the flow of the conversation but when you say:Do you use some kind of project management software integrated with your set up? What I'm asking about is scheduling, task assignment, tracking completion etc. This kind of thing has been escaping me for some time now.Superb Topic by the way.
Thanks for joining the conversation. Hopefully we'll get some more traffic here and get more people talking about this stuff.As for question you pose, "assign the related tasks to a Project" can be conceptualized many ways. For my personal (side) work this is a single response to an RFP (request for proposal). And that just ends up being a narrative (functional requirement) that I write out in Word. I don't track it formally - its side work that I limit to 20 or 30 hours of development so I can knock it out in a weekend or two. So, for that, picture a word document that has a two sections to it (scope of work and functional specifications). Where I describe why the project is being contracted and what I'm doing, respectively. The latter section is sub divided (indented) as I bullet point each task or function I need to work on. I copy the document and track my task time there as well. Again, this is sidework, so this is more for my own benefit than anything else.At work, however, it is much more structured. We use a software program called @Task. Our project management team take in project requests and herd them through a series of process that develop a functional requirement, a technical requirement, and project timeline and release schedule. Each task is broken out and entered into @Task (web-based). Each developer is assigned a cost so when a task (from within a given project) is assigned those developers know what they need to do and management knows how much its going to cost (man hours more than tangible dollars). With my hours assigned, I know what I am doing on any given day and I know when I have slow times, like now) when I can kick back and play (i.e. learning version control). When I complete my task, I mark it in @Task and move on to the next assignment I have. I, generally, don't care about what happens after I mark my task as being complete - that's what project management is for. Of course, that differs with my personal side work (at home) because I am the project manager so I see all this from beginning to end (which is why I am also very critical of my job's project management staff - who I call project reporters because I still end up have to let the next person in line know it's their turn and I have to double check with the person in front of my if I can begin working - crazy I tell ya).So, the assignment of tasks (build this form, create this calendar, create a log in) is more conceptual or all in compassing for my personal projects. But at work, it is meticulously defined, assigned, and tracked in a software application.Hopefully that helps - I think it answers the question - from a couple different angles.
Link to comment
Share on other sites

There's a list of project management software here:http://en.wikipedia.org/wiki/Comparison_of...gement_softwareI've used OpenProj for creating Gantt charts and things like that, it works pretty well.
I tried the OpenProj through browsing the same Wikipedia List but it just wasn't what I expected. What I guess I'm thinking of is something that is more integrated with every aspect of my planning and development work. Netbeans as a platform seems to have the potential to be integrated that way (code repository support, web browser previews, refactoring, pdf viewer etc.) but a calender I could integrate with my email would really be nice.Now I notice the software the scientist linked can be integrated with SharePoint and thats pretty useful, however I by myself or a development team of 2 or 3 developers using SharePoint is kinda overkill.Skemcin your method is very similar to mine except I'm not that direct. I usually end up with way too much detail on those documents so I just sort of wing it (I'll stop that now). I'm going to thoroughly checkout the tools you guys mentioned here thanks!Just a suggestion but maybe we could pin a thread about approaches to managing web development projects?
Link to comment
Share on other sites

For Eclipse, there is a plugin called Mylyn (sp?) that will sync up your JIRA tickets right into a pane within the editor. I don't use it that much because I usually have a bunch of tasks for any given consecutively open projects at once, and I find the browser a better place for managing, rather than giving up precious screen real estate when in my IDE.

Link to comment
Share on other sites

...Skemcin your method is very similar to mine except I'm not that direct. I usually end up with way too much detail on those documents so I just sort of wing it (I'll stop that now). I'm going to thoroughly checkout the tools you guys mentioned here thanks!Just a suggestion but maybe we could pin a thread about approaches to managing web development projects?
I know what you mean about how much detail can end up in some of these documents. That's why I try to split them up into three types: the RFP (Request for Proposal) reply, the functional specifications, and the technical specifications. At work, I do not need to the first, but I spend my time on the latter two so there is no question about what needs to get done and how it is anticipated to be done (functional and technical respectively). At home, I tend to need only the first and second (created in word/electronically) while the third tends to be nothing more than a couple notes on a piece of paper - yes, I'm that old, I still use a pen and pad to sketch database schemes or work flows.In any respect, the split between the two puts the right about of detail in the right place for the right people to read it and to understand it. The client or business units really only want to be sure what they want is accurately represented in the functional spec - the "decision makers" usually only care about the high level so that's why the reply to the RFP is there. While the architects and developers want to see how it is expected to be built, the technical spec, so they/I can get a feel for any challenges they might face.On a recent side project, my client actually sent my "reply to RFP" back to me and asked me to dumb it down a little more. That amused me but I obviously complied. And all I can say about "detail" is that you've GOT to pay attention to it. This same project took me a third of the time I expected it to and I attribute that ALL to getting every detail out of the client and then creating a reasonable plan for the development. As for the suggestion about a project management type of discussion area, that might be doable. I'm not sure how far that will stray from the core focus of the entire forum, but I'm sure we'll talk about it (at some point) among the administrator and moderator groups.Thanks for sharing.
Link to comment
Share on other sites

No problem. The most useful and easy to use websites and applications are those that are well thought out and planned rather than randomly pieced together.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...