Server-side database

Got an idea for enhancing SpiderBasic? New command(s) you'd like to see?
sq4
Posts: 1
Joined: Wed Feb 26, 2014 2:18 pm

Server-side database

Post by sq4 »

Just an idea :

Since most of the webhosters support both ASP en PHP, I propose the following :

The moment the SB compiler reads a database command like OpenDatabase, why not create an additional ASP or PHP file.
Those will handle, through AJAX, the database commands from the client.

syntax : OpenDataBase("foo.sql","","","ASP") or OpenDataBase("foo.sql","","","PHP")
The same could be applied to "TXT" and "XML"

Good luck with SpiderBasic!
MuuSer
Posts: 6
Joined: Mon Mar 03, 2014 10:32 pm

Re: Server-side database

Post by MuuSer »

Strange.

As this Idea is already more than month old, surprisingly there are nil supporters for this wish!!!!?

Now I express only my own opinion and maybe I’m stupid (or maybe not maybe), but I think that if Fred and Co not implement this feature, the SpiderBasic is just a toy and I’m very sad about that this “toy project” wastes so much time, instead of making PureBasic more powerful. :(

Maybe I’m just iniquitous, but I haven’t read and heard so much about SpiderBasic’s future plans. Perhaps some developer of SP can share what are plans from road alpha to full commercial version? I think, you have some DoDo-lists about that and also I think that curiosity is not a sin. :)

What I want to tell is that I’d like SpiderBasic very much if it can use server-side databases and there is possibility to bind these cute SpiderBasic “windows” to existing web-projects, so they become backgrounds for these windows instead of present one color backs. Explained in other words - when I click some link in web page – pseudo window made with SpiderBasic will open.

And last but not least – possibility to change the testing browser (IE, FireFox, Safari, …) is must be for web designers and testers due the “browser wars”.

Success anyway!
User avatar
SinisterSoft
Posts: 77
Joined: Sun Apr 06, 2014 11:41 pm
Location: Preston, UK
Contact:

Re: Server-side database

Post by SinisterSoft »

Server side databases are a must - but it will need to be secure. Maybe the best way is through html requests.
novaseer
Posts: 5
Joined: Wed Feb 26, 2014 1:34 am

Re: Server-side database

Post by novaseer »

there seem to be a few javascript options for connection to various databases through node.js - I expect it should be reasonably simple to implement with Spiderbasic's inline javascript support.
menschmarkus
Posts: 37
Joined: Thu Apr 10, 2014 3:35 pm

Re: Server-side database

Post by menschmarkus »

I confirm, server side database access would be very helpful.
It surely will be more easy to transfer source code from PB to SB instead programming in PHP,ASP,...
You could stay with familiar syntax.
as soon you do it right, it works !
the.weavster
Posts: 220
Joined: Sat Mar 01, 2014 3:02 pm

Re: Server-side database

Post by the.weavster »

sq4 wrote:Just an idea :

Since most of the webhosters support both ASP en PHP, I propose the following :

The moment the SB compiler reads a database command like OpenDatabase, why not create an additional ASP or PHP file.
Those will handle, through AJAX, the database commands from the client.

syntax : OpenDataBase("foo.sql","","","ASP") or OpenDataBase("foo.sql","","","PHP")
The same could be applied to "TXT" and "XML"

Good luck with SpiderBasic!
I think if SpiderBasic is going to replicate PureBasic's database commands then it really needs to be implemented using a non-blocking IO solution on the server side (e.g. nodejs) with communication between client and server happening via websockets. Standard HTTP requests to PHP or ASP scripts come with a lot of overhead that makes it a poor option for sending one SQL statement at a time with a confirmation response coming back each time.

If you want to use PHP and HTTP POST requests then I'd suggest sending a JSON object that encapsulates all the data you want written to the database in one hit, doing all the database handling directly in PHP on the server side and just sending one response back once the whole transaction is complete. Google 'Remote Procedure Call Servers' for more info.

Personally I'd like to see PureBasic/SpiderBasic get some quality JSON commands so they can be good clients to a PHP RPC server because I prefer the latter solution. PHP is hard to beat when it comes to working with databases.
DeanH
Posts: 8
Joined: Mon May 12, 2014 11:45 pm
Location: Adelaide, South Australia
Contact:

Re: Server-side database

Post by DeanH »

I'll throw my wish in the ring for this, too. I do not have experience with Java and I have the feeling there is a technical reason why the database functions built into PureBasic are not present in Spider. I have developed a widely-used school library application, written entirely in PureBasic, and was hoping to convert it or part of it to Spider to allow access via browsers. SQLite is the database engine. So if it is possible somehow, I would certainly be in favour of having that integrated into SB in some manner, or at least know how to do so.
Post Reply