ITC-NTHU / LyricLab

1 stars 0 forks source link

DEVELOP 05: Domain Modeling #6

Open jerry914 opened 2 weeks ago

jerry914 commented 2 weeks ago

Task

I couldn't find your Heroku Web App URL in the Google Team Sheet. Please ensure your application is deployed online. Feel free to ask for assistance on Teams if you need any help.

RuboCop/Code Smell Offenses

There are a large number of RuboCop offenses across different files. Please remember to check and modify them.

You're making great progress—keep pushing forward!

soumyaray commented 1 week ago

https://github.com/ITC-NTHU/LyricLab/blob/7e64eda04e99227fa5c4efa0e0c2b9b2db3b2e97/app/domain/aggregates/recommendations/recommendation.rb#L29

Hey folks, don't put methods in the domain entities that talk to the infrastructure – make a service object (this week) that calls the infrastructure directly. Updating the database is not business logic.

soumyaray commented 1 week ago

https://github.com/ITC-NTHU/LyricLab/blob/7e64eda04e99227fa5c4efa0e0c2b9b2db3b2e97/app/domain/aggregates/song/entities/vocabulary.rb#L27

Here again, don't ask domain entity to reach out to outside infrastructure (OpenAI)

soumyaray commented 1 week ago

Lastly, and this is a big one, none of your entities/values have any business logic yet. It seems that you are simply aggregating outside resources so far. Let me know if you need a session to discuss what/where your value-adding logic is!