Multiple Applications Same Trunk? Best Practice help required - tfs

I did a check if this has been asked before but the closest I found were questions around a single application with different branches for clients.
What is the best strategy for handling multiple applications in version control? Say I have 5 completely separate applications that can require changes at any point. Do I put them all under the same main trunk (origin/master if you will) then branch off as required or should they all get their own trunk?
Let me know if it's not described well and I can add more information.

You should see the Branch strategically:
When should the team add a branch?
You should create branches in the following situations:
When you must release code on a different schedule/cycle than the
existing branches.
When your code requires a different branch policy. If you create a
new branch that has the new policy, you can add strategic value to
your project.
When functionality is released to a customer and your team plans to
make changes that do not affect the planned release cycle.
You should not create a branching for each user story because it
creates a high integration cost. Although makes branching easy, the
overhead of managing branches can become significant if you have many
branches.
In you scenario, It's based on how do you want to manage the applications, different schedule/cycle ... then you need to track in another branch as David mentioned above. And if the size of applications are very large, you can even version control them separately in new team project.
This article for your reference : Branching and Merging: Ten Pretty-Good Practices

Related

Effects of Changing Area Path in VSTS?

My questions are listed at the end of this post but reading the background info first will help understand the context of the questions.
Background
I've had some limited experience working with TFS (on-premise) as a development team member in the past, and I'm generally familiar with the basic concepts. But now I'm also tasked with administering a VSTS instance (cloud). Most of my experience using TFS was centered around the project management features (backlogs, sprints, work items, etc.).
I'm rolling out VSTS in 2 phases. The first phase focuses on the non-technical project management aspects of the configuration. The second phase will focus on technical aspects such as managing source code and other development artifacts. I have some experience working with the source control aspects using TFVC repository, but no experience with Git repository.
I completed the preliminary design of the basic configuration (Teams, Area Path, Iteration Path, etc.) for VSTS. I suspect that my Area Path will need adjustment at some point in the near future. From what I've read, VSTS does a decent job of automatically updating Work Items (e.g. Features, Product Backlog Items, Tasks, etc.) when changes to the Area Path are made.
Questions
What I'd like to know is how other technical areas of the product (e.g. code repositories, build definitions, etc.) are affected when changes are made to Area Path. For example, if I inserted a completely new node somewhere within the Area Path, how badly will that "break" existing VSTS functionality (and what type of functionality will be broken and require manual repair)?
This is an easy one:
Area paths only affect work item tracking. Period.

Branching a project for multiple customers

We have a project with multiple customers. Suppose application name is Ali-Systems. Foo company will have Ali-Systems Foo, Bar company will have Ali-Systems Bar and so on. All versions have almost same structure. But their logic are different. For example there's a BillIssue method for all versions, but its logic may be different. Either how to calculate or even the difference between their DB models(we are using ASP.Net MVC Entity Framework)
As I understand there is some branching strategies categorized by Microsoft like Development Isolation(which enables
concurrent development of the next release, experimentation, or bug fixes), Release Isolation(which enables concurrent
release management), etc.
Can I take advantages of Branching for this purpose and how? Or I should create separate repository for each customer's project?
NOTE : In fact I want to clone the base of a project to some derived projects which will never merge again together. But we must able to add features to all derived projects(probably with help of another branch)
Microsoft has Visual Studio Team Foundation Server Branching and Merging Guide , that can be used to choose the branching structure. Including Main Only,Development isolation,Feature isolation,Release isolation,Servicing and Release isolation,Servicing, Hotfix, Release isolation...
In your case, the core of the project, is similar , but for each company has its own personalization of the product(logic / DB models ), and maybe will evolve independently in the future.
Using some branching structure, the main limitation it becomes a maintenance nightmare for solving bugs and global changes.
For example, if you want to merge changes from one company to another was very complex and it required retesting each version separately . Moreover, for bug tracking, one team will solve the bug in their version and another team will have to merge that change from the version they don't fully understand.
To support such development scenario suggest to share extensible core
and data model which will be configurable from upper customizable
application layers. This core should be used as the base for each
customer/company specific customization and maintained by separate
team(for each company). It will include some management complication
because multiple project managers may need resources from the same
team but it is a good way to make architecture consistent, control the
whole process and keep versions in sync.
Besides ,if a person or team need to work across multiple companies in the local machine, one way to keep the local environment clean is Using multiple workspaces with Visual Studio

