Rocket complex design, what should we do? #2021
Unanswered
IniterWorker
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I'm currently designing some kind of boilerplate. I implemented an authentication flow JWT token-based implemented over Request Guard and added OpenAPI/Swagger.
But, after reading all information available in the Rocket documentation, I didn't see any best practice to handle very complex design.
I am wondering what's the best approach, with rocket.rs, to decoupling business logic, facilitating the testing and designing a robust solution. Of course, if you have any alternatives or hints, I will be grateful.
First thought:
My first thought is about using the FromRequest to build some kind of services/controller software design architecture.
I plan to use FromRequest to carry services and define routes as controllers that use these services.
todo
example, I saw some advantages for using the service out of the box to implement unit tests/integration tests. (I'm referring to the DB part of this example)Let's say we have four services:
Questions:
Best regards,
Beta Was this translation helpful? Give feedback.
All reactions