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.
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 * 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.
Thanks for your time.
[0] Before I take a shot at your questions, I have to say 'Great Idea!'. I work with huge decision matrix databases and it can be a pain to switch to a console, connect to the database, and query the matrix just to find out which values I need to include in the code.
[1] Ideally, I would think that the database connection would be user customizable - as in specifying a web browser or file manager. I know that as only a dabbler SQL, sqlite has been just fine for my purposes. If you must pick one interface, though, I think postgresql is fine.
[2] It seems like most of the config files are stored in plain text config file format, AKA:
[header] option1=value1 option2=value2
On Thu, Feb 24, 2011 at 8:17 AM, Mike Thorn mthorn@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.
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
- 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.
Thanks for your time.
--
Mike Thorn, Web Developer
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
On 02/24/11 05:17, Mike Thorn wrote:
- What's the best way to make this plugin connect to different
databases? Right now it's working with postgresql only
I have 0 experience with this, but maybe ODBC is the thing to use? Google hit: http://www.unixodbc.org/ and there's tons of docs on the Microsoft side.
- 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.
The project file is just a key/ini/config file, so you could probably write into that, or use your own. I think the plugin API has functions for working with keyfiles. It's also easy from straight Vala: http://code.valaide.org/content/example-program-using-keyfile-glib-class-rea.... I guess you'd need something different if you wanted to save passwords. Maybe: http://valadoc.org/references/gnome-keyring-1/0.11.5/index.htm at least for Gnome.
Happy coding,
Matthew Brush (codebrainz)
On 25 February 2011 00:17, Mike Thorn mthorn@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@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
On Fri, 25 Feb 2011 10:46:14 +1100, Lex wrote:
On 25 February 2011 00:17, Mike Thorn mthorn@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.
Either this way or simply let it grow in the geany-plugins SVN repository.
If you want to put the code into the SVN repo, just tell me your Sourceforge username and I grant you commit access. Then we can setup the build environments (autotools+Waf) to build your plugin and other interested users can easily test it early and easily.
Still, your choice of course.
Regards, Enrico