Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

New DataProvider and Installscript
svend
#1 Posted : Monday, 28 December 2009 5:04:01 AM(UTC)
Rank: Newbie

Joined: 28/12/2009(UTC)
Posts: 1
Location: Lugau, Germany

Hello,

I'm currently in the process to add a PostgreSQL-Dataprovider to GalleryServerPro.
The final goal is to have GalleryServerPro running on mono in the future.
The conversion of the classes was done quite quickly, but the integration into the installer is giving me headaches.
It is quite centered arround mssql.
Are there plans to abstract the install procedure a bit? So thate the integration of new dataproviders gets easier?

My Idea is to extend the dataproviders a bit for the installation routine. So that the installscript calls them at installation time.
I don't know If it's wise to do so or just to create new classes for the installation.

My Background are php-webapps in the past and some c# desktops programs.

So any hints on this are really welcome.

Thanks in advance.
Roger Martin
#2 Posted : Monday, 28 December 2009 12:35:52 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,168
Location: Fort Atkinson, WI

If I could do it over again, I would probably do something similar to what you suggest with extending the data provider (for example: adding a method ConfigureDatabase). But I don't think the current setup is that bad. Notice this function in the installer:

Code:
private void ExecuteInstallation()
{
if (rbDataProviderSQLite.Checked)
{
ExecuteSQLiteInstallation();
}
else
{
ExecuteSqlServerInstallation();
}

SetFlagForMembershipConfiguration();
}


It would be trivial to extend this to handle a third option. Sure, you have to write the functions to set up the database, but you'd have to do that anyway. You will also have to modify some functions that have knowledge of both data providers (such as UpdateWebConfigFile).

If you have the time and want to refactor the installation to be the ultimate in extensible, you have my blessing and I would definitely be interested in incorporating it into the GSP code base.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.