Another is: DerbyJS, Racer, and ShareDB who have been fighting for this future for what feels like forever, but meteorjs just torched it from a popularity perspective, in the the event-driven server-side rendering realm. Despite giving a much worse end user experience, it was more popular with developers. Is Lever really the only company using Derby?
https://github.com/derbyjs/derby
https://github.com/derbyjs/racer
makes me harken for the good old days of backbone.js. everything you need, nothing that you don't.
I think its kinda great that you can just use ShareDB with whatever else you use, or also use racer, or go full blown framework. The way its abstracted gives you the power to choose more or less.
Re:In Defense of the Modern Web
by filleduchaos on Friday May 15, 2020 @11:01AM
(#23192949)
Yes - those were the exact technologies I had in mind when reading that paragraph. We've been pre-fetching/loading HTML in place for ages! If all you need is faster/less jarring transitions between static pages, it's incredible to me that anyone would immediately reach for an SPA.
Re:In Defense of the Modern Web
by hombre_fatal on Friday May 15, 2020 @11:55AM
(#23193654)
Funnily enough, the TFA is on a Ruby on Rails blogging platform that uses these tricks to feel incredibly fast. Just look at your network log as you hover links.
LiveView may not be "the future", everyone loves their Javascript too much, but it is the future for me. AJAX with the server is what I feel I was promised back in the Web 2.0 days, not tons of Javascript running in the browser.
I recently used Turbolinks + Stimulus for a Django side project. While these projects originated in Rails, it was quite easy to add to Django with some middleware and webpack tweaking. Stimulus provides some good structure and constraints for adding JS "sprinkles" to the site and overall it's worked very well. It feels more like I'm building with the browser and HTML rather than against or around them. That said, I don't think this approach would fly at work and would probably be frowned upon as maybe inefficient or out of date compared to the pure SPA+API architecture.
I have also thought about adding Turbolinks and Stimulus to a Django project. Can tell more about the changes to the middleware and webpack?
https://gitlab.com/danjac/localhub/-/blob/master/social_bfg/...
IIRC there were some old packages but these were unmaintained and didn't work with later versions of Turbolinks, so I ended up looking at Rails source and other examples. Basically making sure to handle redirects and headers correctly. You can see the webpack config in the same project, pretty much just standard setup with some tweaks for loading Stimulus controllers.
Re:In Defense of the Modern Web
by the_jeremy on Friday May 15, 2020 @01:38PM
(#23194938)
instant.page looks super cool. It seems so simple after-the-fact, but I never thought about it. Thanks for sharing!
I'm a fan of these kinds of solutions. For my 100% static website, https://instant.page does make it feel instant. TurboLinks feels a little "heavier" and has a more complex interaction with other frontend code, but it works very well.