Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 191
  • 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.
0
proginc
Asked:
proginc
1 Solution
 
peprCommented:
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.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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