Use DAO pattern for class naming for DAOs #3515
iliyan-velichkov
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
I'm converting this issue into discussion, as there are different opinions which term is the more appropriate one. As @delchev commented: Comparing the Two Patterns
Also, if we have an anemic domain, the repository will be just a DAO. Additionally, the repository pattern encourages a domain-driven design, providing an easy understanding of the data structure for non-technical team members, too. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, all DAOs are named *Repository for example LanguageRepository.
I think will be better if they are *DAO like LanguageDAO.
DAO is more widely used. Repository is something spring specific.
Examples:
![image](https://private-user-images.githubusercontent.com/5058839/305013450-fe663bb2-636e-43d9-8d9c-6c9449864b3c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMzY1ODUsIm5iZiI6MTczOTEzNjI4NSwicGF0aCI6Ii81MDU4ODM5LzMwNTAxMzQ1MC1mZTY2M2JiMi02MzZlLTQzZDktOGQ5Yy02Yzk0NDk4NjRiM2MucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMjEyNDQ1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NThlZTVkNzNmYjg4YjQ5NDE1NjFkY2ZjMzBhNGMxMjJiYzE1NDA0NDU5ZWIwYTk1NWI2MzQzMGI1OGQ3ZTc2NCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.GQCFoajuZ3jwhy3nKKUkDvFy7eV8So3KQMM1pZDfkwE)
Beta Was this translation helpful? Give feedback.
All reactions