Skip to content

Instantly share code, notes, and snippets.

@chrismo
Created March 11, 2014 18:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrismo/9492197 to your computer and use it in GitHub Desktop.
Save chrismo/9492197 to your computer and use it in GitHub Desktop.
ActiveRecord limitations in PoEAA
As the domain logic gets more complicated and you begin moving toward a
rich Domain Model (116), the simple approach of an Active Record (160)
starts to break down. The one-to-one match of domain classes to tables
starts to fail as you factor domain logic into smaller classes.
Relational databases don't handle inheritance, so it becomes difficult
to use strategies [Gang of Four] and other neat OO patterns. As the
domain logic gets feisty, you want to be able to test it without having
to talk to the database all the time.
Fowler, Martin (2002-11-05). Patterns of Enterprise Application
Architecture (Kindle Locations 1221-1227). Pearson Education (USA).
Kindle Edition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment