I am working on a C++ product currently. It was designed to have a fair amount of flexibility and has grown bigger and bigger. Now we are planning to cooperate in a project where we would like to contribute parts of the product: some parts as source code, some parts as static link libraries, some parts not at all.
I would like to keep one version of every source file which is used in both projects and avoid branching the whole thing etc. So I was wondering what I need to be able to have the “full product” internally with all files and also be able to extract a part of these files (every now and then) and pass this subset as a working unit to others. (I assume we can ensure that these files are not changed in the cooperation project, we will only add stuff there.)
I guess I need
- a software architecture that is loosely coupled so that parts can be removed without breaking the system. I think the term “static” plugin is appropriate here because I think I can learn from plugin systems, but I do not need to have the ability to load them dynamically, they can be linked/built in a static way. I hope this could force me and my co-workers to extend the system by adding some kind of a plugin instead of inserting classes here and there, introducing coupling between things.
- a build system that supports me with selecting which plugins to build and “releasing” new subsets by extracting only what I need.
Are there any internet resources that might help. What are the keywords to search for?
Do you have any suggestions on how to handle this?
There’s an interesting article series from Dr Dobbs that you might want to check out. I seem to remember that it supports static linking of plugins in addition to the usual dynamic linking. Check out Building Your Own Plugin Framework.
Good luck!