balvig/spyke

Comparison with ActiveResource

Opened this issue · 1 comments

I'd love to get insight from someone familiar with this library on how it compares to ActiveResource, which has been a standard part of Rails since at least Rails 3. Does this library build on top of ActiveResource in any way, and why or why not? Are there any major points of disagreement about the design philosophy?

I'm needing to replace a crusty old Her implementation, and found this gem mentioned in the comments there, and need to make a decision on direction, but the Readme for this library doesn't mention ActiveResource at all, which feels like an odd omission.

Good shout @pboling!

Her itself touches on some of the reasons.

While ActiveResource was removed from Rails, updates do seem to trickle in with a bit more regularity than when this library was published, so perhaps that's less of an issue now.

If I recall correctly, the main reasons we originally looked elsewhere from ActiveRecord/Her are covered in the README:

spyke/README.md

Lines 19 to 23 in 5fa3e00

- Fast handling of even large amounts of JSON
- Proper support for scopes
- Ability to define custom URIs for associations
- ActiveRecord-like log output
- Handling of API-side validations

...with the performance aspect being the main reason we moved away from Her (at the time, at least.)

I haven't done a feature comparison with ActiveResource in 2024, but I could see that being useful information for folks evaluating solutions! 👍