Refactoring obnoxious obsolete systems through AOP or other automated tools?

I recently played with PostSharp, and this caused a problem that I encountered a few years ago: a client developer released a web application, but they did not think about how they managed the state information - saving (do not ask me why) statically on the application instance in IIS. Of course, the system did not scale and was deeply erroneous and unstable. But it was a large and very complex system, and, therefore, the cost of its re-profiling was prohibitive. At that time, my summary was to try to reorganize the code base in order to properly decouple the components.

At that time, I was trying to use some kind of abstraction mechanism to allow me to intercept all calls to a static resource and redirect them to a component that will correctly manage state data. The problem was that about 1000 complex links were redirected (and I did not have much time for this) Manual coding (even with R #) turned out to be too time-consuming - we abandoned the code base and rewritten it properly. It took over a year to rewrite.

Now I wonder: did I have access to an assembler-rewriter and / or Aspect-oriented programming system (e.g. PostSharp), I could easily automate the process of refactoring direct links and convert them to interface links that can be redirected automatically and provided by the factory.

Has anyone used PostSharp or similar systems to restore pathological legacy systems? How successful were the projects? Did you find after it was worth it? Will you do it again?

UPDATE : See this blog for further discussion.

+3
source share
1 answer

, , , , . . 1000 ; , , .

-, , .

1) Boeing 6000 , ++ ( 3-10K SLOC) , CORBA, DMS Software Reengineering Toolkit, , ++, . , 5 . 98% , , 1 -, . . :

Akers, R., Baxter, I., Mehlich, M., Ellis, B., Luecke, K., Case Study: ++ , 49 (3): 275-291 2007. .

2) , . - B-2, 1975 . , , / JOVIAL, langauge, ( , , ). . OTOH, JOVIAL, (, , , JOVIAL) . JOVIAL-to-C, DMS, 100% - , ( ...) . B-2 bomber conversion. B-2 , .

. , .

, , , , , , .

+4

Source: https://habr.com/ru/post/1719682/


All Articles