aws-samples / aws-samples/serverless-rust-demo

[Question] Cleanup of hexagonal structure

Open
#39 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
300
Forks
30
PR merge metrics
No merged PRs in 30d

Description

Hi and thanks a lot for this repository.

I am just getting started with the hexagonal architecture (and Rust in general) and I am wondering about some things in the current setup of the hexagonal architecture in this repo:

* Why is `model.rs` not part of the domain?
* Why does `lib.rs` have the comment `Domain logic for the service` but is not part of the domain?
* Why aren't the port traits part of the Domain but part of the `store`? And what is a store in the naming conventions of a hexagonal architecture?

Don't get me wrong: I really like the repository, but I wonder if the boundaries could be a little bit more enforced.

When looking at another great example of [a hexagonal architecture (in rust)](https://alexis-lozano.com/hexagonal-architecture-in-rust-1/) and the [source code of it](https://github.com/alexislozano/pokedex/tree/article-7), it looks like it is structured a little bit better, even if there are also issues around some implementation details: https://github.com/alexislozano/pokedex/issues/1

Screenshot 2022-02-03 at 16 35 22

Would it be of interest for you to restructure the existing code? Maybe I can help.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.