views:

223

answers:

4

In some projects, I have to deal with more than one programming language (for example a Delphi GUI application which communicates with an C# or Java app). The Subversion repository currently contains three top branches, one per language.

Should I change this and group all parts of the project in the trunk like in the following example to make branching and tagging on project level easier?

project1
  branches
  ...
  tags
  ... 
  trunk
    csharp_app
    delphi_app
    java_app
    ...
project2
...
+1  A: 

I don't think it's a good idea, because theoretically the different components could break compatibility, and if they don't stay synced up it would be hard to go back to the last working good config.

Chad Okere
Which part could break, do you mean the project build process or the migration to the new directory layout?
mjustin
Putting the things in different trunks won't cause it to break. I only mean that different versions of the various components won't work together. So version 20 of the C# won't work with version 5 of the java stuff. And if you have to back to version 5, you now have to remember which version of the C# worked with it. That might not be very easy. -- but if everything gets synched together, that's not a problem.
Chad Okere
+3  A: 

Programming language is irrelevant when you're managing a single project. A single module may be written in a variety of programming languages but still be too tightly coupled to worth separating. If each module of the application (whether or not it's written in the same language) is independent enough to be considered a separate project (and consequently, become independently versioned), you may want to separate it. Otherwise, don't do that.

Mehrdad Afshari
"Tight coupling" describes best what I like to achieve. +1
mjustin
Actually "Tight coupling" is a bad thing. see: http://en.wikipedia.org/wiki/Coupling_%28computer_science%29#Advantages_and_disadvantages
Chad Okere
Tight coupling has disadvantages, yes. But it's necessary a *lot* of the time. Most any library/client-code is "tightly coupled"
Brian Agnew
+1  A: 

Yes. The criterion is whether the apps require some form of synchronization of their features between each other, and that communication protocol (API, shared code, shared libs) may change over time. If the apps have nothing to do with each other, then separate repositories. Having apps written in multiple languages in the repository is irrelevant.

cjrh
+7  A: 

As these separate sub projects interact, then they need to move in lockstep, and you need to tag/branch/release the C#/Java/whatever components together. If they're unrelated then I would advocate (perhaps) separate repositories, or separate directories within the same repository. But not branches or tags.

Branches are used to manage different development streams on the same codebase. Tags are used to indicate a particular point in the project's evolution.

I think the programming language is irrelevant. Ask yourself what your releasable is, and how you need to manage this. I've done this successfully in the past with projects incorporating Java and C++, and the language is not the issue - it's keeping the components in sync that you need to manage.

I wouldn't necessarily create a new top-level directory per language. What happens if your Java component suddenly requires a JNI layer ? It strikes me that the implementation is reflected in the top-level directory structure, and that shouldn't really be a concern.

Brian Agnew
Yes, I wrote that the releasables interact. Moving in lockstep is what I need.
mjustin
You did. Modified appropriately
Brian Agnew