Menu

How to Fix Your Messy BFF API
📰

How to Fix Your Messy BFF API

DEV Community: kotlin·Nicholas Abbott·17 days ago
#K0FRg9bx
#devtokotlin#devto#dev#logic#mosaic
Long article (278 words) — no AI summary yet.
Reading 0:00
15s threshold

We’ve all been there. Adding yet another call to your backend-for-frontend system. Trying to figure out how to get the response from one API to another without making your business logic a 2000 line file. You’ve tried the traditional DAG frameworks. Maybe you’ve even tried a workflow engine. They’re all bulky, complicated, and not really fit for what you’re trying to do.

BFF APIs are all the rage these days. But it’s so difficult to stop them from turning your codebase into a mess of conditional logic and data being passed all over the place. Mosaic is a new framework for Kotlin designed exclusively to handle the business logic of your big, complicated orchestration APIs. It enables you to break down your logic into simple, composable, individually testable, and fully decoupled chunks.

Think of Mosaic like React for the backend. Decide what you want your response to look like and then build increasingly specific components up to your data sources.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.