• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

Legacy C++ Application porting

We have a legacy C++ Windows Application that needs to be re written, it uses lot of math calculations and is graphics dependent. Our questions:

1) Rewrite the code from scratch in C++ to support new features.
2) Port it to a newer language like C# or Java and why.

Our customers run this program on their desktop.
1 Solution
For me, it is clearly 1).

1. The C++11 is very nice an fresh enhancement of the language, and it is probably as efficient from the programmers-productivity point of view as C# or Java. You should definitely use the C++11, not the older version of C++.

2. It depends on what you mean by "a lot of math calculations". Definitely, C++ solution can be the fatest of the three languages.

3. You have the C++ solution and it need not to be perfect. However, you can enhance it gradually. When anything is bigger than small, the rewrite from scratch is often the way to "never delivered".

4. It is easier to separate the old math functionality (and other important functionality) to modules.

5. You will need to understand the old code. Rewriting it to C# or Java will force you to understand first anyway. It would lead to complications that are related to different abstractions.

6. I suggest to introduce the newer unit-testing framework like Catch (https://github.com/philsquared/Catch) or another of the same quality. Write the test for the old function first, copy and rewrite the test for the new implementation of the function, and only then enhance/fix the new implementation of the function. This is what will make you sure you did not introduced errors. Writing the test is the way to re-understand the old implementation. And also, writing the test will help you to reveal flaws in the interface of the functionality (that is it will guide you when removing interdependencies).

7. For the GUI, choose one of the portable frameworks -- they are generally cleaner than the OS specific ones. I like wxWidgets, others do like Qt.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now