Re: Create high-level UI widget library



On Tue, Apr 24, 2018 at 06:38:36PM +0000, Victor Malov wrote:
I think there is need for some high-level UI library, based on GTK, which
will provide ready-to-use widgets for Gnome Desktop and applications
willing tightly integrate into Gnome.

It depends on what you need, but there are already a lot of libraries
available in GNOME providing higher-level APIs than what GTK+ provides.

See:
https://developer.gnome.org/platform-overview/unstable/
(but it doesn't mention all GNOME libraries).

The reasons for this are the following:
3. Instead of reinventing similar widgets all around different Gnome apps,
gives unified and reusable set.
4. Choice for developers - create their custom widgets or use default ones.

I totally agree with the above two reasons. For certain kinds of apps, I
also think that there has been a lot of wheel reinventing over the
years. Some new GNOME apps are created almost from scratch, while in
2005 there was already a lot of choice for those kinds of apps (I'm
thinking for example about music players and image/photo viewers).

For text editors and IDEs there has been also a lot of wheel
reinventing, it's for that reason that I've added more features to
GtkSourceView, and created new libraries like gspell and Tepl. See:
https://wiki.gnome.org/Apps/Gedit/ReusableCode

I'm doing the same for Devhelp, from the roadmap:
https://wiki.gnome.org/Apps/Devhelp/RoadMap
"Move almost all the code in the library, to have a high-level API"

So you can see that in some GNOME areas there is already an effort to
make more code re-usable, creating higher-level APIs, etc.

I think each GNOME application should have its own shared library (like
libdevhelp for the Devhelp application), to write the code in a
re-usable way (the implementation is also cleaner that way), to reduce
wheel reinventing over time. Having a well documented library also
permits to better understand the codebase for someone new to the
project, it lowers the barrier to entry. A re-usable class is also
easier to test independently of the application. There are basically a
lot of benefits by writing a library.

--
Sébastien


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]