Summary
In this chapter, you’ve taken a deeper look at Rails applications’ model and persistence layers. You’ve learned about two fundamental object-relational mapping patterns, Active Record and Data Mapper, their pros and cons, and why Active Record better fits the Ruby on Rails paradigm. You’ve learned about the Active Record framework and its areas of responsibility.
You’ve learned about the Active Model interface and library and how it can be used to build Active Record-like models and to extract domain models from Active Record. You also learned about the God object problem and its relationship with code churn and complexity characteristics.
In the next chapter, we will branch out of the MVC path and talk about supporting Rails sub-frameworks, such as Active Job and Active Storage, and learn about their architectural ideas.