lundi 26 août 2019

Designing for incremental migration

We would incrementally move away from a legacy persistence infrastructure to a strategic one.
The underlying infrastructure would be abstracted in a Gateway ,which would be injected with the appropriate medium at initialization.
The application would delegate the persistence to the Gateway irrespective.
However,for the legacy medium - the application needs to do an additional houskeeping.
If we do as below - the islegacy() infests the entire app space instead.

Is there a pattern or approach recommended for such incremental migration?

Class App{

     void persistEmployeeData(){
            ...
            ...
           success = gateway.persistEmpoyee(empDTO);
           if(gateway.islegacy()){
             ...do housekeeping...
            }
     }

}

Aucun commentaire:

Enregistrer un commentaire