Welcome! Log In Create A New Profile

Advanced

Developing for SaaS

Posted by Michael 
Michael
Developing for SaaS
June 04, 2009 06:58PM
Hello:

I was wondering if WinDev + WebDev allow applications development for SaaS (Software as a Service)...

Any comment?

Thanks;
Michael
Glenn Rathke
Re: Developing for SaaS
June 04, 2009 07:48PM
Hi Michael,

What specific functionality are you looking for?

I've got a WebDev software package I've licensed to several companies as a service. I've implemented one website with one database that is configured based on the client.

WebDev now supports several instances of the same website on the server. Is this what you were looking for? PCSoft has a testimonial with a small mention of SaaS at [www.windev.com]




Paulo Oliveira
Re: Developing for SaaS
June 04, 2009 08:19PM
SaaS is a model of software deployment more than one software development model.
It's doable but depends on what is the service you are selling and how you want to sell it.

If it's thru webservices you can do it with windev. If it's thru some website you can do it with webdev.

Virtually all software fits the SaaS model well.

Michael
Re: Developing for SaaS
June 04, 2009 08:37PM
Hi Guys:
Thanks for the response!
Actually, I 'm looking for an example that lead me how to start with SaaS. I 'm planning to create an specific kind of application which would be more convenient to provide as a service rather than selling the package.
I know I could do it using WebDev, but I 'm just checking if there is something else (tricks..) that I would need to take into account for these particular cases..

Thanks you all.

Regards;
Michael
Michael
Re: Developing for SaaS
June 05, 2009 05:20PM
Hello Glenn:

One of the problems I could get when trying to start with this, is how you can configure the same database in order to have multiple instances for each different customer? I mean, the same database structure is accesses with different data for each customer..
How did you solve that?

Thanks;
Michael
Glenn Rathke
Re: Developing for SaaS
June 05, 2009 06:11PM
Hi Michael,

In each table I have a Company_ID field. That way when a user logs in, I know which Company they belong to and then everytime I display any table, I always make sure to include that Company_ID value. I also maintain a Location_ID, that way I can even further refine the Company data down to a specific location.
Fabrice Harari
Re: Developing for SaaS
June 05, 2009 06:16PM
Hi Michael


Personally, I just use a different DB per company. HChangeDir allows to specificy in which directory you want to work (even in HFCS where you can select/create a subdirectory of the main one)...

so the initial URL (differetn per customer) points to a different htm static page with a redirection to my main site with a parameter telling the project which subdir to work in

Best regards

Glenn Rathke
Re: Developing for SaaS
June 05, 2009 06:27PM
Fabrice,

I like your idea of several databases! Certainly keeps the data separate.

I employed the single db because then I only have to be concerned about changing a table or field definition in one db and not 25 or so that I would have using MySQL.

Is there an easy way to update the structure in all dbs, specifically when using MySQL or MS SQL?
Paulo Oliveira
Re: Developing for SaaS
June 05, 2009 06:30PM
We use a diferent solutions with one DB by client and one DB for user information.
We have the users information in one DB and based on that information we change the connection to client DB.
It was the the solution with the minimum modifications to the existing software ant to have diferent backup/restore policies for each client.
The change to the software was to put some lines in the project ini code to use two connection instead of one to de DB.
Glenn Rathke
Re: Developing for SaaS
June 05, 2009 06:35PM
Hi Paul,

Very nice solution.

Are these dbs hyper file or mysql, mssql, etc?
Paulo Oliveira
Re: Developing for SaaS
June 05, 2009 06:43PM
We made one small app to do that.

With HF the app only runs the wdmodfic agains all db.
For the other db engines our app list all the tables in the analisys and try to open them if we detect some error the app renames tha table recreate them and copy all the records from the original one to the new definition.

PS: i't a litle bit more complex than this because of the constrains and soon but it's doable without a great effort.
Paulo Oliveira
Re: Developing for SaaS
June 05, 2009 06:47PM
HF classic, sqlserver and oracle at this time.
MYSQL is on the way, i don't know if it's new to you or not but MYSQL run's in IBM AS400 and we want to go to that market too on the other way ORACLE bougth SUN so .......



Edited 1 time(s). Last edit at 06/05/2009 06:55PM by Paulo Oliveira.
Jimbo
Re: Developing for SaaS
June 05, 2009 07:10PM
Hi,

we connect to different databases by HOpenConnection() / HChangeConnection() this way the databases are physically separated - programming and backup for each company is easier and straightforward.

Regards,
Guenter
Jimbo
Re: Developing for SaaS
June 05, 2009 07:15PM
Quote
Fabrice Harari
Hi Michael

Personally, I just use a different DB per company. HChangeDir allows to specificy in which directory you want to work (even in HFCS where you can select/create a subdirectory of the main one)...

so the initial URL (differetn per customer) points to a different htm static page with a redirection to my main site with a parameter telling the project which subdir to work in

Best regards

Fabrice Harari
WinDev, WebDev, WinDev Mobile Consulting & Video Courses

Hi Fabrice, I have to warn about using diffeent subdirectories and HChangeDir() in a HyperFileSQL environment. I found several problems with using subdirectories within a database. Unfortunately I had to switch back to having a separate database for each customer - without using subdirs!
Kidn regards,
Guenter
Fabrice Harari
Re: Developing for SaaS
June 05, 2009 07:29PM
Hi Guenter...

