Ruby on Rails
turbo-rails
| Ruby on Rails | turbo-rails | |
|---|---|---|
| 554 | 50 | |
| 57,994 | 2,329 | |
| 0.3% | 0.9% | |
| 10.0 | 7.2 | |
| 4 days ago | 27 days ago | |
| Ruby | Ruby | |
| MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Ruby on Rails
- Django 6 Released
Django needs a marketing push. I opened the website and immediately it smells like a 2011 web framework. Like CakePHP. Like Zend. Like Kohana.
The site makes the project feel extremely dated, which of course I have no idea how true that is, I've never used Django! Just my 2c from an outsider.
I compare it to Phoenix and Rails. (again, talking PURELY marketing here dudes!)
https://www.phoenixframework.org/
https://rubyonrails.org/
- Bazzite: The next generation of Linux gaming
- Rails 7.1 Framework Defaults 🚧
Previous value: nil New value: false Purpose: To understand the impact of enabling this particular flag I had to go through some PRs on rails official repo and came across the following PR. The description of which provides an important hint towards a bug that exists with the deprecated behavior of comparing AC::Parameters with a Hash
- Friendly Attributes Pattern in Ruby
- Rails 8.1 Released
- Ruby on Rails 8.1 Released
- When AI Moved Into My Editor: Faster… and Weirdly Slower
From there, I went into a long phase of copy & paste: throw code at an LLM, ask it to analyze or rewrite, and stitch the result back in. It kind of worked. When reasoning models arrived, my confidence went up: wait a minute, wait three—freshly baked code appears. In Rails, that meant small adjustments and I was done. In Marten, I had to correct more, which made sense — newer framework, less model knowledge.
- Use singular nouns for database table names
> they often automatically pluralize, with the predictable result of seeing tables with names like addresss.
This is a very poor example, that case is literally in their unit tests file:
https://github.com/rails/rails/blob/b0c813bc7b61c71dd21ee3a6...
- Rails 8.1 Beta
Full list of changes:
https://github.com/rails/rails/releases/tag/v8.1.0.beta1
- How to Choose the Right Tech Stack for Your SaaS MVP
Ruby on Rails (developer-friendly, great for startups)
turbo-rails
- Real Time Page Updates with Rails and Hotwire - Turbo Broadcasts
Turbo Broadcast allows us to broadcast messages via Websockets to multiple clients in real-time and which is what we will be using in this example. This is the source code for Turbo Broadcast and its worth taking a look at because it provides some example usages in the inline comments https://github.com/hotwired/turbo-rails/blob/main/app/models/concerns/turbo/broadcastable.rb
- The Future of Htmx
I do think "use HTMX" is a tough sell for a 800 employee company, just because it doesn't really solve issues on it's own. (Imagining the pitch is "add HTMX to an existing project") Going all-in on hypermedia definitely means the service that serves your application needs to more than just a JSON parrot. Templating HTML and sending the right chunks back is hard to do if those services aren't built around being hypermedia services.
I really like turbo-rails [0] (the ruby gem that Rails 7+ bundles in for turbo support, meaning helpers that make turbo frames/responses a native "thing" rails understands) because it's a complete solution. There's at least some obvious structure to build off of, and I'm not stuck trying to build up my own framework on the BE for my newly simpler FE.
django-htmx also fits in this case too. I feel like any honest pitch of HTMX should involve some BE solution as well.
[0] https://github.com/hotwired/turbo-rails
- Can't get Rails 7 turbo_stream_from to update view from broadcast
The install notes here link to an issue specific to webpacker. Try that and see if it works?
- Strong reasons to pick htmx, over hotwire?
True, in theory it is. A lot of it is coded in libraries like turbo-rails, though. And these are Rails-specific. But I've seen it being used in some Laravel projects, also I used it with Hanami.
- Rails 7 - Turbo Frame and Turbo Stream
Check out https://github.com/hotwired/turbo-rails/blob/main/app/models/turbo/streams/tag_builder.rb
- Use turbo_streams to update the client in real time from inside a loop?
So apart from the pretty obvious question of "why on earth would you want to do this?", I think there's a misunderstanding here of the intended use case of turbo streams. You have a page, and then some state changes on the server and you want to update the page to reflect that. Incrementing a variable doesn't really qualify as a state change, but perhaps a Product changing from "not good" to "good" would be an event worth broadcasting, which you could do using the Broadcastable concern in turbo-rails.
- Where do I start for learning "HTML over the wire"
Use this too: https://github.com/hotwired/turbo-rails
- Using ViewComponents with Turbo
Not mentioned in the article, but it's nice that turbo-rails recently gained the ability to pass ViewComponent objects directly to turbo stream helpers. https://github.com/hotwired/turbo-rails/pull/433
- is turbo and stimulus compatible with rails 4 ?
- Turbo-Rails just got better
Release notes: https://github.com/hotwired/turbo-rails/releases/tag/v1.4.0
What are some alternatives?
Cuba - Rum based microframework for web development.
hotwire-rails - Use Hotwire in your Ruby on Rails app
Roda - Routing Tree Web Toolkit
Stimulus - A modest JavaScript framework for the HTML you already have
Sinatra - Classy web-development dressed in a DSL (official / canonical repo)
Turbolinks - Turbolinks makes navigating your web application faster