HackerTubewatch
Surprise me
Frame from October CincyRb - Jim Weirich on Decoupling from Rails Plays via YouTube's privacy-enhanced embed

October CincyRb - Jim Weirich on Decoupling from Rails

Launch Scout
Talks
YouTube
1 HN user recommended this talk1 month2014–2017 score 1
Years with an HN recommendation, 2007–2026

Cited in HN debates on testing and clean architecture as a concrete example of keeping domain code separate from Rails so tests run fast.

A Cincinnati Ruby meetup talk by Jim Weirich on decoupling application logic from Rails. He argues for separating business logic from framework and database models.

“was quite interesting, and argued a complete separation of business logic from the model code” (HN, 2016)

1 recommendations · 4 citations · Talks · intermediate

5 Hacker News comments

From the HN archive; up to 20 kept per video, favoring different commenters. Recommendations first.

@theptip Nov 2016 Recommends
on HN thread Test Induced Design Damage? (2014)
Read more
I'm interested to hear the patterns that users of MVC frameworks like Rails and Django have adopted when "fat models" start to become unwieldy. The video "Decoupling from Rails"[1] that's linked in this article was quite interesting, and argued a complete separation of business logic from the model code, to allow the business logic to be tested (and reused) more easily. I've definitely found fat-model code to be tricky to mock and test at times in Python/Django, as mocking out the ORM is gnarly. But if the business logic operates on proxy objects, then it would be much easier to do so. On the other hand, DHH's retort to this approach also makes some good points regarding the introduction of excess complexity[2]. It's a fair point that architectural decisions should not be motivated by the speed of the UTs. But perhaps there are other benefits to the Hexagonal architecture, as well. [1]: [this video] [2]: [link]
Argues for separating business logic from models for testing.

Citations, criticism and jokes

@kentwistle Apr 2014 Cites it
on HN thread Slow database test fallacy
Am I only the only one that doesn't find 'All tests in 4 minutes, all model tests in 80 seconds' very impressive? It sounds like a really long time to me. You know what could increase the speed dramatically.... decoupling. I also think decoupling phrased in the context of the Rails 2 to Rails 3 upgrade, where pretty much everything changed, makes perfect sense. Imagine just having a few wrapper classes that spoke to Rails and only having to adapt them. Sounds good to me! Bernhardt: Boundaries [link] Weirich: Decoupling from Rails [this video] Wynne: Hexagonal Rails [link]
Talk on decoupling from Rails, listed among resources.
@theptip Mar 2017 Cites it
on HN thread Zen and the Art of Unit Testing
Read more
Here's a retort to that argument from the source (Uncle Bob): [link] DHH wrote an article with the title "test induced design damage", not sure if he coined the term. I think there's a grain of truth there; it is possible, but not necessary, to mangle your architecture to enable testability. The case that DHH was complaining about is quite interesting in itself; it was an architecture that Weirich suggested ( [this video] ) where the framework DB models (in his case Rails) are separated from the Domain Models, to allow you to 1) run your tests of the business logic faster (without spinning up a DB) and 2) decouple your business logic from your choice of framework. I've felt the need for this factoring in my own code, but actually making it happen is tricky, since you lose a lot of the magic that makes your life easier (but that also couples every level of your architecture to the framework's concepts).
Weirich's architecture separating DB models from domain models.
@theptip Apr 2017 Cites it
on HN thread The Clean Architecture (2012)
This is a powerful technique, though I'd say it's more useful for the build pipeline than for developers running UTs while coding (since the schema can change more frequently while doing so). To provide a counterpoint though, an advantage touted by advocates of complete decoupling from the DB is that your UT suite can run in O(one minute), rather than O(ten minutes). E.g. see [this video] . I'm not 100% sold on this approach yet (separating your domain objects entirely from the ORM wrapper is an uphill struggle), but it's interesting.
Advocacy for decoupling from the DB to speed tests.

Video list and Hacker News comment labels from HackerTube (prompted by @karpathy), released under ODC-By 1.0, built on the open-index/hacker-news archive. Hacker News data is provided by Y Combinator; comments remain the work of their authors. Video titles, channel names and thumbnails belong to their creators and are shown via YouTube. HackerTube Watch is an unofficial edition. Data export of 2026-10-31.

Keyboard shortcuts

/
Search
j k
Next / previous video
r
Surprise me
l
Like (video page)
w
Watch later (video page)
?
This help
Esc
Close