nat236919 / covid19-api

API for exploring COVID-19 cases around the globe
https://nuttaphat.com/covid19-api/
MIT License
119 stars 63 forks source link

Integrator code refactoring #279

Closed aliraeisdanaei closed 3 years ago

aliraeisdanaei commented 3 years ago

Related Issue:

The class for the version two integrator follows this name CovidAPIv2Integrator, so it would make sense for the version two integrator have this name CovidAPIv1Integrator. Instead the class is named CovidAPIv1.

This causes a coginitive overload complexity for the developer to know that any call to the class of the integrators must use different namings for the different versions. This produces a problem when the classes or the client code calling these classes are being changed constantly. I was using a search and replace to change refactor the client coding calling these two classes, and I noticed how some search and replace commands would produce incorrect code. With a little less attention to detail problems would arise really easily.

Proposed Changes

Checklist