5 ms·
Really nice to see a deployed modern Rails site. I just recently decided to try Rails 8 out for a side-project of mine (Paranoia RPG virtual table top) and had
by pugio 2y ago
Really nice to see a deployed modern Rails site. I just recently decided to try Rails 8 out for a side-project of mine (Paranoia RPG virtual table top) and had a generally pleasant experience.
The biggest pain point was the lack of Grade A documentation for the best way to use ActionCable and Turbo – information is spread out between Rails Guides, API docs, and then the Turbo / Stimulus documentation. The actual API docs do a poor job of explaining basic concepts like "streamables", and I kept wondering if I was doing things the "right"/idiomatic way.
Still, as always, ActiveRecord is my biggest draw for Rails, and the new first-class Sqlite integrations are a huge draw for me. I've yet to find an ORM that allows me to be anywhere near as productive.
- ksec 2y agoAnyone know what are they using for Analytics? Edit: Search is nice as well. >>Really nice to see a deployed modern Rails site. Yes. And it is also a showcase what I want for 90-95% of the web. Useful as an example next time we have yet another MPA vs SPA or SSR vs CSR argument. It doesn't need to be a complex SPA. Although I must admit the response time isn't perfect even with Cloudflare.
- pauillac 2y agoanalytics is built with ahoy https://github.com/ankane/ahoy https://github.com/ankane/ahoy. the project is open source if you need more details https://github.com/adrienpoly/rubyvideo https://github.com/adrienpoly/rubyvideo Hosting is in Europe on Hetzner maybe it explains your response time. Where are you located? what are the response time you are getting ?
- ksec 2y agoRight now in Hong Kong, getting about 240 - 260ms RTT. It is probably good enough for 95% of people. I am what I call latency sensitive. But I think the main culprit is surprisingly view transition isn't as good as I thought. Because the slight lag / jank I feel happens on Chrome. While I dont feel this on Firefox or Safari 17.6 which isn't supported yet.
- pauillac 2y agoyes view transition when enabled are applied to all pages and create a blend effect by default which can maybe give this slowness effet? I will check if we can prevent this default effect and only use page transition when needed
- revskill 2y agoActiverecord is flaw because of n+1 query issue.
- cpursley 2y agoI also dislike Activerecord. The solution to a lot of this is creating database views and interfacing with that.
- rtcoms 2y agoJust use ActiveRecord's`find_by_sql` method
- revskill 2y agoThe problem is it's a pain to debug through the call chain a.b.c.d.e to figure out where's the cause.
- Alifatisk 2y agoUse `includes` and it's solved, you make it sound like a huge deeply rooted issue, it's not. Anyone can achieve n+1 issue with whatever tool they use, it's not ActiveRecord specific.
- revskill 2y agoOnly with ActiveRecord pattern you need such kind of hacks to prevent, it's why it's flaw.
- freedomben 2y ago`includes` is not a hack. Clearly you prefer implicit over explicit when it comes to SQL generation. That's your prerogative, but I strongly disagree. I don't want the ORM trying be clever on me because it is opaque and complex. I want it to use the function arguments to construct a query, and nothing else. Debugging long-running queries is already complex enough without "clever" code trying to abstract it all away from me. Some things should not be abstracted way. It feels nice when your database is small, but it cuts hard when you start to scale.