One of the challenges in engineering a software product today is to minimize the amount of code that needs to be duplicated to support the app on multiple platforms. This challenge is partly due to APIs that expose data as opposed to business content. With data-driven APIs the app must embed large chunks of the business logic. First, it must transform the data into content to display. Second, it must transform it back into data to be processed by the API. While solutions exist to share this transformation logic between multiple app platforms, we decided to host this logic on the server.
This is achieved by exposing a presentation API containing use case specific endpoints. Its responses have the content matching the needs of what is displayed by the app. This decision of building the product around a presentation API has served us well in this project. Throughout the life of our project, we have had the opportunity to exploit the presentation layer in the backend. This allowed us to iterate faster with the product by displaying different things without having to ship any new code to the front end, while reducing the apps development time.
Presentation done together with Antoine Tollenaere