Several applications with common code - how to approach this?

My company has two or three web applications that use a lot of common code - a custom MVC environment, utility classes, JavaScript libraries, etc.

We would prefer not to duplicate all this code in each application, because in the end we have several different versions of its use. But we donโ€™t want applications to require an exact copy of this code, because we donโ€™t want the update for one application to potentially violate another.

Does anyone have any tips for solving this problem? I don't think I'm looking for a technical answer - a more general approach.

We could make code in the library and allow applications to stay in the old version of the library until they are ready to upgrade. Or we can do this in several libraries, so we do not need to update everything at once. But would it be difficult to manage the interdependence between library versions?

+4
source share
4 answers

I am using SVN with svn: externals. Things that you want to be stable must be in the tag folder, so dependent projects will not be affected by other events in the trunk.

+5
source

It depends on many, many factors - different languages โ€‹โ€‹have different forms of behavior in relation to libraries. The way I usually figure this out is to have a battery of tests in each application for its external dependencies, including the libraries that I wrote, and use it to update from the mentioned libraries from hacking the application.

More details about the platform you are using? There may be special tools to help you with your specific needs.

0
source

I am the second SVN with svn: externals. We have a client and a server on which there is code. The code is maintained under the server (but can be ported to its own repo), and the client pulls it in using svn: externals. The client container is pulled out of the server trunk. But when we expand (say for release), we bind the external anchor to a specific branch, branch or tag. If you donโ€™t do this and go back to the old branch and update it, you can get a connecting line for the common code, which is most likely not what you want.

0
source

I would create one source control branch for generic code representing the latest and best version.

Then for each project there will be your own independent branch of this code, where you can quickly correct the situation, if necessary, or have stability when it is close to release.

Perhaps you have a Wiki that lists bugs found in the common code so that other users of the common code know about it and get time to fix it at your leisure.

Git will work well for this, as it is good to merge changes back into the "master" branch.

0
source

All Articles