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.
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.
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.
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?
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?
Since this talk, I've build an app using Server Driven UI and SwiftUI together. It worked great! SwiftUI makes building the UI a lot simpler. However, regardless of what UI framework is being used, you should always consider if SDUI is the right approach for your specific app. SDUI really shines for specific types of applications, and it can be a hindrance for others.
@@TomLokhorst Do you have any cases when it can be a hindrance? Isn't this a hindrance only because of tooling and our perspective because we got used to develop "other way around"?
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.
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.
Thank you for comprehensive details
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.
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?
Cool talk, are there any resources that would be of benefit? Also, where is the slack channel that tom talked about?
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?
nice presentation tom, thank you
Thanks! Great video😊
Thank you very much, Tom. Great presentation!
How do you think about SDUI now in 2021? Especially regarding SwiftUI?
Since this talk, I've build an app using Server Driven UI and SwiftUI together. It worked great! SwiftUI makes building the UI a lot simpler.
However, regardless of what UI framework is being used, you should always consider if SDUI is the right approach for your specific app. SDUI really shines for specific types of applications, and it can be a hindrance for others.
@@TomLokhorst Do you have any cases when it can be a hindrance? Isn't this a hindrance only because of tooling and our perspective because we got used to develop "other way around"?
This may not answer your question directly however, Apple did as of recent, Aug 2021, acquire Primephonic.
Very Impressive
what about latency and security?
Top dit! 👍