Simple database application with gtk

Hi, I'm looking for an example of database application using gtk. Here: http://stackoverflow.com/questions/13949405/how-to-switch-from-qt4-mvc-to-gt... user ntd pointed on libgda, but it looks like it's not covered by Gtk2Hs. Emanuel

On Wed, Dec 19, 2012 at 10:26:37PM +0100, Emanuel Koczwara wrote:
Hi,
I'm looking for an example of database application using gtk.
Here: http://stackoverflow.com/questions/13949405/how-to-switch-from-qt4-mvc-to-gt...
user ntd pointed on libgda, but it looks like it's not covered by Gtk2Hs.
Just curious, why this particular specific combination? GTK has nothing to do with databases. Wouldn't it work just as well to find two separate examples, one of working with a database and one of using GTK? -Brent

Hi, On 22.12.2012 15:19, Brent Yorgey wrote:
Just curious, why this particular specific combination? GTK has nothing to do with databases. Wouldn't it work just as well to find two separate examples, one of working with a database and one of using GTK?
Examples of HDBC in 'Real World Haskell' and Gtk2Hs tutorials are sufficient, but database application with GUI it's different story. It's all about model/view/controller. Gtk/Gtk2Hs approach is like this (using model/view): get data from database and then duplicate them in the model (Gtk calls the model 'store'). This is unacceptable in real world application. There is a way, I can create my own custom model (and implement all this myself). This is the way to go, but unfortunately there is lack of examples. Modev/view/controller (TreeView/ListStore/TreeStore) provided by Gtk is useless in database context (unless one implements all missing functionalities with custom store). Emanuel
participants (2)
-
Brent Yorgey
-
Emanuel Koczwara