Re: MidgardConfigFile
Jukka Zitting <[email protected]>
| Newsgroups | gmane.comp.web.midgard.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 1/4/06, Piotras <[email protected]> wrote: > There is also new midgard internal class MidgardConfig and we should remove > midgard structure usage after 1.8 is out. > Briefly, we will be able to use objects for midgard connections ( for example ) > with simple API : > > GObject *connection = g_object_new(MIDGARD_TYPE_CONNECTION, NULL); > GObject *config = g_object_new(MIDGARD_TYPE_CONFIG, NULL); > > midgard_connection_init(connection, config); Could you please elaborate. If we are changing the main entry points of midgard-core, then please, *please* document the API before implementing it. For example the above code sample gives no indication of which database is being connected, how errors should be handled, etc. I'd also like to know if such an API would always require the configuration settings to be in a central configuration file, or could an application optionally construct the required configuration during runtime. Issue 1: Does it make sense to use GObjects here? What's the benefit? Issue 2: The current config.c is almost 700 (!) lines long. Wouldn't it make more sense to simply use GKeyFile for handling the configuration files? You'd have essentially the same functionality (more actually, and much better tested) with at most 100 lines of code using GKeyFile. BR, Jukka Zitting -- Yukatan - http://yukatan.fi/ - [email protected] Software craftmanship, JCR consulting, and Java development