Creating documentation from the scratch for beginners

When you do a search for ‘GTK Tutorial’ chances are high that you probably land on this page - GTK+ 2.0 Tutorial. Personally, I find this tutorial easy to follow.

One of the reason why I find this easy to follow is, GTK2-way to write application. The flow in this tutorial is procedural. For example, - init the toolkit, write the application code, and the invite main loop to handle the application. This is even make more sense to teach this to students (or someone who is looking for GUI lib to write applications) as flow and code was same. But, then GtkApplication introduced. I know it is for good. But, now it becomes hard to explain to someone who want to learn development.

Is there any guide that gradually build an application in GTK2-way, then show problems at all possible places which might be solved using GTK3-way or using GtkApplication? I’m looking for guide that has lots of code example and explicitly mention the problems that GtkApplication will going to solve.

Apart from this I’m think about creating documentation for beginners like -

  • An Introduction to C
  • Learn how to create few data structures and some util functions in C.
  • Then introduce GLib library
  • Introduce the possible advantage of using OO pattern in C
  • Then introduce GObject library
  • Discuss about GUI development
  • Then Introduce GTK
  • Create simple application using GTK2-way
  • Show the possible problems with GTK2-way
  • Introduce new way to build application.
  • Create an application in GTK3 or may in GTK4
  • While creating an application, learn how to access documentation and asked for help
  • Go further and introduce supportive libraries
  • A list of well written and beginners friendly real world projects

Obviously you request exactly my GTK4 book :slight_smile:

I assume you saw it at hackernews:

I don’t know who pushed the book there, as the book is only 20% complete yet, and they ask me not for permission. Most people there have never used an GTK app before, they complained about the fact that I have turned off font antialiasing for my 4k display…

For the book: Well it is Nim, but converting the code to plain C or other languages which do not force you to write all in OOP style is easy. Maybe, when ever I should continue or even finish the book I may “sell” licenses for authors of different languages to write version for other languages. Beside C the Zig language may be a candidate. And of course Rust. Maybe Golang, Julia, Crystal, Haskell?

An additional note: Since yesterday we have webkitgtk support for the Nim bindings, it was requested recently.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.