views:

101

answers:

4

I work with a team of several developers. We develop and maintain many different products which are related to our company. What are some good ways to share code that does common enterprise tasks such as logging, database access, XML handling, etc?

We typically have several different versions of the same or similar classes/libraries among the various projects. It would be nice to consolidate enhancements various team members have made to the code so that when a developer begins a new project (or enhancement) he/she has the most recent version of the code with all the latest bells and whistles. We'd like to minimize the number of times we have to "reinvent the wheel" by redoing work someone else has already done but are not sure of the best way to communicate and distribute these changes through the team. What is the best way to structure a repository to make this type of code more easily shared?

One idea is to create a separate project that only includes this type of code (and includes all of it). This way when someone fixes or enhances something their changes will be committed to a known location in the company repository.

Are there any other ways for doing this?

Thanks.

+1  A: 

Try a project management framework such as Maven. It's designed so common enterprise components can be uploaded to a central repository for later reuse.

futureelite7
+1  A: 

We had a similar problem. To solve it, we created a "tools" project. If a developer feels code could be useful to other teams, they put it there instead of into their own project's code. That helps somewhat.

But in the end the best way of solving this is encouraging (informal) communications and exchanges between different teams. That way people will find out if they are solving similar problems.

sleske
+2  A: 

You have the proper way of doing it, so, without reinventing the wheel, create a 'Utils project' & share the assemblies, simple & effective.

SoftwareGeek
+1  A: 

We have I solution project called "_GAC". The produced assemblies from this solution are used in all our other solutions and are added as references (of course they are under source control). The difference from the other answers is that we do not build those dll-s every time and there is no chance someone decide to make "a quick" fix without introduce it to other projects. When a new version of our GAC is made, we spread it in all other projects and the changes are made only in the GAC's solution. There is a special person in the developers who deals with our GAC (except all the other work, he does).

anthares