Hacker News new | ask | show | jobs
by ksec 2024 days ago
>Error Objects

Active Model’s errors are now objects with an interface that allows your application to more easily handle and interact with errors thrown by models. The feature was implemented by lulalala and includes a query interface, enables more precise testing, and access to error details.

This has been in the work since Rails 5.x and I believe Lulalala extracted it from his work on Gitlab. And it was lot of hard work.

Since both Github and Shopify now runs on Master, I dont think there are any other open source web framework that is more battle tested than Rails.

Still waiting for New Magic though.

3 comments

I'm really excited about the Error Objects. I guess error handling probably isn't the most glamorous thing, but lulalala's hard work will make that part of our lives so much easier. I really appreciate the work they did on this feature
I'm out of the loop. what is New Magic?
DHH mentioned "NEW MAGIC" when he released the Hey stack on twitter [1]:

> The HEY stack: - Vanilla Ruby on Rails on the backend, running on edge - Stimulus, Turbolinks, Trix + NEW MAGIC on the front end

There has been a lot of speculation since then on what New Magic is. It was supposed to release at the same time as hey.com but they decided to postpone it till later. Many people think/hope that it is something similar to Phoenix LiveView

1: https://twitter.com/dhh/status/1275901955995385856

I asked DHH the other day about the server side aspects of NEW MAGIC and he replied with: https://twitter.com/nickjanetakis/status/1334940603457658883

So we know NEW MAGIC will involve a substantial amount of integration with Rails on the server side but it could technically be ported over to other frameworks.

It's interesting because StimulusJS 2.0 and Turbolinks 6 are fully client side based on previous tweets by members of Basecamp. I wonder if NEW MAGIC will be focused on broadcasting real-time updates to the front-end while partial page updates that would normally be server rendered templates could be handled by Turbolinks 6 alone. That would be great news for anyone wanting to create amazing feeling apps with any back-end stack, without going the SPA route.

This article[1] and the others in the series give an idea of the direction by analysing how hey.com works. The page-updater library looks to bring a more declarative replacement for server-generated JavaScript responses, for example.

[1] https://dev.to/borama/a-few-sneak-peeks-into-hey-com-technol...

Probably something similar to Stimulus Reflex/LiveView
DHH has been teasing something called "New Magic" on Twitter but beyond that we don't know much.
Couple of changes here that would be directly useful in what I'm working on. Does boost my confidence - as a dev newer to Rails - that the rough spots I'm spotting are recognized by other folks as well. It also tells me I can be more proactive in proposing changes, or at least in addressing those rough spots.