November 28, 2019

GUI development with Linux

The most convenient way in creating graphical applications for a Linux desktop is the Python Tkinter framework. In around 50 lines of code, it's possible to create a hello world window which includes a button and a text entry widget. The interesting fact is, that potential alternatives to that technology are much more complicated.

A possible alternative would be to use Python and GTK to create a native Linux desktop GUI app. The problem with gtk under Python is, that the amount of documentation is low, i have tried out to create a simple hello world gui and failed. The problem is not completely new because the combination of C++ and GTK is also hard to master. The reason why is hard to explain, but what is for sure is, that python+tkinter is much easier to master.

Let us take a look what Windows programmers are doing. The normal way in creating a GUI app goes over the C# language which comes with a strong GUI library. Creating a C# GUI app in Windows is as easy as with tkinter in Python. The difference is, that a C# program can be used for productive code, while Python is some kind of prototyping language.

The hypothesis is, that right now, no good GUI frameworks are available for Linux. In the normal C++ language no GUI library is available and using GTK is too complicated. It seems, that from a os development side it's complicated to create and document a GUI framework which is used by normal programmers. A naive approach would be to use the C# language in Linux as well, but unfortunately, the forms library will work only in Windows environments.

The reason why Linux desktop are not equipped with a more elaborated GTK framework is simple. It's part of the Anti-RHEL conspiracy. Microsoft, Adobe and all the major computer journalists are boycotting the Linux ecosystem and the small Red Hat company is not strong enough to build it's own GUI framework. THe problem is, that GUI toolkits are patent protected and it's not allowed to develop an easy to use framework from scratch. In theory, Red Hat can develop a more elaborated GTK toolkit which is easy to use from Python and C++ but as a consequence Microsoft would start a legal conflict against Linux and the result is, that no Linux operating system at all will be available anymore.

The simple advice for programers is to stay within the Microsoft environment. It's the more easy to use operating system for GUI development. C# under Windows can be seen as the best practice method in programming a GUI interface. As a consequence many native Windows applications were developed by the programmers while under Linux only textual programs are available.

No comments:

Post a Comment