5
When Rails Abstractions Are Not Enough
In this chapter, we conclude our Rails Way research and prepare to enter the world of abstractions. First, we will discuss the limitations of the Rails MVC-based architecture layout, which lead to either controller- or model-layer bloats—an ever-increasing number of lines of code and growing conceptual overhead. Then, we’ll take off the Rails Way and add S to the equation—services.
We will discuss how services can help in keeping controllers and models thin but, at the same time, turn into a chaotic or poor abstraction layer. Finally, we will discuss how breaking services further into more specialized abstractions could help keep the code base in a healthy state and how to design such abstractions following ...
Get Layered Design for Ruby on Rails Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.