Our software has a few places where it uses wizards to collect information from users then generates a bunch of database entries based on what users enter into those wizards.
Currently these wizards and the rules for generating database entries from the wizards are handled by many kLOC of unmaintainable C++ code. In the spirit of The Pragmatic Programmer's chapter on metaprogramming, I'd like to move the wizards' UI and the database generation rules into some external, higher-level data that would be easier to maintain and easier to customize or modify as users' requirements change.
I can think of a few ways that I might do this, but I don't know if any of them would work out or not.
- For a Qt app, I could use PyQt to script everything.
- For a .NET WPF app, I could use XAML for the UI and IronRuby or IronPython for the database rules.
- For a native Windows app, I could embed HTML plus Javascript into a dialog box and let that manage most of my logic, like this article describes.
Is this goal reasonable? What's a good way to approach it? (My application is currently native Windows, using CodeGear C++Builder, so I'm most interested in solutions that would work in that environment.)