-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
task-jv-fruits_store_implementation #1287
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your hard work on this project! 😊 There are a few critical issues that need to be addressed before we can approve your pull request. Specifically, the code does not fully adhere to the SOLID principles, particularly the Single Responsibility and Dependency Inversion principles. Additionally, the Strategy pattern should be implemented instead of using switch-case statements. The hardcoded file paths need to be replaced with relative paths as per the task checklist. Once these issues are resolved, your code will be much stronger and ready for approval. Keep up the great work, and don't hesitate to reach out if you need any help! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great effort on your submission! 🎉 While there are several areas for improvement, the decision to approve your pull request is made to help you progress in your learning journey. Here are some key points to address:
-
SOLID Principles:
- The
CsvProcessor
class currently handles both reading and processing CSV data, which violates the Single Responsibility Principle. Consider separating these responsibilities. - Direct instantiation of
TransactionDaoImpl
in themain
method violates the Dependency Inversion Principle. Implement dependency injection to improve this.
- The
-
Strategy Pattern:
- Replace the
switch-case
statement inTransactionDaoImpl
with the Strategy pattern to meet the task requirements and enhance code flexibility.
- Replace the
-
File Paths:
- Avoid hardcoding file paths. Use relative paths or configuration files to specify paths, ensuring they are placed in the
src/main/resources
folder.
- Avoid hardcoding file paths. Use relative paths or configuration files to specify paths, ensuring they are placed in the
-
Project Structure:
- Ensure your project structure adheres to the required package organization, such as
db
,model
,service
,service.impl
, andstrategy
.
- Ensure your project structure adheres to the required package organization, such as
-
Error Handling:
- Enhance the
parseTransaction
method with robust error handling to manage unexpected CSV formats.
- Enhance the
-
Constructor Chaining:
- Optimize constructor overloading in
FruitTransaction
by using constructor chaining to reduce redundancy.
- Optimize constructor overloading in
These improvements are crucial for the functionality and maintainability of your code. Keep up the good work, and use this feedback to refine your skills further! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
No description provided.