DEV Community

Nishant Keshav
Nishant Keshav

Posted on

Server Driven UI

So, Everyone must be wondering what a server-driven UI is (no, it is not CSS files stored on the Backend Part). Let me explain in detail below.

What is Server Driven UI (SDUI)?

In traditional software Development, whenever we want to push new design or business logic changes in the frontend part, we need to rewrite the whole design as if we want to change the UI/UX of a Payment app, so we need to change the whole structure of the design and business logic. That means rolling out a new App Update and hoping users to update the app(which usually does not happen).

This is where SDUI (Server Driven UI) comes in.

Instead of hardcoding UI elements in the mobile/frontend app, you send UI definitions from the backend (server) in JSONor other formats.

The client app becomes a renderer that reads the UI structure sent by the server and displays it accordingly.

Let's go into a detailed explanation:

  • Without SDUI (Traditional writing way)
    Image description

  • With SDUI (Server-Based)
    Image description

Server-driven UI (SDUI) is an emerging technique used by companies like Airbnb and Lyft that leverage the server to build the user interfaces of their mobile apps. This opens up new possibilities and addresses some fundamental challenges with native mobile app development. Before we look at how server-driven UI works, let's take a look at how mobile apps are developed today.

Let's see some examples.

Image description

When the listing screen is displayed to the user, the app fetches a list of products to display from a server. The list of products, the data, is combined with the UI built by the developer and transformed into a list view.

Image description

The Release Cycle

Now let's imagine after launching our listing screen, we decide to add the product's star rating to each row and give a special treatment to sale items.
Image description

The logic that determines how the data is presented for each row is built into the app, so in order to make these changes to the user interface, we need to run through a full release cycle. The process looks something like this:

  1. Developers write code to make the desired UI changes.

  2. The UI changes are reviewed by testers.

  3. A new version of the app is submitted to the App Store/Play Store.

  4. Apple/Google reviews and approves it.

  5. Users update to the new version.

For a typical app supporting iOS and Android, the release cycle must be done twice, once for each platform, and generally, we will need different developers for each one. By the time these changes have made it to our users’ devices, we're already looking to make additional changes. In this case, we now want to display featured products at the top of the list in a horizontal scroll container.

Image description

Once again, we have to go through the full release cycle to make these changes. Between development, testing and waiting for approval on both platforms, each of these simple changes takes weeks or even months to make their way into the App/Play Store. And even after they've made it into the store, we still have to wait for our users to update to the new version of the app before they will see them.

Each time we release a new version of our app, we have to wait for our users to update to it. Some will update right away, some will take their time, and some won't update at all. This creates a bad user experience.

Image description

So what's the solution?

Well, what we can do is that we can write our Web/App designs in such a way that they render according to a JSON response from the server and the designs are stored in the JSON format on the server.

Instead of hardcoding our web or app designs directly into the client, we can build the UI to render dynamically based on JSON responses from the server. These JSON responses define the structure, styling, and logic of the UI, such as buttons, input fields, labels, and layout containers.

The server stores these UI definitions in a structured format (like JSON), and the frontend app simply parses and renders the layout accordingly.

Image description

This approach gives us full control over the UI from the server, allowing us to:

  1. Push UI updates without forcing users to update their app.

  2. Personalise or customise UI per user.

  3. Experiment with new flows or features quickly (A/B testing).

  4. Unify UI logic across platforms (Android, iOS, Web) using a shared schema.

Image description

Instead of fetching a list of products, the app fetches a list view, which contains a set of row views, each of which contains text and image views with information about spacing, alignment, colour and text.

Image description

The app renders the response from the server, and the result is identical to the version using traditional development techniques.

Image description

The updates that previously took weeks or months can now be made in days or hours. The changes are made to both the iOS and Android apps consistently, and all users see the same version at the same time.

Challenges with Traditional Native App Releases :

  1. Slower Update Cycle : The time-consuming app release process causes delays in critical updates.

  2. Slower User Adoption : Users need to download and install updates, leading to slower adoption rates for new features and bug fixes.

  3. Platform-Specific Code: Developers must duplicate effort on different platforms(iOS, Android) and maintain separate codebases, doubling the workload. Ensuring a consistent user experience across platforms can also be challenging.

  4. Slow Feedback Loop: Gathering user feedback and making quick iterations is harder due to the slower update cycle and user adoption.

Advantages of Server-Driven UI over Traditional App Development:

  1. Dynamic Updates: Allows for dynamic updates without needing users to download new app versions, eliminating delays associated with app updates.

  2. Uniformity: Ensures consistent user experience across platforms.

  3. Faster Feedback Loop: Empowers developers to stay agile, respond faster to user needs, and deliver the best user experience.

  4. Rapid Feature Rollouts: Features can be rolled out, tested, and iterated quickly from the server side without waiting for app store approvals.

Disadvantages of SDUI compared to traditional UI techniques

Increased Complexity on Backend

  • The backend must now handle UI logic, layout generation, and dynamic rendering rules.

  • It turns your backend into not just a data provider but also a UI controller.

  • Result: Tight coupling between frontend and backend logic, which can get messy fast.

Slower Development for Rich UI

  • SDUI works great for static or form-based UIs (e.g., settings screens), but:

  • Building highly interactive, animated, or custom components becomes harder or even impossible.

  • You lose the benefits of frontend frameworks' powerful component systems (like React/Vue).

More Difficult Debugging

  • Debugging becomes harder when UI bugs originate from a malformed JSON or incorrect server configuration.

  • Logs may not always clearly show the root issue, like in traditional UIs where you have direct access to the component tree.

Performance Overhead

  • More round-trips: First, the app asks for the UI definition, then fetches data.

  • Increased payload size: UI JSON + data = heavier initial loads if not optimised.

  • Might need aggressive caching and fallback strategies.

Loss of IDE/Tooling Benefits

  • With traditional UI development, you get type safety, code completion, previews, and powerful debuggers.

  • SDUI JSON-driven rendering loses these advantages unless you build custom tooling.

Steeper Learning Curve for Teams

  • Backend teams need to understand UI structures and rendering logic.

Design Limitations

  • Pixel-perfect design or complex UI behaviours (e.g., drag-and-drop, advanced charts) are hard to achieve via SDUI.

  • Often, we need to fall back to a hardcoded/native UI for those.

CONCLUSION

SDUI trades flexibility at runtime for complexity in codebase, performance, and development experience. It's great for use cases like CMS-driven pages, forms, and onboarding flows — but bad for animations, rich interactivity, and rapid frontend iteration.

MY VIEW : USE AT YOUR OWN RISK

You can read here PART-1 and PART-2 how PhonePe integrated SDUI in their Application(Their Implementation is Crazy 😍).

There are Many organisations which use SDUI. I will list out the links below for your reference.

  1. AIRBNB

  2. SWIGGY

Liked the content? Let’s connect on LinkedIn — I post more stuff like this (and would love to see what you’re building too).

Top comments (0)