web applications - What is the recommended strategy of complete refactoring of a live product? -
consider have "system_a" web application. , system_a has 3 layers: ui, businesslayer , data-layer.
and want make widespread refactoring of system_a (the ui , businesslayer only) while working live product.
what should safest strategy of refactoring system_a , release refactored product after testing -let's call "rf_systema"- in way can reversed system_a in case of unexpected bug (without forcing users change urls)?
i haven't web-development, idea:
you write/generate redirect-layer first so:
let's had 3 functions in system_a this:
system_a.call1(...) system_a.call2(...) system_a.call3(...)
then rename calls this...
system_a.call1(...) -> old_system_a.call1(...) system_a.call1(...) -> old_system_a.call2(...) system_a.call1(...) -> old_system_a.call3(...)
...and create temporary redirect system this:
system_a:call1(...) { old_system_a.call1(...); } system_a:call2(...) { old_system_a.call2(...); } system_a:call3(...) { old_system_a.call3(...); }
this system go live immediatly.
then create refactoring classes bit bit, test them , change redirection calls. after refactoring complete, remove redirection calls , use reafactored system.
the granularity of redirection should correspond granularity of refactoring. if refactor individual functions , function signatures stay same, can use approach stated above. if redesign whole parts of system, redirect whole parts.
example web: have index.php calls 3 functions: header(), body() , footer().
you either redirect calls header, body , footer (if signatures stay same), or redirect whole thing , call 1 function index.php "currentindexphp()";
currentindexphp() call header, body , footer.
if organize folders , files accordingly, should able control refactoring quite nicely.
Comments
Post a Comment