I work with many teams who use different languages and repos for their web...
I work with many teams who use different languages and repos for their web UI and the backend.
Example:
1. React UI
2. C# .NET JSON API
Problem: It requires tedious and error prone coding and testing to assure the UI works with the JSON API's requests, responses, HTTP status codes, error response shapes, etc.
Three solutions:
1. Generate a client SDK. Example: Swagger Codegen.
2. Create a UI and backend monorepo. Build both in TypeScript. Share types and logic.
3. Query the DB on the server. Then we only need a JSON API for rare client-side calls.
This is why I'm excited about React Server Components.
Querying the DB on the server improves performance, reduces JS bundle size, avoids UI out-of-sync bugs, and requires far less code.
2024 is going to be exciting.