I'm writing an interface to a lexicon in Java. I just started this project, and the lexicon is on version 3.8. When a new version comes out, say version 4.0, database columns may be renamed, removed, added, re-organized, etc. The database could be totally different, and my 3.8 interface would not work with it, so I would need to update the library to interface with 4.0. However, I also want to maintain backwards compatibility with 3.8, and continue to do development on all versions until I drop support for them.
I believe that source code control software like Git (which I'm using for the project) can make maintenance and feature addition to different versions really easy through branches and release tags, but I'm not sure how to organize the project.
How does one manage a single library that interfaces with multiple versions of a data source, that may each need continued development?
My thoughts:
- Most recent version of the library's development goes in master
- development for old versions are in OLD_VERSION_XXXX branches where XXXX might be:
- stable
- development
- any random feature/bugfix branch that gets merged into dev or stable for that version
- Use Releases and Tags in Github to ensure consistency between these versions, and to release new compiled versions when necessary
Note: This is a personal project that (probably) only I will use, but I want to apply some real-world practices the right way.