Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
19
Erster Beitrag:
vor 8 Jahren, 6 Monaten
Letzter Beitrag:
vor 8 Jahren, 6 Monaten
Beteiligte Autoren:
Jimbo, Paulo Oliveira, Glenn Rathke, Michael, Fabrice Harari, Toddy Utomo

Developing for SaaS

Startbeitrag von Michael am 04.06.2009 16:58

Hello:

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

Any comment?

Thanks;
Michael

Antworten:

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 http://www.windev.com/pcsoft/testimonials/new/soft-design-consulting.pdf






von Glenn Rathke - am 04.06.2009 17:48
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.



von Paulo Oliveira - am 04.06.2009 18:19
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

von Michael - am 04.06.2009 18:37
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

von Michael - am 05.06.2009 15:20
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.


von Glenn Rathke - am 05.06.2009 16:11
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



von Fabrice Harari - am 05.06.2009 16:16
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?

von Glenn Rathke - am 05.06.2009 16:27
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.

von Paulo Oliveira - am 05.06.2009 16:30
Hi Paul,

Very nice solution.

Are these dbs hyper file or mysql, mssql, etc?


von Glenn Rathke - am 05.06.2009 16:35
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.

von Paulo Oliveira - am 05.06.2009 16:43
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 .......

von Paulo Oliveira - am 05.06.2009 16:47
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

von Jimbo - am 05.06.2009 17:10
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


von Jimbo - am 05.06.2009 17:15
Hi Guenter...

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

Best regards



von Fabrice Harari - am 05.06.2009 17:29
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

von Jimbo - am 05.06.2009 20:33
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


von Toddy Utomo - am 06.06.2009 04:57
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 //

von Jimbo - am 06.06.2009 05:50
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



von Jimbo - am 10.06.2009 20:48
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.