-
Notifications
You must be signed in to change notification settings - Fork 33
Description
I have done a few private projects with Hummingbird and I would love to get a better understanding of how to actually organize your code and modules in a typical server-project.
All the examples are mixing everything into on method there is no Separation of Concerns (SoC).
I think it would help a lot of people who look into the examples to find some kind of example for a feasible architecture. Not to say that this is the ultimate standard, but to have a guideline on how to piece all the different services together.
I started with this, but to connect everything it is quiet hard.
Levels going from top to bottom:
- App(s)
- Domains/Features -> endpoint implementation
- Services -> Layer between the Endpoints and the Repositories for transforming data
- Repositories -> basically only data storage of any kind or external data sources
Since Services most-likely have to be shared between Domains/Features I always come back to some kind of Dependency-Object that holds all my dependencies during the creation process.
Same issue with Repositories especially if they use some kind of httpClient that is shared to call external APIs.
This is at least what I found out so far, but the dependencies-Object builds all the different services and repositories so that the setup process of the Application can use them easily.
Any Kind of help with this is much appreciated and an Example would be very helpful for future Hummingbird enthusiasts.