[Geany-devel] Developing database query plugin

Lex Trotman elextr at xxxxx
Thu Feb 24 23:46:14 UTC 2011


On 25 February 2011 00:17, Mike Thorn <mthorn at iqguys.com> wrote:
> Hello all:
>
> I'm working on a database query plugin written in Vala and have a couple of
> questions regarding the general process of working with the geany community.
>
> First, when is the right time to request that my plugin be added to the
> geany-plugins repo? My general principle as a developer has always been to
> start using VC from the start, but maybe you don't want half finished
> plugins in your repo.

If you are worried about that, I'd suggest that you use one of the
free GIT repos in the meantime until your plugin is ready for its
grand unveiling.

>
> Second, is there anyone interested in assisting me in working on this? I'm
> fairly new to GTK/Vala, but not to programming.  I've got the plugin loading
> up a new window, connecting to a database and executing queries, and very
> nearly displaying the data, but I've got a lot of questions that I don't
> have the answers to, such as:
> * What's the best way to make this plugin connect to different databases?
> Right now it's working with postgresql only

Given Geany's G* bias (Glib, Gtk, ...) and your use of Vala, probably
use Gnome-db (libgda) as a portable d/b layer, its a Gobject interface
and seems to talk to several of the most important d/bs although some
interfaces have become out of date (but I guess that means no one uses
them :-)  It also provides a set of database oriented GUI widgets that
might save you lots of work.

> * What's the best way to store the database config? Ideally I'd want the
> option to store the connection information in the project data.
>

Suggest you store your config in its own file and only store a
reference to the file in the project file (if one is open) or the
prefs file if no project is open.  That way you can use your own
format, but probably best to use Glib keyfile so as to match the rest
of Geany, unless your data is deeply hierarchical, then use XML. And
it works with and without a project.

Cheers
Lex

> Thanks for your time.
>
> --
> --
> Mike Thorn, Web Developer
>
>
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>



More information about the Devel mailing list