Refactor the deign smells for better code quality #143
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe what this PR does / why we need it:
This pull request addresses identified design smells in the codebase and implements refactoring techniques to enhance the maintainability, modularity, and reusability of the code. Specifically, the changes improve code structure by extracting and encapsulating logic, thereby reducing duplication and improving overall code quality.
Does this pull request fix one issue?
NONE
Describe how you did it:
Pull-Up Method: Moved shared functionalities from dependent classes to a higher-level class. This ensures the functionality is reusable and avoids redundant code duplication. Other classes now simply call the centralized methods.
Extract Method: Isolated specific retry logic from the original class and shifted it into a dedicated class. This approach simplifies the original class by abstracting reusable functionalities into separate methods, making the code more modular and easier to maintain.
Describe how to verify it:
Special notes for reviews
This code refactor aims to enhance readability, maintainability, and modularity without altering the core logic. Feedback on the clarity of these changes and their alignment with best practices is highly appreciated.
Additionally, these modifications align with project standards and may serve as a basis for further improvements. Any suggestions for optimizing the variable naming, refactored functions, or memory handling logic would be particularly valuable.