// blog

Moving a C++ Desktop Program to the Web: What We Learned Porting One

Moving a C++ desktop program to the web means rebuilding its MFC or Win32 screens for the browser, writing down the rules in its handlers and classes, and porting what’s hard to replace, like readers for custom file formats, then testing them against real files. We did this with OpenBoardView: 12 of its file readers ported to TypeScript, 1,145 pins matched across two versions of one real board, and 2,700 damaged files refused without a crash.

Last updated 1 min read

A laptop circuit board in the Board Viewer, in a browser

C++ desktop programs are often the ones that do the hard work: engineering tools, instruments, viewers for files nobody else can read. They’re also the ones people assume can’t move to a browser. We moved one: OpenBoardView, a C++ viewer for circuit boards.

What’s worth porting

The screens get rebuilt; the knowledge doesn’t. In OpenBoardView the value was in its file readers, the code that understands a dozen board formats. We ported 12 of them from C++ to TypeScript, and built a new interface around them.

How we know it’s right

Real files. One real board in two versions checked the port pin by pin: 1,145 pins matched, every one on the same net. We also fed it 2,700 damaged files, and every one was refused cleanly, with no crash.

Is a browser fast enough?

Often, yes. The Board Viewer reads a real laptop board of 9,388 pins in 38 milliseconds, in the browser. What’s too heavy, or must stay private, runs on a server instead.

The rest of the program

MFC dialogs and Win32 windows become web screens. Rules in message handlers and classes are written down and checked. Databases move and are checked. Printing becomes print pages and PDFs.

See how a C++ program moves to the web. The first call is free.