Why I'm not the biggest fan of Single Page Applications

Why I’m not the biggest fan of Single Page Applications.
Sometimes it seems like accessibility experts and other web professionals hate JavaScript. This might be true for some, but most understand that JavaScript can be useful for improving UX and even accessibility. JavaScript solutions are often more accessible than their pure HTML or CSS counterparts.

Read in full here:

This thread was posted by one of our members via one of our news source trackers.

Corresponding tweet for this thread:

Share link for this tweet.

Try HTMX. https://htmx.org. You might like it. :smiley:

1 Like

Or a static site generator. :slight_smile:

1 Like

Does any one knows any good SSG that do SPA?

1 Like

Like the author of the article, I also think that SPA applications are an unnecessary complication of websites. SPA applications are wise to use in a narrower direction on the web than it is currently used.

1 Like

I think being able to know and understand when to use a SPA for your project is of utmost importance, rather than just using SPA as the default.

1 Like

For some medium size projects, I often prefer monolith or solution like Elixir on Phoenix / RoR

1 Like

SPA is definitely not good as a default type of application. However when needed everything changes a lot. Phoenix LiveView is doing it’s best to help limit JavaScript code. Soon maybe it would cover even more use cases, but even with it’s planned features it just can’t skip some barriers like offline web apps. DevDocs is a brillant example here:

Also in some edge cases people may need to keep as much server resources as possible. Since I started learning about Elixir I always wondered why so much things are still done server-side with all those powerful smartphones available. Personally I see Elixir working as WebSocket API with millions of tiny messages, flat data and using database streams with broadcasting.

Maybe web standards with JavaScript on top are not the best thing in owrd, but it’s like with a democracy i.e. we haven’t anything better. Maybe some time I would see Elixir’s GUI apps (based on scenic) with all features from other UI toolkits, but for now depending on the use case I would use Phoenix LiveView or SPA when needed.

1 Like