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

Domain Layer Mapping #52

Open
AldrichMascarenhas opened this issue Mar 1, 2019 · 1 comment
Open

Domain Layer Mapping #52

AldrichMascarenhas opened this issue Mar 1, 2019 · 1 comment

Comments

@AldrichMascarenhas
Copy link

The layer defines the Bufferoo class but no mapper. This is because the Domain layer is our central layer, it knows nothing of the layers outside of it so has no need to map data to any other type of model.

Is there a detailed reason why the Domain Has no Mappings?
wouldn't a Bufferoo fetched from an external source need to be mapped to a Bufferoo in the domain?

@qwertyfinger
Copy link

qwertyfinger commented Mar 30, 2019

That's because Domain is the innermost layer, it shouldn't know anything about external source models.
In only says 'I want to get this thing and I am going to do something with it. I don't care where it comes from, I only care that it's a Bufferoo'.
The Data layer, as the outer one, knows how a Bufferoo looks, so when it gets a model from external source, it's responsible for mapping it to a Bufferoo.

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

No branches or pull requests

2 participants