App versions duplication

I have a problem, I have several versions of the same application but the process of duplicating and managing several duplicate applications is becoming very complex, each copy gets unique features by client demand.
What methods are used to simplify this process?
Do I need to have detailed documentation about every App?
I'm trying to separate the code by modules and had them according to the clients demand, am I on the correct path?
Sorry for the bad English, any question just ask, I'm always online.
This can be managed in your code revision system. Git and Mercurial allow you to manage code as "change sets". You could have a branch for each client, and have a main branch (trunk) where you add features for everybody. In the client branches, you add feature sets for individual clients. If you want to merge them back to the trunk, you can. You can also merge from the trunk to branches.
Of course, it's important to develop in a modular way in order to facilitate this approach. Also, unit tests speed things along when you have to merge.

What is the ideal way to label version histories in TFS?

In the development of our software we create releases that are specific to currently existing customers. there are many similarities between our releases but ultimately they must be considered separate versions of the software. Because all releases are built upon the same code with only slight differences, in what manner should labeling and version be performed?
I would suggest that you first apply a good branching strategy. You could create one branch for each customer and let the common code base live in the main branch. As for versioning you should consider using one version number for the common code base and a separate version number series for each customer specific branch.

TFS branching, what are the advantages

I am pretty new to TFS and source control. I unable to understand the advantage of branching. Since i can do the same stuff by creating 2 folder main and development, when I am done with development.I can merge the code using any diff tool with the main branch.
Then whats the point of having branches ? I know there must a huge advantage but i am unable to understand.
(UPDATE: TFS now supports git for version control so the rest of this answer no longer applies)
I would google branch-per-feature.
The main advantage of branching is that you can work on a feature and not be interrupted by anyone else's work. When you are ready, you can merge and see if many features work well together or not. This is usually done as the feature is developed but for small features can be done once the feature is complete.
The advantage is that you have a clear history of what you did to implement something. Without branches, you would have a whole lot of commits mixed together with other features' commits. If QA does not pass a certain feature, you have your work cut out for you to put together another build using just the commits for the other features. The other alternative is to try and fix your feature so that QA passes. This may not be doable on a Friday afternoon.
Feature toggles are another way to omit work but this increases the complexity of code and the toggles may themselves have bugs in them. This is something to be very weary of and see how this became an "acceptable" work-around.
Branches are also used to track changes to multiple versions of releases. Products that are consumed by multiple customers may be in a situation that one set of customers is using 1.0 of the product while others are already on 2.0. If you support both, you should track changes to each by branches that are designated to them. The previous points still apply to developing for these branches.
Having said that, TFS is not ideal at branch-per-feature for a number of reasons. The biggest is that it does not support 3-way merges - it only has what is called a baseless merge. The way history is tracked, TFS cannot show you a common ancestor between the feature branch and where you are trying to merge it to. This leaves you potentially solving a lot of conflicts. In general, a lot of people that use TFS shy away from branching for this reason.
3-way merges are great because they will show you what the common ancestor is, what your changes are and what the changes in the other branch are. This will allow you to make a very educated decision on how to resolve a conflict.
If you have to use TFS, I would suggest using git-tfs to be able to take advantage of 3-way merges and many other features. Some of them include: rerere, rebasing, disconnected model, local history, bisect, and many many more.
Rebase is very useful as it allows you to alter a feature to be based off of another starting point, omit commits, squash commits together, split commits, etc. Once ready you can them merge into an integration or release branch, depending on the workflow you decide upon.
Mercurial is also another one that may be easier to use, but will not be as powerful in the long run.
If you have the opportunity, I would highly recommend moving away from TFS for source control due to a lot of limitations when compared to modern day DVCS.
Here is a nice set of guidelines to follow if you want to effectively manage branching/merging:
http://dymitruk.com/blog/2012/02/05/branch-per-feature/
Hope this helps.
There is a lot of information to read through, but there is TFS Branching Guidance located here if it helps at all - http://tfsbranchingguideiii.codeplex.com/

Resources