I'm constantly supporting a specialized downloader I wrote 5 years ago! It has to login and download from more then 40 sites. I have kept changing the code over and over as I encountered new sites or when a site's structure completely changed.
This approached worked until now, but recently more and more changes are coming my way and it has become very hard to implant them, my main class is almost 5k
lines and I was wondering:
- Should I continue this approach and soldier through and fix what needs to be fixed?
- Should I rewrite the whole class which might take at least 2 weeks which I will not get paid for! and will force my clients to wait for a while!
- Or should I try creating a new class for each new site that comes, this class can inherit the main class and I can overwrite any function which needs to be overwritten for this special site.
Personally, I'm thinking option 3, any advice?