Refactoring legacy C code into MVC design

Viewed 309

I am working on some OLD (as in older than me) C code that needs to be cleaned up and brought up to date so that (amongst other things), it is easier to maintain and integrates more cleanly with current code.

The existing code is quite messy, and freely intersperses GUI logic with business logic and data access logic. The only saving grace is that it is NOT spaghetti code, and that it is modular (as most code from the seventies tends to be).

My question is this: Can anyone provide me with a guideline on how to go about refactoring the code into MVC (BTW I am also moving the code from C to C++ whilst undertaking this task - but that is the least of my concerns, as I am quite aufait with both languages).

BTW, I am fully aware that this is not a trivial task. I just want to know what the steps are from going from modular code that mixes DBAL/BL/GUI to a cleaner MVC implementation.

2 Answers
Related