I've been using Linux for a few months and have previous experience creating Windows applications with C++ and C#. I'd like to learn how to build applications intended for Linux, including AppImages, Flatpaks, and Debian packages. How different is Linux development from Windows development, especially for compiled programs and graphical applications? Is there a way to package an application so it continues working for many years without frequent updates, or will changes to dependencies, desktop environments, kernels, and distributions eventually require maintenance? I've heard Docker might help with this, and I'm also curious whether similar principles apply when creating native applications for BSD systems such as FreeBSD.
2 Answers
Try to keep the core logic separate from the user interface and platform-specific code. The core can follow the conventions of your chosen language, while the interface can use a toolkit such as Qt, GTK, or another cross-platform framework. This makes it easier to support different Linux distributions or later port the application to BSD. Learn the programming and GUI fundamentals first, then study deployment and packaging once the application itself is working.
Linux is not one uniform desktop environment. Different distributions may use different library versions, packaging systems, and desktop technologies, so a binary built on one system may not work everywhere. Flatpak and AppImage are useful for broader distribution because they can bundle more of what the application needs. A .deb package is more integrated with Debian-based systems but usually relies more heavily on the target system’s libraries. Test on the distributions you intend to support.

So the format affects compatibility as much as the programming language does. I’ll look at each format separately instead of assuming one package works identically on every distribution.