Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Ruby on Rails as a framework follows the Model-View-Controller design pattern. Three core elements, like the number of layers in a traditional birthday cake, are enough to “cook” web applications. However, on the long haul, the Rails cake often resembles a crumble cake with the layers smeared and crumb-bugs all around the kitchen-codebase. Similarly to birthday cakes, adding new layers is easier to do and maintain as the application grows than increasing the existing layers in size. How to extract from or add new layers to a Rails application? What considerations should be taken into account? Why is rainbow cake the king of layered cakes? Join my talk to learn about the layering Rails approach to keep applications healthy and maintainable.
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In the talk "Rails as a Piece of Birthday Cake" presented at RailsConf 2023, Vladimir Dementyev explores Ruby on Rails architecture, specifically focusing on the Model-View-Controller (MVC) design pattern. He compares it to a birthday cake, illustrating how the basic three-layer structure of MVC is sufficient for smaller applications but becomes impractical as projects grow larger and more complex. **Key Points Discussed:** - **MVC Composition:** The MVC pattern divides responsibilities among three core components: Model (business logic), View (user interface), and Controller (interacts with both Model and View). However, too often, Rails applications blur these roles, leading to poor separation of concerns. - **Scaling MVC:** Adding new functionalities within the confines of MVC's three layers can lead to a cumbersome, tangled codebase. Dmitriev suggests that instead of enlarging these layers, developers should introduce new abstraction layers to maintain code clarity and manageability. - **Layers and Abstraction:** Properly identifying and implementing multiple layers is crucial for crafting maintainable applications. Dmitriev discusses how to structure web applications as assembly lines where each layer handles specific tasks effectively, which directly impacts application performance and ease of maintenance. - **Best Practices for Abstraction:** He emphasizes following Rails conventions, learning its internal workings, and applying layering principles while introducing abstractions. This method avoids unnecessary complexity while enhancing code maintainability. - **Practical Examples:** The talk highlights practical examples where layers can be extracted: converting complex code into service objects and using form objects to encapsulate functionalities related to user inputs, demonstrating better organization and less coupling. - **Future Considerations:** Finally, Dmitriev notes that while experimenting with other frameworks/tools is acceptable, aligning new strategies with Rails conventions is crucial to retain productivity and coherence in the codebase. **Conclusions:** Dmitriev concludes that moving beyond a simplistic MVC model by embracing layered architecture can significantly enhance maintainability and clarity of larger applications. He emphasizes the importance of evolving Rails practices in alignment with its foundational principles and announces an upcoming book intended to further explore these concepts.
Suggest modifications
Cancel