Server Driven UI, Tom Lokhorst (English)

preview_player
Показать описание
From the garden of his own home Tom explains how they implemented a server driven UI for the Primephonic app. Tom shows examples of screens of the app and how they implemented that as server generated JSON.
Рекомендации по теме
Комментарии
Автор

Update: In August 2021 Apple acquired the company Primephonic. In March, 2023 Apple launched Apple Music Classical as a new app, based on the foundations of the original Primephonic app.
The new Classical app still uses the same Server Driven UI architecture as described in this talk.

TomLokhorst
Автор

30:54: For input validation, the SDUI JSON could specify not only the form fields / labels but also include validator metadata that is implemented on the client-side (and server-side for POST request validation). This works great.

guywithcircles
Автор

34:23: How to decouple the business logic from the iOS side to the backend: Client side: Generic presentation logic only. Server/SDUI: use the builder pattern with fluent style (chained method calls to set data), then have a build() method in the builder that outputs a JSON object representation to be later converted into a JSON string. Business logic: goes in microservices. The SDUI database is created and updated for UI-optimised schemas that reduce latency because no data transformations are necessary, only simple queries.

guywithcircles
Автор

23:11: "The single JSON response for all my music became too large": Isn't that a data/api issue instead of a case to not to use server-driven UI? The client could send an id or timestamp representing the current state of the offline data, and the server would send only the updated data, not everything again. And if this isn't correct, then wouldn't the data have to be downloaded anyway?

guywithcircles
Автор

Cool talk, are there any resources that would be of benefit? Also, where is the slack channel that tom talked about?

khaldrogo
Автор

Thanks for this @Tom Lokhorst. How to handle refresh of a single component in the page (say, I clicked on Like button and it should reflect on LikedVideos list present just below the button)? Is it mandatory to refresh the whole page in this case (does not sound intuitive) or there is any other way?

bhavnasoni
Автор

Thank you very much, Tom. Great presentation!
How do you think about SDUI now in 2021? Especially regarding SwiftUI?

molti-tasking
visit shbcf.ru