Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Rocky Mountain Ruby 2023 - Modularizing Rails Monoliths One Bite at a Time by Marc Reynolds As Rails monoliths grow, coupling becomes increasingly difficult to manage. Many have reached for hope in microservices but instead found higher complexity. The Modular Monolith approach is a proven, lightweight alternative that offers the benefits of enforced boundaries without being cumbersome. This talk proposes a phased approach to refactoring toward this style using the packwerk gem.
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 titled "Modularizing Rails Monoliths One Bite at a Time" presented at Rocky Mountain Ruby 2023, Marc Reynolds discusses the challenges and solutions associated with managing complexity in Rails monoliths as they scale. He highlights that while many developers turn to microservices for relief, they often face increased complexity instead. An alternative approach, known as the Modular Monolith, is proposed, emphasizing modularization to enforce code boundaries without the disadvantages of microservices. Key points from the talk include: - **The Problem of Spaghetti Code:** As applications evolve, codebases often degrade into complex 'spaghetti code' where maintainability suffers, leading to bloated controllers and models, which complicates development and increases bug occurrences. - **Packwerk Gem:** Marc introduces the Packwerk gem, a tool that aids in maintaining clear boundaries within the codebase through static code analysis to detect privacy violations. By structuring code into cohesive packages, teams can enhance clarity and manage dependencies effectively. - **Phased Approach to Modularization:** - **Understanding Feature Sets:** Collaborating with product leaders to map out features aids in defining package structures. - **Creating Initial Packages:** The initial phase involves simply moving code into designated packages based on feature sets without restructuring, ensuring speed and urgency. - **Declaring Dependencies:** The next phase focuses on identifying and resolving dependency violations while maintaining cohesion within packages. - **Establishing Public Interfaces:** Finally, teams must create stable public interfaces that outline clear contracts for interactions between packages, allowing internal iterations without impacting external dependencies. - **Long-term Maintenance:** Ensuring continuous integration practices, monitoring for privacy violations, and keeping documentation up to date are crucial for maintaining a robust modular structure. - **Conclusion:** Marc concludes that with the right practices and tools, applications can regain clarity and maintain a rewarding development experience, steering clear of the pitfalls of microservices. By following a phased approach, teams can modularize their monoliths effectively, fostering collaboration and easing onboarding for new developers.
Suggest modifications
Cancel