Multiple Projects, Similar Functionality.

I started a project more than a month back using Subversion, NUnit, and Trac. Here’s the problem now: I have a new project that does almost the same thing. They’re totally different projects and have no dependencies on each other. There’s just a set of code that could be reused by the new project.

How should I handle the source code?
1. I could just keep them separate and that’s no problem at all.
2. I could branch off and start a parallel project within the current repository.
3. Something else?

I haven’t had experience with this situation and need some suggestions.

One thought on “Multiple Projects, Similar Functionality.

  1. Hey Tom nothing easier than that, you need to look up package design patterns. If I had to code I could tell you more but package design is the way to go. In Eclipse there is a tool called iSpace that will show you package relationships. As far as I can tell by your story I would suggest creating an interface that uses abstract classes that can be extended through your second project, or in any case reuse some functionality, becarefull about the dependencies. You got to keep in mind that if you change one package and you using functionality of it in an other package you will have to rebuild everything that would suck big time since they are two different project. THere are some principles that you should also keep in mind Common-Closure Principle, Acyclic dependencies principle, stable dependencies principle, stable abstractions principle and common reuse principle. If you run in to one of these problems you can use the definition and solutions provided buy the Dependency inversion principle if you need docummentation about these principles let me know.

    Peace Malvin

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve this: Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.