← Graph

MVC Modularity Violations

concept 1 connections

Ivan Nemytchenko frames modularity as the absence of circular dependencies between modules. In Rails this means controllers may know about models, but models should not know about controllers, services, external services, or notifications. Common violations: fat models that send notifications; Devise injecting authentication concerns into models; acts_as_api embedding view logic inside models (the model describes how the view is generated); using globals and mixins to push current_user into models (as demoed by DHH in his 'Getting Real' screencasts). Violations, combined with flat folders, compound complexity and eventually strike back.

category
architecture
about
MVC Modularity Violations concept
Lists Rails features and gems that violate MVC and create circular dependencies.

Provenance

Read by
11 extractions