Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.
What is the best practice in maintaining one source code base for an application that has different customizations different entities?

Answered What is the best practice in maintaining one source code base for an application that has different customizations different entities?

  • Thursday, April 12, 2012 4:00 PM
     
     
    I am in a situation where I have a custom application that was developed for one customer and others are wanting the same basic custom application with changes to meet their needs.  What is the best practice in managing this source so I do not have multiple copies of the same application source code to maintain?

All Replies

  • Thursday, April 12, 2012 9:37 PM
     
     Answered

    Practically if you are serving multiple customers you will get into situations where a customer will report a bug which may or may not be the other solution. Each customer would want to advance the customizations to their solution at some point or the other.

    In my opinion there are two ways of going about it.

    1. Strip the common components out and create a separate team project and manage that as a library. You can manage maintain & test the core common libraries in this team project. Any one who needs to reference this library will simply use the latest dll generated by building this library in this team project. Of course this will be require a fair bit of work but in the long run will be easy to manage. As more customers ask for more customizations you will have separate copies of the code outside of the core components which you can open up to customizations as per user requests.

    2. If it is difficult for you to strip out common code you can follow a branch structure like below.

                                                 Root - Current Solution with no customization

                                                              |                 |              |

                                                         Cust1             Cust2       Cust3

                                                        |    |    |                 |         

                                              featureR1 ..    FOF            FOF

                                                

    The root folder is the original solution. Each new customer gets its own branch which is the latest code base from the root branch. Customers who decide to advance the solution with customizations get a feature branch and a fof (fix on fail) branch. The feature branch is for pure dev advancement and once it reaches a point where its ready for release you can continue to create branches for each release or just have one feature release branch and provide production support from the FOF branch. If you find any bug fixes that are fixed in featureR1 and are common to every customer, u could cherry merge this from cust1 to root and then cascaded that all across to other customers.

    HTH
    Cheers, Tarun


    Please remember to mark the replies as answers if they help.

    Tarun Arora

    Blog: http://geekswithblogs.net/TarunArora  Subscribe in a reader

    • Marked As Answer by johnevv Monday, April 16, 2012 1:15 PM
    •  
  • Monday, April 16, 2012 2:18 AM
     
     

    I would recommend you branch the basic custom application for other customers. Then you can customize the app based on that copy: add features, fix bugs, and etc.

    As Tarun suggested, it's better to strip out the common components out. You'll get benefit from it in the future.

      


    Windy Liu
    Dynamsoft: Team Foundation Hosting | Version Control Software