Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Designing a GUI framework

I need to create a custom GUI framework for a project. I actually created a very primitive GUI framework which has buttons, images, text etc. But it is pretty simple and I don't have any prior knowledge of designing a GUI framework. The project we are working on got a little serious and I need to do a better job. So, what books or any kind of documentation can you recommend for me?

Note: I want to create the framework probably in an object-oriented way and I will probably use C# but the documentation does not need to be in C#.

like image 400
Canol Gökel Avatar asked Apr 18 '12 10:04

Canol Gökel


1 Answers

Ok, I'm far from an expert but I'll try to write some useful stuff. I don't know much about your experience, so sorry if it seems silly.

I have been working with several GUI frameworks in the past, in various languages (wxpython, gtk+, swing, . . .). Never as an expert, but here is what I can say :

  • Keep it simple. If you want to design from scratch, I guess there is no need for crazy complex stuff. Try to keep it as straightforward as possible by reducing the number of inputs and options in your elements.

  • b. A major common point of all the successful frameworks I know is the abstraction. Each single element can be easily handled, but it still has the power of all its parents. This allows your objects to be really versatile while simple.

  • Read lots of other frameworks documentation. I like spending time reading the doc of GUI framework because it helps you understand the abstraction levels. I find the pygtk doc easy to read.

  • Use other frameworks. Most frameworks do things more or less in the same way. This is especially true for GUI frameworks. Frame containing layouts; menubars and statusbars; I bet 95% of the concepts you want to use can be found in the other frameworks. In this way, the best way to know how to develop it is to know what you need and how to do it. Whenever I work on a GUI, I start reading the corresponding series of articles here . The writer does a great job explaining everything in a simple way, so that you can get along fast with the concepts.

  • Keep it open. Something I see more and more often is the use of high level syntax for describing GUIS. GTk for example can take XML files in input and create a whole interface out of it. I find it very nice for abstraction, and reuse. And I also greatly reduce the amount of code needed.

I couldn't really find books on the precise subject you want. I think you already searched on the web also. I hope those small ideas will help you.

like image 55
jlengrand Avatar answered Sep 21 '22 09:09

jlengrand