Published Sep 3, 2019

Episode 55: Refactoring Pt. 2

Delve into the complexities of software engineering with insights from Martin Fowler on large-scale refactorings, including strategies for maintaining API backward compatibility and managing database schema changes. Discover practical solutions and cultural considerations for successful implementation in ever-evolving systems.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Schema Changes

    Changing database schemas during refactoring can be challenging due to cultural perceptions and technical complexities. highlights the cultural issue where databases are often seen as more permanent than applications, making schema changes difficult to justify 1. suggests that agile practices can facilitate frequent schema changes, using scripts to manage these updates efficiently 2.

    We are changing the schema while we are developing not the production schema, but the schema in development, let's say every two or three days, adding stuff and removing stuff, renaming tables, whatever.

    ---

    This approach allows for continuous integration and testing, ensuring that changes are manageable and do not disrupt the production environment.

       

    Data Migration

    Data migration is a critical aspect of database refactoring, requiring careful planning and execution. discusses the use of scripts for migrating data alongside schema changes, emphasizing the complexity of handling multiple schema versions 3. He also mentions the potential need for lazy migration strategies, which allow data to be gradually moved from old to new schemas 3.

    It becomes more complicated if you have, let's say three or four different schema versions where you have all the loading techniques and you need to migrate the data from schema to schema lazily.

    ---

    These strategies help manage large databases where immediate data migration is impractical, ensuring data integrity and system stability.

Related Episodes