← All notes

WebView2: a modern web UI on top of a Delphi engine

Many companies have a desktop application with a solid engine — business logic, integrations, file handling and digital signatures — but an interface that shows its age. Users ask for something modern; the temptation is to rewrite everything, backend included. It’s the same expensive mistake.

Separate the engine from the interface

The right move is to tell apart two things that often get confused: the engine (what does the work) and the interface (what the user sees). The engine, if it works, stays untouched. The interface, on the other hand, can be rebuilt with modern technology — without rewriting a single line of logic.

WebView2: the web inside the desktop app

A tool that makes this easy is WebView2: a control that embeds Edge’s rendering engine (Chromium) inside a desktop application. In practice:

  • The backend stays in Delphi: business logic, data access, integrations, digital signature, file processing.
  • The interface becomes web: a single-page app in React and Tailwind, modern rendering, reusable components.
  • The two sides talk through a bridge (host object, postMessage or a small local API): the UI asks, the engine executes.

The result is a single installable application that runs offline too, with no dependency on an external browser.

Why it’s worth it

  • Modern UX without touching the reliable backend.
  • Fast iteration on the interface, with web tools and skills (including hot reload in development).
  • Contained risk: the delicate integrations — digital signature, formats, protocols — stay where they’re already proven.

The principle

It’s the bridge pattern applied inside a single app: you modernize the layer users see and keep the engine that works. Once again, evolution, not rewrite. Delphi doesn’t have to choose between “staying as it is” and “being thrown away”: it can put on a new interface and keep doing its job well.

Let’s talk