Live data from Hacker News

Turbolinks: SPA-like Experience without the SPA-framework Hassle

goiabada.blog

21–30 of 97 posts

Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle

#21
post #4

Yes, 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/art…

Building your own is educational and maybe even fun (to a point), but it's not going to magically fix these kinds of issues. Most if not all frameworks support navigation and custom framework XYZ probably isn't going to do a better job.

The fact that some sites do a bad job at navigation, performance, or whatever really seems orthogonal to me. We can also come up with numerous examples of "classic" sites that are slow, bloated, and have a bad UX.

Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle

#22

Yes, 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.

Once, I made an SPA for an interview with plain JS and handlebars for templating. It was for a react team and I was not big into react but wanted to show I get how all the pieces fit together, but still be able to understand and debug what I had written for them. Instead of being in unfamiliar territory with react debugging. Anyhoo, the switch-statement router based on changes in the URL hash was just about where they couldn't take it anymore. They couldn't see why I hadn't used some library for the routing. I had genuine flubs aside from that in the interview and definitely wasn't right for them, but it was funny to see heads quizzically turn to the side during that portion. I was like "well, what a weird little detail to get hung up on".

Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle

#24
post #8

From 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 ch…

Your front end web server can call your backend API, so you can decouple without it being SPA.

Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle

#25
post #12

The title is misleading since this is basically a TuboLinks article and doesn't really explore the problems of building an SPA without a framework.

Agreed. TurboLinks itself seems unnecessarily heavy. So you avoid a full page reload, but you do still have to fetch the whole page over the network and render it. Just without the browser loading icon spinning.

Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle

#26
post #16

Downvoting everyone answering the title question and not reading the article. You guys should be better than this. It's not about cowboying or NIH. It's about using a library called Turbolinks https://github.com/turbolinks/turbolinks to render static pages server-side and swap the content out with js.

> Downvoting everyone answering the title question and not reading the article. You guys should be better than this.

Downvoting you for not paying attention to why people are answering the title question--because it was the title question in the article, which then proceeded to answer a different question.

> It's about using a library called Turbolinks

Which is not answering the title question of the article. The article should have been titled "Build a Single-Page Application Using Turbolinks". Even the part about "without a framework" is false: Turbolinks is a framework.

Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle

#27
post #21
post #4

Yes, 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/art…

Building your own is educational and maybe even fun (to a point), but it's not going to magically fix these kinds of issues. Most if not all frameworks support navigation and custom framework XYZ probably isn't going to do a better job. The fact that some sites do a bad job at navigation, performance, or whatever really seems orthogonal to me. We can also come up with numerous examples of "classic" sites that are slo…

That’s precisely my point: a good SPA is more than a framework and the only thing that helps to make it good is education.

Re: Turbolinks: SPA-like Experience without the SPA-framework Hassle

#28
post #16

Downvoting everyone answering the title question and not reading the article. You guys should be better than this. It's not about cowboying or NIH. It's about using a library called Turbolinks https://github.com/turbolinks/turbolinks to render static pages server-side and swap the content out with js.

It seems like most people are more interested in discussing the question posed by the title than discussing the product the article is advertising.
Post reply on HN