3 ms·
> Almost all applications that are written in the world today are glorified forms. Yeah, but our users like interactive forms. When a widget is changed, they l
by lelanthran 5y ago
> Almost all applications that are written in the world today are glorified forms.
Yeah, but our users like interactive forms. When a widget is changed, they like feedback instantly.
Just about any shop that reloads the entire page when you change a single filter gets annoying pretty fast.
Imagine an online computer store: tick the box for "16GB RAM", wait for page to reload, tick "32GB RAM", wait for page reload, tick "512GB SSD", wait for page reload, tick "1TB", wait for page reload.
Now you may argue you still have to wait if it is an SPA, but then you're only waiting for the results. You can quickly tick all four boxes in an SPA and each one may cause a background request, but that doesn't matter because you don't have to wait for each request to complete to make your next selection.
- ihateolives 5y ago> Imagine an online computer store: tick the box for "16GB RAM", wait for page to reload, tick "32GB RAM", wait for page reload, tick "512GB SSD", wait for page reload, tick "1TB", wait for page reload. Tick all the boxes and then click "Apply filter".
- lelanthran 5y ago> > Imagine an online computer store: tick the box for "16GB RAM", wait for page to reload, tick "32GB RAM", wait for page reload, tick "512GB SSD", wait for page reload, tick "1TB", wait for page reload. > > Tick all the boxes and then click "Apply filter". Many places do that, but it's not as user-friendly as not having to click "apply". If there's a large number of filters (Buying a computer on Amazon, for example), the "apply" button is off-screen most of the time - scroll to either the last filter or the first one to even know that there is an "apply" button. Also, some fields do not work too well by having a separate "apply" filter step. You drop-down the manufacturer selection, choose "Lenovo", click apply and now there is a new drop-down for "Model". The better experience is one where both those drop-downs exist, and second one is populated only after a choice is made on the first one. In all the pages I've seen that have drop-down #2 dependent on drop-down #1, those that got a JSON list via AJAX were much more pleasant to use than those that reloaded the entire screen just to add 5 items to the drop-down #2. As the creator of the software, it's more important to have happy users than have an easier maintenance burden.
- yohannparis 5y agoYou don't need an SPA for that, you can still filter the DOM with JS (Vanilla or a Reactive framework) and save the state in cookie or the URL, and have the server handle the state.
- lelanthran 5y ago> You don't need an SPA for that, you can still filter the DOM with JS (Vanilla or a Reactive framework) and save the state in cookie or the URL, and have the server handle the state. Doesn't that still reload the entire page when a checkbox is clicked?
- yohannparis 5y agoNot necessarily, you can update the URL with the History or Location API without a reload. In that case you download the whole list and filter it on the client. The assets (images, documents, icons) can be lazy loaded, so the browser will fetch them only when visible.
- deleted 5y ago[deleted]