Created
March 11, 2014 18:37
-
-
Save chrismo/9492197 to your computer and use it in GitHub Desktop.
ActiveRecord limitations in PoEAA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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