Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: OCaml's long range graphical direction?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Arturo Borquez <aborquez@a...>
Subject: Re: OCaml's long range graphical direction?
To Caml ML:
Some reflections about OCaml - GTK
I being using GTK libraries for a year and now I am pretty familiarized with it. About a half year I started to use Glade wich is very cool since in low level GTK there are lot of lines to code that Glade do for you (interface.c,h) usually more than 1500 for a modest proyect, and you can concentrate your attention in callbacks (the place where you really code your app). Also XML output of Glade offers flexibility to do parsing to generate skeleton apps to other languages (would be OCaml ... great!). But I agree Jacques Garrige that perhaps it would not be such important as it aparently seems. Why?
1) In LablGtk widgets are packed in classes of higher level than simple bindings 1 : 1, so LablGtk (with the help of labels) tends to be more natural to Caml.
2) Packing widgets is not an issue, you need no more than 2 lines (almost cases 1 line) so a full window can be visualized in a page of code.
3) Most of coding are placed in the callbacks functions so there would be no advantage for Glade. 70% of the code is the app, so GTK interface coding is the less.
4) Glade imposes a static design and could be a drawback for modularization and dynamic construction of objects (during run time) such as variable tables or windows layout thats depend on result of some other function(s). Doing all cases at desing time to fit it in a 'match' would result in a bulky app.
5) LablGtk with -threads offers you viewing your layout as you code, so if you have Copy-Paste facility you can code on a text editor and paste on LablGtk and watch results interactively.
6) Familiarization with LabGtk classes takes a while, but you will find them very productive, labels helps a lot!.

As final conclusion I think it's better to concentrate efforts to do a good documentation for LablGtk for those that are not so familiarized with GTK, or deal with the new GTK 2.0.
Regards
Arturo Borquez


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com