The Future of App Development: Automatic Data Synchronization
Today building an app which always shows up-to-date information typically involves the following:
- A frontend UI framework
- Client-side logic which fetches initial data from the backend
- Client-side logic which updates models based on WebSocket messages
- A web service with authorization logic that talks to a database
- A database
There is a lot of duplication and boilerplate code here:
- Logic on the client to fetch the initial model, listen for updates, and notify the server what data it cares to receive updates for
- Writing RESTful endpoints that wrap the database
In sum, this means developing a seemingly simple app becomes a complicated task which requires creating and hooking up all of these components.
–
What if all of this could be drastically simplified? What if the data itself was treated as the interface? The client informs the server about what information it would like to display or stop displaying, the server automatically keeps the client informed about any changes to that data, and the frontend UI is driven off of those always updated models. There is no need to build RESTful APIs and trigger WebSocket messages, all that is handled as part of declaring which data the client wants to display.
This is simply the logical extension of the shift towards model-driven UI, only now the models will now be automatically synchronized over the network. This will require closer integration between certain parts of the system: the UI framework will need to understand how to communicate with the data provider, and authorization logic will need to be built into the data provider. But all of this seems possible and desirable in the end when every app is a cloud-synced application.