advanced
Refactor to Hexagonal Architecture
Guide the refactoring of a legacy Rails monolith into Hexagonal (Ports and Adapters) architecture.
📝 Contenido del prompt
Act as a Lead Application Architect. Describe the step-by-step process to refactor a legacy Ruby on Rails application with tight coupling between the database, web controllers, and business logic into Hexagonal Architecture. Explain how to define the core domain, identify ports (interfaces) and adapters (implementations), and incrementally migrate functionality without downtime. Discuss how to handle dependency inversion in a dynamic language.