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

Introduce presenters #188

Open
marcoow opened this issue Jan 22, 2025 · 0 comments
Open

Introduce presenters #188

marcoow opened this issue Jan 22, 2025 · 0 comments

Comments

@marcoow
Copy link
Member

marcoow commented Jan 22, 2025

Currently we're using the entities and changesets in the web crate directly. That's of course easy but also means we're coupling the app's HTTP interface directly to the db crate which is exactly what we want to avoid. We can easily address that via introducing presenters. We can fix that relatively easily by introducing the concept of presenters such that for input data (e.g. when creating an entity), we have a presenter that wraps (or converts to) a changeset and for output (e.g. JSON responses), we have a presenter that wraps or is generated from an entity.

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

1 participant