Gtk#: The Downsides
I love Gtk and what I can do with it. Simple and straight forward, for the most part, and runs well on Windows and Linux. I honestly have never tried it on a Mac though, one day maybe. However there are some issues with Gtk# I would like to address as they really annoy me sometimes.
1 — No Webview — there are some libraries out there that attempt to fix this problem, but in todays world of development, webview is a pretty important component, especially if you are not developing a web based application and need to access existing payment portals, for instance.
There is WebWindow that attempts to solve this as well, but from the dotnet core/.Net 5 side of things. It works well enough, however is a pain to bind to your Gtk applications.
2 — No data binding — There is no way to bind data to existing views in Gtk out of the box. You have to create your own functions to handle that for you, which can be time consuming and ultimately make using something like Gtk a harder choice. Its not a difficult task to add some binding features to your custom widgets, but as Gtk is thread-aware and not thread-safe, you will find yourself doing more work than you want to just to get a simple concept up and running. On the flip side though, I myself enjoy being able to implement those features as I don’t have to re-invent the wheel and I can better understand how the code is working when it comes time to debug an issue. Definitely not all down hill.
3 — No Good Gui Packages — While there is a way to create custom Gui with Gtk, it is hard to find third-party add-ons/libraries that will take some of the stress of development off of you. If you do find one, it is often outdated or unsupported. This can hinder some developers from wanting to dive deeper into Gtk# as there is really nothing out there that says “Look how f#@!ing sexy this is!”, theres no one excited to use Gtk. It usually comes down to needing a cross-platform framework to deliver your solution with. Gtk however does exist for other languages such as C++ and python, what you learn developing a c# app is pretty transferable to any language that supports Gtk packages.
Everything I have discussed today is solely my own opinion based on usage. I honestly really like the framework and have used it a number of times to develop front end clients with, but these are the 3 biggest problems I run into when coding. Sometimes you can get hacky and work around things, other times its more complicated causing you to rethink th design of the program. This is not intended to scare you, just give you a warning that there are issues, like in anything. Always do your research before choosing a tool for the task at hand, it might look like it will do the work, but break half way through the job. I hope someone will find this helpful in their decision making process!
Until next time, take care.