深入了解Airbnb的服务器驱动的UI系统

How Airbnb ships features faster across web, iOS, and Android using a server-driven UI system named Ghost Platform ?.

谈到Airbnb如何使用服务器驱动的UI系统Ghost Platform?,在网页、iOS和Android上更快地发布功能。

By Ryan Brooks

作者:Ryan Brooks

Background: Server-Driven UI

背景。服务器驱动的用户界面

Before we dive into Airbnb’s implementation of server-driven UI (SDUI), it’s important to understand the general idea of SDUI and how it provides an advantage over traditional client-driven UI.

在我们深入了解Airbnb的服务器驱动的用户界面(SDUI)的实现之前,重要的是要了解SDUI的一般概念,以及它如何提供比传统的客户端驱动的用户界面更多的优势。

In a traditional world, data is driven by the backend and the UI is driven by each client (web, iOS, and Android). As an example, let’s take Airbnb’s listing page. To show our users a listing, we might request listing data from the backend. Upon receiving this listing data, the client transforms that data into UI.

在传统的世界里,数据是由后台驱动的,而用户界面是由每个客户端(网页、iOS和Android)驱动的。举个例子,让我们来看看Airbnb的列表页。为了向我们的用户展示一个房源,我们可能会从后台请求房源数据。在收到这些房源数据后,客户端将这些数据转换为用户界面。

This comes with a few issues. First, there’s listing-specific logic built on each client to transform and render the listing data. This logic becomes complicated quickly and is inflexible if we make changes to how listings are displayed down the road.

这带来了一些问题。首先,每个客户都有特定的房源逻辑来转换和呈现房源数据。这种逻辑很快就会变得复杂,而且如果我们对房源的显示方式进行修改的话,也是不灵活的。

Second, each client has to maintain parity with each other. As mentioned, the logic for this screen gets complicated quickly and each client has their own intricacies and specific implementations for handling state, displaying UI, etc. It’s easy for clients to quickly diverge from one another.

第二,每个客户端都必须保持相互之间的一致性。如前所述,这个屏幕的逻辑很快就会变得很复杂,每个客户端都有自己的复杂性和处理状态、显示用户界面等的具体实现方法。客户端之间很容易迅速发生分歧。

Finally, mobile has a versioning problem. Each time we need to add new features to our listing page, we need to release a new version of our mobile apps for users to get the latest experience. Until users update, we have few ways to determine if users are using or responding well to these new features.

最后,移动端有一个版本的问题。每次我们需要为我们的列表页添加新的功能时,我们需要发布新版本的移动应用程序,以...

开通本站会员,查看完整译文。

- 위키
Copyright © 2011-2024 iteam. Current version is 2.137.1. UTC+08:00, 2024-11-08 21:47
浙ICP备14020137号-1 $방문자$