Single Page Application Is Not a Silver Bullet
11–20 of 111 posts
Re: Single Page Application Is Not a Silver Bullet
#12One thing that doesn’t get mentioned is that writing an SPA feels more like programming. Writing jquery feels like idk...not quite like programming.
Re: Single Page Application Is Not a Silver Bullet
#13> broken “open in a new tab” behaviour – people like to handle links in onClick handler, and browser can’t recognize it as a link (even if the majority of the links are valid, sooner or later you’ll encounter a non-link “link”) This one annoys me the most, but I will say an analogous problem is fairly common on non-SPA web sites, where reloading a URL doesn’t work as expected.
That's usually just a lack of basic engineering practices common to well-implemented SPAs. All requests below the SPA's root should be forwarded to the SPA root, which appropriately then routes the request to the proper views and controllers. Proper usage of resource IDs in these URLs allows a newly initialized application model to populate and serve the appropriate content for the appropriate views.
Re: Single Page Application Is Not a Silver Bullet
#14I always thought the decision was: - Content site = NOT single-page-app - Application = single-page-app Maybe there's more of a gray area between content sites and applications these days, but I think it's still pretty obvious: If most of the user's time is spent reading content, it's a content site.
If the user needs to look at multiple screens at a time (e.g. like a mail client or something of similar complexity), then they're a candidate for an SPA. If the user does not need to do that, the app is probably simple enough to not be an SPA.
Re: Single Page Application Is Not a Silver Bullet
#15> broken “back” button (sometimes it works properly, but in general people don’t trust it)
If your UX is good, the user will notice data is refreshed when going back. All current top tier SPA Frameworks have support for correct HTML5 routing.
> broken “open in a new tab” behaviour – people like to handle links in onClick handler, and browser can’t recognize it as a link (even if the majority of the links are valid, sooner or later you’ll encounter a non-link “link”)
Again, most up-to-date frameworks have a fallback by adding a normal href so you can still CTRL-Click it.
> sometimes broken “refresh” button – after refreshing you end up in a different UI (usually slightly, but still different)
I don't see a real disadvantage here, since you can simply store your state by manipulating the URL or even localstorage. So you even have the possibility to not store your state...But again, application design, not SPA
I do agree with TTI (at least on the first load) and bad performance on low end devices.
Re: Single Page Application Is Not a Silver Bullet
#16One thing that doesn’t get mentioned is that writing an SPA feels more like programming. Writing jquery feels like idk...not quite like programming.
Organizing all your jQuery into meaningful classes and keeping the whole thing organized and orchestrated is very much the essence of programming. It's a rare skill (as a trip through many large jQuery code bases reveals).
Filling in some templates causing magic to happen behind the scenes on the other hand, not so much.
That being said, 1) are we interested in feeling like programmers or in pumping product? 2) if "pumping" is the answer, best tools depends on what is being done. All in favor or SPAs (when needed), but no, they aren't cooler than jQuery and are often big fat pigs that just shouldn't be used in that situation.
Re: Single Page Application Is Not a Silver Bullet
#17Earlier quoted context omitted.
That's usually just a lack of basic engineering practices common to well-implemented SPAs. All requests below the SPA's root should be forwarded to the SPA root, which appropriately then routes the request to the proper views and controllers. Proper usage of resource IDs in these URLs allows a newly initialized application model to populate and serve the appropriate content for the appropriate views.
The point is that browsers already have built-in code to interact with links and such in a predictable and straightforward manner, and your suggestion that "a lack of basic engineering practices", implying all SPAs need to reimplement that functionality, shows just how absurd the situation is.
It doesn't make sense to call something that doesn't respect that design a SPA. A poorly implemented SPA is what I would call that.
Re: Single Page Application Is Not a Silver Bullet
#18Re: Single Page Application Is Not a Silver Bullet
#19TBH most of the cons stated in this article are just because of bad programming, not because it's a SPA > broken “back” button (sometimes it works properly, but in general people don’t trust it) If your UX is good, the user will notice data is refreshed when going back. All current top tier SPA Frameworks have support for correct HTML5 routing. > broken “open in a new tab” behaviour – people like to handle links in o…
You also mention HTML5 routing.. Ok now you have to configure your web server to properly parse the URL and understand what it's conveying.
Re: Single Page Application Is Not a Silver Bullet
#20Earlier quoted context omitted.
That's usually just a lack of basic engineering practices common to well-implemented SPAs. All requests below the SPA's root should be forwarded to the SPA root, which appropriately then routes the request to the proper views and controllers. Proper usage of resource IDs in these URLs allows a newly initialized application model to populate and serve the appropriate content for the appropriate views.
The point is that browsers already have built-in code to interact with links and such in a predictable and straightforward manner, and your suggestion that "a lack of basic engineering practices", implying all SPAs need to reimplement that functionality, shows just how absurd the situation is.