On my first part-time programming gig during college, I dealt with a large-ish web application responsible for handling a periodic event hosted by our client, largely a plain CRUD snoozefest with a number of forms for the users to fill out.
The forms change between events, with most forms having a small amount of changes done to them - some fields added, removed, and adjusted, e.g. an open question split into two or a choice changed from radio to checkboxes. All forms from previous editions must be accessible at all times.
The code quickly became riddled with base classes such as:
veryImportantFormModel
veryImportantFormModelLegacy
veryImportantFormModel2017
consisting mostly of copy-pasted code throughout many layers of the backend and frontend. Which to my clueless junior developer eyes looks like a quick way to accumulate unmanageable amounts of debt, and hopefully is not the go-to solution for what I assume is a very common scenario.
What would be a saner way of doing things?