Turbolinks: SPA-like Experience without the SPA-framework Hassle
1–10 of 97 posts
Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle
#2Yes, I've made a few vanillajs SPA for HbbTV apps which were very unhappy about loading any framework everytime you change channels. Hardest part is the "router" which ends up being a big'ol switch statement.
Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle
#3For the purposes of this exercise, are we talking vanilla js only or can I build my own with excellent libraries like page.js? Because if the former, sure we can, but I wouldn’t want to ship a product on a deadline that way.
Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle
#4Yes, you can. Maybe you even should, because then you at least understand all the moving parts. Because there are way too many shitty SPAs out there that break functionality (Twitter and Facebook when hitting the back button) or are annoyingly slow and unreliable (iTunes Connect, Play Developer Console). Read [1] to see all the disadvantages and understand them. Then maybe build an SPA.
[1]: https://adamsilver.io/articles/the-disadvantages-of-single-p...
Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle
#5Er... Yes. Its fairly easy. Granted I've never done anything on the scale of FB or Netflix, but SPAs are not as difficult as everyone likes to think they are.
Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle
#6I don't think you'll find anyone who thinks it's hard to build 1 SPA without a framework.
The thing is that if you build 2, 3, 100, you'll find yourself doing the same stuff over and over again (and always better than the previous time, so that you'll want to replace all your old code, which is now obsolete), and that's when frameworks are useful.
Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle
#7Absolutely. It's really not that hard. I did it with the first version of my little meeting agenda app Meeting Rainbow. I rewrote the UI using Angular 1.4 later, and honestly it wasn't any easier using Angular than no framework. Angular just made things different, and depending on your opinion made the code easier to understand (though both versions are several years old at this point and far from what I'd consider a good codebase.)
Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle
#8From my point of view SPA and solid backend APIs go hand in hand. I see the main reason to use a SPA is to decouple front- and backend.
Doing so allows you choose a new frontend after some years while keeping the backend - or rewriting performance critical backend code while reusing the frontend.
Do you think the SPA-ish look and feel really is the key? That would surprise me.
It is more of an architectural design choice to me.
Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle
#9Reading a bit into it they never say the word Ajax but that is what it is. Something used for years they are pitching as something new and exciting.
Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle
#10It's not very hard, and it's a good exercise if you have time.