HACKER Q&A
📣 osullivj

Production Win32 MFC Systems?


There are many legacy Win32 MFC C++ fat client systems out there; I often see customer service people using old Windows Desktop systems in retail situations. I worked on a mortgage origination system - Vertex Omiga 3 - that is still used by Virgin Money to book all new loans. Recently I got a new tyre fitted for a lease car, and the admin was done in an old style Windows app. Old fat client apps tend to have a lot of biz logic mingled with the UI logic as they tend to be built as client server systems, with just the DB on the back end. So a rewrite will be costly, and will probably miss a lot of the corner case logic embedded in the client.

So my question is two fold... a) What Windows based client server apps have you encountered in production recently? b) What porting strategies do you think are viable?

This post [1] flags some of the porting issues.

[1] https://medium.com/iress/mfc-and-the-future-of-c-a99b608e09b2


  👤 scarface74 Accepted Answer ✓
I’ll answer b)

The porting strategy depends on what you are trying to accomplish. If all you want to do is not have to install a desktop app on each PC, just use something like Citrix.

But I had to do something similar with an ancient PowerBuilder app.

1. write a COM wrapper over the entire app using something like Active Template Library.

2. Then you write a C# REST API on top of it that interacts with legacy app over COM.

3. Write a web interface that calls your REST API.

4. Write integration tests that call you’re API and make sure you get the expected results.

5. Record request/results from users using your web interface from step 3.

6. Slowly start porting the business logic from the MFC app to a native .Net app

7. While you are doing #6, run your test from #4 and run all of the requests from #5 and compare them to your new code. If you notice some use cases that you missed, add them to your test suite.