Refactor db_connector.py
Opened this issue ยท 0 comments
arvimal commented
I've selected db_connector.py for refactoring, which is a module of 28 lines of code that couples the top-level components tightly. Addressing this will make our codebase more maintainable and improve Better Code Hub's Couple Architecture Components Loosely guideline rating! ๐
Here's the gist of this guideline:
- Definition ๐
Minimize the amount of interface code; that is, code in modules that are both called from and call modules of other components ("throughput"), and code in modules that are called from modules of other components ("incoming"). - Whyโ
Having loose coupling between top-level components makes it easier to maintain them in isolation. - How ๐ง
You can hide a component's implementation details through various means, e.g. using the "abstract factory" design pattern.
You can find more info about this guideline in Building Maintainable Software. ๐
โน๏ธ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the ๐ฒ next to them. The risk profile below the candidates signals (โ ) when it's enough! ๐
Good luck and happy coding! โจ ๐ฏ