Book a Demo

Author Topic: What is recomended solution for code branching  (Read 3427 times)

Petr Žlebek

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
What is recomended solution for code branching
« on: June 15, 2010, 05:45:25 pm »
Hi,

I'm desperate  :'(
For C# developing in our company we use Vistual Studio 2008 (VS) and TFS 2008. For modeling we are starting to use Enterprise Architect 8 Professional Edition.

We discovered that EA supports Version Control (with connection on TFS) and Package Control. We are using MGD link for synchronization changes between EA model and VS. Thats great but problem is that we developed with branching and merging of source codes.

When customer wants new feature, we create new DEV branch from the MAIN branch. In this DEV we want to design UML model concretely Class Diagram which is synchronized with source codes in the DEV branch. When this develop is done, we want to merge this changes in the DEV branch merge to the MAIN branch also with changed EA model. We want to keep DEV's and MAIN branches synchronized with UML model (Class Diagram).

Exist any recommended solution or practice for EA-MGD Link for this kind of development?

Thank you for your time and kindness.

Petr Zlebek

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: What is recomended solution for code branching
« Reply #1 on: June 15, 2010, 06:00:25 pm »
Petr,

The recommended way for branching in EA is: don't! :-/

If you really want to keep model and code 1:1 synchronised you'll have to branch/merge the model as well.
I'll promise you that it will be a major PITA, so if in anyway possible try to avoid branching/merging in EA.

Geert

Petr Žlebek

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: What is recomended solution for code branching
« Reply #2 on: June 15, 2010, 10:13:44 pm »
Thank you for your assurance.
We tried to branch/merge the model as well, but paths of classes was different for MAIN and DEV and EA worked with them like with two entities (c:\main\MyClass.cs and c:\dev\MyClass.cs). EA perhaps didn't works with relative paths. Probably this is that PITA that you are talking about it.

All right then, if EA doesn't supports branching/merging strategy, which other UML tool supported it? This strategy is necessary, because we are working on lot of big solutions with many projects.

Petr Žlebek

« Last Edit: June 15, 2010, 10:15:11 pm by petr.zlebek »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: What is recomended solution for code branching
« Reply #3 on: June 15, 2010, 11:50:54 pm »
Petr,

Its not that EA doesn't support branching/merging, but the fact that you will have to branch/merge both your code AND the model.
Merging the code is difficult already, but merging a model requires at least the same effort, so you are effectively doubling your merging effort if you want to have a model of all your branches.

As to the problem of your paths being different: lookup "local path" in the help file. That should fix your problem.

If I were you I would look into baselines to see if that could provide an acceptable way of working.

Think about it, do you really need a model wich develops in two (or more) parallel branches, or can you get by with using a linear model; where consecutive changes are made on top of the previous.
In the latter case you only need to be able to take regular snapshots (baselines) of the model to be able to go back to the state of a model at a certain release.

Geert