Re: [OT] Guidelines for handling data in a GUI application?
- From: Jef Driesen <jefdriesen hotmail com>
- To: gtkmm-list gnome org
- Subject: Re: [OT] Guidelines for handling data in a GUI application?
- Date: Fri, 17 Nov 2006 21:10:02 +0100
Murray Cumming wrote:
On Fri, 2006-11-17 at 15:41 +0100, Jef Driesen wrote:
I'm ready to write my first real GUI application (using gtkmm of
course). I studied the gtkmm documentation and can make simple
applications. The focus there was on the user interface part (e.g.
adding widgets, event handling and stuff like that). But that is only
one part of an application. My application must also be able to show and
modify data. But I don't know how to do that in a "well designed" way.
I looked for more information, but I couldn't find what I'm looking for.
I do find lots of information on GUI toolkits and database APIs, but
almost nothing useful on how to glue them together. Does anyone know
where I can find more information on this (websites, books,...)?
To give you some more background on my project: My application stores
its data in an sqlite database. The application will have one main
window, probably some type of master-detail view, with a listview for a
(readonly) overview of the main database table and a detail part to
modify that data. All the other data in the database is related to that
main table (e.g. data to populate widgets in the detail part of the main
window) and modified using secondary windows.
It's probably worth looking at libgnomedb.
I took a quick look at the libgnomedb website [1] and it seems to
provide some wrapper around various database apis (including sqlite) and
data-aware widgets. I'm not sure if that's what I'm looking for. Using
the sqlite api directly seems also much easier and is very well documented.
My problem is not really that I don't how to get the data out of the
sqlite database and add it to a certain widget. It's more about how do I
structure/design my code. Things like: Do I add the database code inside
my window classes? How do I pass data between windows? Do I create a
class for every object stored in the database? At which point do I
validate the user input? ...
If I could study a well written and not too large or complicated
project, that would already help me a lot.
[1] http://www.gnome-db.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]