Skip to content

Approach for "Backend for Frontend" service? #91

Answered by Sairyss
thatguysimon asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,
If you don't have much complexity in your app, you don't need all those layers. DDD is great for backends that have a lot of business logic that you can encapsulate in your entities/aggregates, and other complexity that you can abstract by ports/adapters, layers, etc.

But I wouldn't recommend using it for BFFs. In typical BFFs your backend usually acts just like a glue between frontend and your database, with very little business logic, so I'd say you don't need all of the complexities of DDD architectures for a simple BFF.
For BFF I would recommend something straightforward, like typical MVC architecture or something like that. All you need is some router/controller, service, dtos, …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by thatguysimon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants