Geeks With Blogs


Dylan Smith ALM / Architecture / TFS

We have a rather convoluted check-in process that we have implemented here.  I would definately appreciate any advice anybody could give me how to simplify this for my developers.  We wish to avoid having the developers make merge decisions.  The primary reason being that some of our devs are junior and may not posess the skills necessary to make intelligent merge decisions.  So we use the exclusive check-in option in TFS.  There is still the problem of them starting to edit a document without doing a Get Latest first.  This will cause the file to be checked out, but they may not have the latest version.  Come check-in time they will be prompted to merge their version with the latest version in Source Control.  This is avoided by just making sure everybody always does a get latest before trying to edit a file.

The way our solution is structured, is we have a WinForms UI and a Web Service interface to our middle-tier.  The middle-tier is actually segregated into several different web services.  We use a proxy class to access the web service.  It is initially generated by wsdl.exe (the same tool that runs in the background when you create a Web Reference inside of VS).  But there are a number of manual changes we need to make every time we re-generate this file; the main one being to remove all the classes that are generated inside the proxy and having it use the classes that are provided by a referenced DLL.  We also edit the constructor to remove the hardcoded URL it uses to access the web service.

We use custom business classes to transport the data between the UI and web service layers.  These class definitions are placed inside a DLL that both the UI and the web service projects reference.

Both the UI and the Web Services themselves need to use this proxy class since they both need to access multiple different web services.  So we just made the proxy class live inside our DLL so both the UI and the Web Service can access it.

The way that this project is structured works very well, except it makes the source-control process a nightmare.  Our Web Services are split into many files, so we could have multiple developers modifying the same web service.  The first problem they encounter is if they are all making changes that would affect the public interface to the web service, then they will all need to regenerate the proxy file using wsdl.  Well since we are using exclusive check-out this poses a problem.  What we do now is just make the file writable manually and regenerate it locally without checking it out.  When it comes time to check-in this is the process the developers have to follow:

1) Perform a Get Latest on the whole solution (this will overwrite your changes to the proxy class since it wasn't checked out).

2) Recompile the solution.

3) Checkout the proxy class file.

4) Regenerate the proxy class using wsdl.exe

5) Make the necessary modifications to the proxy class (the same ones that are needed everytime we regenerate it).

6) Recompile

7) Check-In your code


This is needed because we will have to pick up any changes made by other people to the web service, then regenerate the proxy file so it takes into account not only our changes but everybody else's.  And if other people changed the web service, it's possible those changes depend on changes in other projects (especially the DLL project) and those other projects may depend on yet other projects.  So the easiest way is just to Get Latest on everything.

There are a few other pieces of the project that require a similar type of process, and if you happen to be making changes to a few of these sensitive areas at once the Check-In process can get quite lengthy and involved.

Of course if we were allowing the developers to merge their code at check-in this process would probably be quite a bit simpler (depending on whether or not you consider making merge decisions simple).  But I wish to find a process that can avoid merge decisions if possible.

What are everybody else's thoughts on this solution?  How would you do things differently?  Leave a comment and let me know.

Posted on Friday, June 30, 2006 10:48 AM | Back to top

Comments on this post: Convoluted Check-In Process

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Dylan Smith | Powered by: