The book Patterns of Enterprise Application Architecture (PoEAA) laid the blueprints for Rails’ architecture.
When choosing which enterprise design patterns to encode into the framework, Rails picked, to name a few, Active Record, Template View, Application Controller, etc.
By covering these patterns with a sweet coating of convention-over-configuration, Rails simplifies pattern analysis a lot.
These design assumptions were absolutely pragmatic for the type of applications that Rails was targeting at.
However, as applications growing more and more complex, developers are starting to realize these
default architectural patterns may not scale very well. Typically,
four main areas are overloaded in an enterprise application:
- high coupling between domain model and data source,
- bloated domain model with a mix of domain logic and application
- presentation behaviour leaked into views, and
- high coupling between view data and template
To understand these problems better as well as to figure out possible
solutions, I would like to walk you through some enterprise patterns
from the same book that Rails’ architecture heavily bases upon.