Currently, we are working on a C++ legacy code base, which consists of several software components.
One of the components, are written in a way that is extremely difficult to maintain. (For example, memory allocation is done in X place, but memory de-allocation is done in Y place. This make memory management a painful job). Till now, we able to solve (or workaround) all the memory leakage issues.
However, after several rounds of bug fixing, our feeling is that, due to the high maintenance cost of this software component, we are unable to go too far from current milestone.
I know it might be bad to rewrite the source code : http://www.joelonsoftware.com/articles/fog0000000069.html
However, instead of re-factor the current code, we forsee it will be better to re-write from scratch due to
- Till now, no one in the team can fully understand that software component code.
- The legacy software component is a small piece of software. 20k lines, I guess
- Our teams are pretty clear on the requirement and what we are trying to achieve
Hence, we are planning to go for a managed code, at least make memory management a painless job. We plan to choose C#, as
- All our C++ code are compiled using Microsoft VC++
- We are using MFC, in other software components. (in DLL form) Every DLL, do have their very own resource.
I am from C++ and Java background, and know nothing much on C#.
- How well C# to interface with MFC DLL, with some of the DLL functions will invoke MFC GUI?
- Anything I need to pay attention on it?
- Will the interfacing with legacy C++ DLLs be easier, if we are using Managed C++?
Thanks.