Saturday, May 29, 2010

Framework

Having decided to use C++, the next step is choosing a framework to make it easy to write the program once and compile it under different operating systems.
The main choices are QT and wxWidgets: some time ago I decided to give wxWidgets a try and I am satisfies of it, so I will keep using it.
Before deciding which tools to use I developed a couple of open source programs that used the same tools. I needed them, so they were a good test.

wxWidgets is a large library, so the learning curve is rather steep at first. I can recommend Cross-Platform GUI Programming with wxWidgets by Julian Smart, one of the core designers. It gives a good starting point. Then you can look at the samples: there are many of them. At first they look rather obscure, but this only means that you still have to learn. After some time the core structure becomes clear, and you can concentrate on the details.

You can create the user interface by hand, but in practice you will need a program to help you design it in a simpler way. There are many of them and most are free, but I think that for professional use you should try DialogBlocks. The price is low, it works well and it is much more than an interface designer: it can create the full code of a simple program, and it can handle compilation in different platforms so you can build your program without having to create a Visual Studio project, makefiles and much more. It can also compile wxWidgets for you, saving some time and headaches.

wxWidgets is not Visual Basic. It takes time to really master it and it requires better programmers, but after learning it I think that you can create a program in about the same time as using some RAD tool.

No comments:

Post a Comment