← Graph

Counterintuitive Rails pt. 1

talk 33 connections

Day-one talk by Ivan Nemytchenko at wroclove.rb 2018 (part 1 of 2; part 2 delivered the next day). Opens with a survey to collect audience data for part 2. Argues that Rails developers rely on implicit, discipline-heavy habits (no callbacks, no concerns, fat model / skinny controllers) and that the language's power is dangerous without constraints. Ivan (GitLab developer advocate, Rails user since 2006) explains he stopped actively coding in Rails three years ago, recently returned via a freelance project, was dissatisfied with his own results, and attended a workshop by 'another Russian guy' that blew his mind — summarizing the takeaways is his reason for this talk. Proposes three properties of an ideal system: (1) opposes bad code like React does, (2) doesn't fight the framework and uses defaults, (3) offers one canonical way to do a thing. Introduces 'dirt is OK if it doesn't expose to the system'. Critiques five beliefs: (a) flat model structure — instead group models into folders by entity dependencies / aggregation roots (e.g. Article / Comment) from day one; (b) flat controller structure and respond_to abuse — uses REST theory to argue respond_to is not 'different representations', recommends top-level controller namespaces per wave (web, API, RSS feeds, PDF reports); (c) MVC-ignoring — introduces bounded-context-based controller namespaces (e.g. Web::Moderation::ArticlesController) so moderation and editing are separate domains rather than conditional actions; (d) modularity — argues circular dependencies between models, controllers and external services violate MVC, calls out Devise, acts_as_api and current_user globals as MVC violations; (e) confusing application logic, business logic and domain models — persistence is a technical detail, domain models shouldn't depend on Rails, language, or app type. Fighting complexity starts with avoiding it (push back on business requests), then put code into proper abstraction layers. Services should be classes with class methods or single methods, not stateful objects; use dry-container to register stub/real implementations per environment instead of threading adapters through the call stack. Shares an interactor-gem experiment that collapsed into a four-line method. Talk ends with pointers to Ivan's website, email and dual-language Twitter accounts.

part
1 of 2
type
talk
talk Counterintuitive Rails pt. 1
about
Entire talk critiques common Rails conventions.
talk Counterintuitive Rails pt. 1
about
First belief Ivan challenges — flat app/models folder.
talk Counterintuitive Rails pt. 1
about
Recommended alternative to flat folders for both models and controllers.
talk Counterintuitive Rails pt. 1
about
Argues REST is about representations, not respond_to formats.
talk Counterintuitive Rails pt. 1
about
Critiques respond_to for mixing incompatible waves of usage in one controller.
talk Counterintuitive Rails pt. 1
about
Bounded Context concept
Applies DDD bounded contexts to Rails controllers via namespacing.
talk Counterintuitive Rails pt. 1
about
Lists Rails features and gems that violate MVC and create circular dependencies.
talk Counterintuitive Rails pt. 1
about
Argues application-level concerns end up in domain models.
talk Counterintuitive Rails pt. 1
about
Contrasts framework/language-agnostic domain models with Active Record models.
talk Counterintuitive Rails pt. 1
about
Proposes class-method services instead of stateful service classes.
talk Counterintuitive Rails pt. 1
about
Opens the talk with three properties of an ideal system.
talk Counterintuitive Rails pt. 1
about
Recommends dry-container for swapping external dependencies per environment.
talk Counterintuitive Rails pt. 1
about
interactor tool
Describes collapsing an interactor-gem scenario into a four-line method.
talk Counterintuitive Rails pt. 1
about
Cited as an example of a gem that violates MVC by embedding views inside models.
talk Counterintuitive Rails pt. 1
about
React tool
Cited as a model of a framework that opposes bad code even for juniors.
talk Counterintuitive Rails pt. 1
about
Redmine tool
Used as example of a 17-model flat Rails codebase.
talk Counterintuitive Rails pt. 1
about
GitLab company
Used as example of a large Rails codebase (~130 top-level models).
talk Counterintuitive Rails pt. 1
about
Discourse tool
Cited as 'best Ruby on Rails forum solution' with 170 flat models.
talk Counterintuitive Rails pt. 1
about
DHH person
Ivan criticizes DHH's Getting Real screencasts for advocating current_user globals in models.
asked_at
Counterintuitive Rails pt. 1 talk
Audience pushback during the application-logic section.
asked_at
Counterintuitive Rails pt. 1 talk
Audience challenge during the dry-container demonstration.
authored
Counterintuitive Rails pt. 1 talk
Speaker of the talk at wroclove.rb 2018 (part 1 of 2).
from_talk
Counterintuitive Rails pt. 1 talk
Takeaway extracted from the talk's first 'belief' section.
from_talk
Counterintuitive Rails pt. 1 talk
Takeaway from the critique of respond_to.
from_talk
Counterintuitive Rails pt. 1 talk
Takeaway from the Moderation::Articles example.
from_talk
Counterintuitive Rails pt. 1 talk
'First rule is to avoid it' — negotiate with the business before coding.
from_talk
Counterintuitive Rails pt. 1 talk
Takeaway from the dry-container demonstration.
from_talk
Counterintuitive Rails pt. 1 talk
Takeaway from the interactor-to-four-lines anecdote.
from_talk
Counterintuitive Rails pt. 1 talk
Framing statement early in the talk about controlling Ruby's power.
talk Counterintuitive Rails pt. 1
presented_at
Presented on day one of wroclove.rb 2018; part 2 followed the next day.
talk Counterintuitive Rails pt. 1
related_to
Tyrant tool
Ivan cites Devise as an MVC-violating gem (not Tyrant — Devise is not yet in graph).
talk Counterintuitive Rails pt. 1
related_to
Part 1 of a two-part talk; part 2 is delivered the following day and will analyze the audience survey results.
related_to
Counterintuitive Rails pt. 1 talk
Part 2 of a two-part talk; analyzes the survey collected by part 1 and covers its remaining material.

Provenance

Created
2026-04-17 16:17 seed
Read by
30 extractions