Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
By, Peter Harkins Rails apps start out quickly and beautifully, but after a year features are a struggle, tests are slow, developers are grinding, and stakeholders are unhappy. "Skinny controllers and fat models" hasn't worked, and "use service objects!" is awfully vague. This talk explains how to compact the "big ball of mud" at the heart of your app into a bedrock of reliable code. It gives the steps to incrementally refactor models into a functional core and gives explicit rules for how to write light, reliable tests. https://push.cx/2015/railsconf Help us caption & translate this video! http://amara.org/v/G61Q/
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 video "What Comes After MVC," Peter Harkins addresses the challenges faced by Ruby on Rails applications as they mature and grow over time. Initially, Rails apps are sleek and efficient, but without careful design, they can devolve into complex, unmanageable structures, often referred to as a 'big ball of mud.' Harkins critiques the traditional MVC approach, arguing that it ultimately does not suffice for larger, long-lived projects. He emphasizes the importance of incrementally refactoring code to create a more reliable and maintainable architecture. Key points discussed in the talk include: - **Common Pitfalls in Rails Development**: Harkins identifies problems such as bloated models, complex migrations, and slow tests, which commonly arise as an application evolves. - **Critique of MVC and ActiveRecord**: While MVC provides a solid foundation, its limitations become more apparent with complex applications. Harkins stresses the importance of being aware of how ActiveRecord can lead to poor design choices. - **Two Rules for Refactoring**: - Values should be immutable, ensuring consistency in returned results. - Values should not have side effects that affect external systems, enhancing reliability in code. - **Extract Class Refactoring**: Harkins outlines strategies for breaking down large, unwieldy models into smaller, manageable entities and values that adhere to the aforementioned rules. - **Concept of Entities vs. Values**: He contrasts mutable entities, which possess identity and state, with immutable values that are stable and reliable. - **Use of Adapters and Shells**: Adapters manage side effects and external interactions, while shells coordinate complex operations and manage object dependencies. - **Practical Examples**: Harkins presents a case study based on his own project, Shy, illustrating how poor original design and chaotic models can be incrementally improved. In conclusion, Harkins encourages developers to be mindful of their coding practices, applying these refactoring principles to manage complexity better and enhance test reliability. He invites engagement from the audience, promoting further discussions around code optimization experiences. Overall, the talk underscores the importance of consistent design rules when evolving Rails applications to prevent their degradation into unmanageable codebases.
Suggest modifications
Cancel