-
Notifications
You must be signed in to change notification settings - Fork 1
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
Interactor create #6
base: master
Are you sure you want to change the base?
Interactor create #6
Conversation
Development
Adding a simple router
@@ -0,0 +1,8 @@ | |||
import DataAccess from './DataAccess.ts' |
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.
Eu colocaria essa classe fora do diretório Interactors, em: app/Repositories/Tasks/Task.ts
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.
Você fala do DataAccess
ou do Repository
? Optei por deixar ambas nesse local para que o diretório simule a camada de Casos de Uso. Nesse caso apenas Repository
, que é uma interface, ficaria nessa pasta e as classes que a implementam ficariam no diretório que sugeriu. Já a DataAccess
deixei também aqui pois o Caso de Uso depende diretamente dela, assim nada que o caso de uso dependa estará fora da pasta.
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.
Estava falando do Repository
. Você tem razão, acho que eu não tinha me atentado para o fato de que ela é uma interface
@@ -0,0 +1,8 @@ | |||
interface DataAccess |
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.
O que te motivou a dar esse nome para essa interface?
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.
Foi a tradução que usei para "Dados de Acesso", mas agora que você questionou, se formos tentar usar a arquitetura limpa talvez eu tenha que nomear a classe que chamei de Repository
para DataAccess
e dá outro nome para essa ou extinguir e trabalhar diretamente com entidades, o que acha?
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.
Eu gosto da nomenclatura Repository
, mas creio que o nome não fará diferença desde que seja semântico e sigamos um padrão
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.
Também acho bom, mas não considera que DataAccess
é ainda mais abstrato?
No description provided.