Skip to content
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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

DenDy1227
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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:

  1. 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 the main method violates the Dependency Inversion Principle. Implement dependency injection to improve this.
  2. Strategy Pattern:

    • Replace the switch-case statement in TransactionDaoImpl with the Strategy pattern to meet the task requirements and enhance code flexibility.
  3. 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.
  4. Project Structure:

    • Ensure your project structure adheres to the required package organization, such as db, model, service, service.impl, and strategy.
  5. Error Handling:

    • Enhance the parseTransaction method with robust error handling to manage unexpected CSV formats.
  6. Constructor Chaining:

    • Optimize constructor overloading in FruitTransaction by using constructor chaining to reduce redundancy.

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! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants