3 ms·
Fair enough, but if you render the page on server, you will likely have to do some processing (e.g database/api calls) in order to get the data to display to th
by aliakhtar 12y ago
Fair enough, but if you render the page on server, you will likely have to do some processing (e.g database/api calls) in order to get the data to display to them. The screen will be blank while all of this is going on.
If you go the splash / loading page route, users will immediately see the loading screen come up.
Plus, with the 'render on server' route, if users visit any other page, they will have to wait for a full page reload, whereas with an SAP, they will just see a loading icon for a second or three before the new page will come up.
Its a lot more responsive overall, and the pros outweigh the cons in my experience.
- neolefty 12y agoThe article is advocating for a framework that does both -- it renders the initial impression on the server (yes, including a few DB reads), snapshots it as an SPA, sends it to the browser, and then lets the user continue the interaction that began on the server. It adds significant server complexity for what some would call a minimal improvement in setup time. The article is advocating it for exactly that: overcoming that (maybe minimal) setup time on the client, which includes a one or more server round trips. In many cases, this will undoubtedly be premature optimization. But if the framework made it easy, then it might simplify your transaction model. You could unbundle transactions, knowing that you aren't paying a latency tax on them, at least on startup, since it's all happening on the server.
- aliakhtar 12y agoI would rather have something show up for the user immediately, than have him see a blank screen while DB calls are going on at server. But, to each their own.