Component-Based Rails is a proven method to manage the complexity of large applications. It ensures that we can maintain development speed, quality, and fun throughout the life cycle of applications. Components do this by enabling conversations about high-level structures that lead to improved communication of intent, more collaboration opportunities, and better maintenance capabilities.
The Sportsball Sample Application
Below is a component-structure diagram for the Sportsball sample application
. Each bubble is a component. Each arrow shows you a dependency of one component on another. Yes! Component-based applications will end up comprising of many components, each of which has a specific contribution to the overall application’s functionality.
Views, controllers, models, migrations, tests - they all live within each component and thus separate all aspects of the application’s functionality. You can even go as far and not have any functionality within the main Rails application itself.