really? What kind of problems? I'm using that often and I haven't had any problem (yet?)

Best regards

Jimbo
Re: Developing for SaaS
June 05, 2009 10:33PM
Hi Fabrice, I'll have to dig it out again, but it had been a very well hidden but extra nasty problem. Took me more than one month to re-code my application from subdirectories to separate databases. Sorry, that's all I'm remembering for the time being. I'll go into my archives and let you all know .. kind regards, Guenter
Toddy Utomo
Re: Developing for SaaS
June 06, 2009 06:57AM
Hi Paul

It is possible to create a new database instance for each company within SQL databases (ms-sql, my-sql or oracle), from within windev via programming?

Thanks
Toddy
Jimbo
Re: Developing for SaaS
June 06, 2009 07:50AM
Quote
Toddy Utomo
Hi Paul

It is possible to create a new database instance for each company within SQL databases (ms-sql, my-sql or oracle), from within windev via programming?

Thanks
Toddy

Hi Toddy, yes, that's possible. Of course. How?

// Declare connection variable
MyDataConnection is Connection
MyDataConnectionName is string
.
.
.
// Set parameters:
MyDataConnection..User = MyHFCSUserName
MyDataConnection..Password = MyHFCSUserPassword
MyDataConnection..Database = NoSpace(ActualCompany)
MyDataConnection..Server = MyServerAndPort
MyDataConnection..Provider = hAccessHFClientServer // <= points to HyperFileSQL
MyDataConnection..Access = hOReadWrite
MyDataConnection..CursorOptions = hServerCursor+hDynamicCursor+hOptimisticCursor
MyDataConnection..ExtendedInfo = "Data-Connection to "+NoSpace(ActualCompany)
MyDataConnection..Caption = NoSpace(ActualCompany)
MyDataConnection..CryptMethod = hCryptStandard

IF NOT HOpenConnection(MyDataConnection) THEN
EndProgram("HOpenConnection / Verbindung HFSQL failes!")
END

MyDataConnectionName = MyDataConnection..Name

Kind regards,
Guenter
Jimbo
Re: Developing for SaaS
June 10, 2009 10:48PM
Quote
Fabrice Harari
Hi Guenter...

really? What kind of problems? I'm using that often and I haven't had any problem (yet?)

Best regards

Fabrice Harari
WinDev, WebDev, WinDev Mobile Consulting & Video Courses

Hi Fabrice, the discussion about WDMODFIC gave a kick to my old brain. See my posting:

Quote
guenter
Written by Guenter at 20 Feb 2006 14:43:21:

As an answer to: Re: Using WDModfic.exe (v9+v10) in HF /CS environment written by Pascal Scheffers at 20 Feb 2006 12:15:15:

Hi Pascal,

wdmodfic should work fine when HF /CS is used without dafiles in any subdirectories, with the database only. It should even work fine with a web server. Problems start with using the /WDD clause - the definition, where the analysis is located. If there is a space in the path you have to surround the path definition with Charact(34) - wdmodfic will not be able to understand the path otherwise.

Don't use REP-files with HF /CS. Delete them, if they are there. They contain server-relative file paths and wdmodfic does not 'understand' server-relative file paths. Though HCreation etc. for HF /CS happily do produce REP files containing relative file paths. Look into such a REP file. Note that the structure of the REP file does not comply with the structure shown in HELP and note that the WinDev IDE will grab such REP files for restructuring and inevitably will fail to do so. Lots of funny error messages - they all come from incompatibility of REP-file to wdmodfic.

You can put wdmodfic into the program where the user starts to use the database and everytime the program is started it will look for the correct structure of the database.

Example:

// in Project code: For Test-mode copy the analysis to the exe directory:
IF OnTestMode() THEN
// Copy analysis to \exe -directory
IF fFileExist(Left(CompleteDir(fExeDir()),Length(CompleteDir(fExeDir()))-4)+"MyProject.WDD") THEN
fCopyFile(Left(CompleteDir(fExeDir()),Length(CompleteDir(fExeDir()))-4)+"MyProject.WDD",fExeDir())
END
END


// This one starts wdmodfic.exe in automated mode
ExeRun(CompleteDir(fExeDir())+"WDModfic.exe /WDD=""C:\My Projects\MyProject\Exe\MyProject.wdd"" /US",exeMaximize,exeWait)

Currently, using /DIR and/or -subdir is pure nonsense, it will not work.

Kind regards,
Guenter


If you're doing so, the major obstacle is to define the

>Well, I am glad I am not the only one with WdModfic and a gripe... My recent misadventure with HF/CS and WdModfic (it just didn't work, and no visible fix on the pc soft website)
>I have to automate the wdmodfic business, I really don't like how much interaction the 'normal' setup needs to modify the files. Neither do my customers.
>I like windev a lot, but the pcsoft idea of automation requires waaaaay to much knowledge from the user. I usually just want to ask 'Want me to do that?' If the answer is yes, just do it. Don't bother the user with more questions.
>- Pascal.

I'll dig into this one again and check all the old issues with subdirectories, the integrity.fic file and the REP-file. I'll do a report about my findings!
Kind regards, Guenter





Edited 1 time(s). Last edit at 06/10/2009 10:50PM by Jimbo.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: