PHP output

Got an idea for enhancing SpiderBasic? New command(s) you'd like to see?
RobertRioja
Posts: 34
Joined: Tue Jul 16, 2019 2:07 am
Location: USA
Contact:

PHP output

Post by RobertRioja »

I came across a compiler called PluriBasic. Its syntax is standard Basic but it produces PHP code. This way you can create server side apps. It can communicate with SpiderBasic client apps through the HTTPRequest function.

It can also create Android apps in Java.

It appears to be based on PowerBasic syntax, since it supports Dialogs and Controls like PowerBasic.

Unfortunately, PluriBasic does not appear to be well supported. Version 5 has been out since 2018, and when I asked a question on their forum, I got no reply. However, I suggest everyone check it out.

Now for my Feature Request:
It would be great if SpiderBasic could also create PHP for server side development.

Thank you,
Robert
aonyn
Posts: 7
Joined: Tue Oct 21, 2014 9:29 pm

Re: PHP output

Post by aonyn »

Hi Robert,

This recommendation is not PHP, however, PureBasic (the parent product of SpiderBasic) is capable of developing server side applications. You could use PureBasic and SpiderBasic together to accomplish a full server / client side solution, and both are going to share syntax and much functionality.

Also, with PureBasic, you could easily port your browser based applications from SpiderBasic to desktop applications, and vice versa. Finally, PureBasic has a built in visual form editor which with just a small bit of effort, can also be used to design your SpiderBasic forms as well.

https://www.purebasic.com/index.php

Regards,
Dave
RobertRioja
Posts: 34
Joined: Tue Jul 16, 2019 2:07 am
Location: USA
Contact:

Re: PHP output

Post by RobertRioja »

I think that you are referring to CGI programming. But someone else in this forum commented that most servers run Linux, which means that you must run the Linux version of PureBasic. I do not have Linux, nor do I want to.

Besides, although CGI is still used, it is not the recommended approach for modern web design. PHP is by far the most commonly used server-side solution.

Another recommendation would be to allow PHP code in SpiderBasic programs. It already allows inline JavaScript (EnableJS, DisableJS), so why not EnablePHP and DisablePHP? All PHP code would then be placed in the HTML file created by SpiderBasic (not the JavaScript file). This should be easy to implement, and would allow us to easily embed PHP functions that we might be able call using HTTPRequest. I am not sure of the internal details, but I am sure that the developers should be able to figure it all out.

Robert
User avatar
Paul
Posts: 195
Joined: Wed Feb 26, 2014 6:46 pm
Location: Canada
Contact:

Re: PHP output

Post by Paul »

But someone else in this forum commented that most servers run Linux, which means that you must run the Linux version of PureBasic. I do not have Linux, nor do I want to.
Just an FYI...
I am not a Linux user either but I do have it in a VM with PureBasic installed just for the ability to compile any app (including CGI) I have created for Windows over to Linux. I personally run my Server on Windows so all my work is developed there but when it's time so hand over work to a customer on Linux, I simply open the Linux VM and do a quick compile using my Windows source code... done!
RobertRioja
Posts: 34
Joined: Tue Jul 16, 2019 2:07 am
Location: USA
Contact:

Re: PHP output

Post by RobertRioja »

Hi Paul,
Thanks for the info. I agree that there are ways to use PureBasic for CGI programming. I just wish that it was easier to implement PHP. I have seen several posts on this forum from people asking about it, so I am trying to come up with suggestions for future releases of SpiderBasic.

Robert
bbanelli
Posts: 107
Joined: Mon Jul 13, 2015 7:40 am

Re: PHP output

Post by bbanelli »

RobertRioja wrote:Hi Paul,
Thanks for the info. I agree that there are ways to use PureBasic for CGI programming. I just wish that it was easier to implement PHP. I have seen several posts on this forum from people asking about it, so I am trying to come up with suggestions for future releases of SpiderBasic.
Your "future" is wrong on so many levels.

As you were told before, while not being able to comprehend essence of SpiderBasic and/or JavaScript in general, you really have to get a basic grip on the technology. It is not a shame, nobody was born knowledgeable, but your request/wish is completely missed. Take this "completely" fully in force - you didn't miss a mile, you missed a whole planet.

If, and at the moment, while SB lacks much usability PB offers after years of heavy development, team would consider server side technology, than it most certainly wouldn't be PHP! NodeJS or similar concepts would be something to theoretically talk about, but as I've said - SB misses a whole lot of its original functionality for that part to be in any imaginable roadmap.

But I still don't understand your primary issue here - why on Earth would you "embed" (!?) PHP into SpiderBasic? If you wish to use PHP, nobody prevents you from doing that, so what is the problem to begin with? SB knows how to send (basic) HTTP requests, you handle your part in PHP (or whatever) and that's about it. So if you know how to handle server-side HTTP requests, pick any language that supports it and do what you need to do. SpiderBasic is not a tool for that!

Once again, and I can't stress this enough - SpiderBasic is not a desktop toolkit/framework/"language" (in comparison to PB), nor is it server side framework. It doesn't have any reason to be. It is a fantastic DOJO wrapper missing a whole lot of functionalities, and hopefully, one day team will be able to make it a great learning tool with some brutal extras that can create very useful and professional apps, like PB currently can. But even as-is, it can provide quick and dirty prototyping and testing tool.
"If you lie to the compiler, it will get its revenge."
Henry Spencer
http://www.pci-z.com/
RobertRioja
Posts: 34
Joined: Tue Jul 16, 2019 2:07 am
Location: USA
Contact:

Re: PHP output

Post by RobertRioja »

Thank you for your comments.

Obviously you are a programmer, and probably a very good one.

I have been in the world of software development since long before the internet. Not only as a programmer, but mostly as a businessman. And in the world of business, the rule is: "There is one reason, only one reason, and no other reason to be in business: profit." So I tend to look at things like SpiderBasic from a business point of view, more than from a software point of view.

I believe that if the developers also look at business from a profit point of view, they realize that ignoring the server-side client base is a mistake. It does not matter that there are a ton of tools already available to write PHP (and others) code. In fact, there are already just as many tools available to write HTML / JavaScript client-side code. But if you want to sell SpiderBasic as a better or easier way to write client-side code, it follows that your profitability will increase by also attacking the client-side business.

Any tool to develop client / server software in one package would probably be more profitable than the current PureBasic and SpiderBasic combined.

Granted, it is not a simple thing to accomplish, and the current developers might need help. So maybe you could offer your programming abilities to help out, and you could all make a lot of money. Personally, I would undertake the project all by myself, but I already made my fortunes and I am now happily retired.

I just wanted to share some of my ideas, but I not continue with this thread any longer.

Thank you for your time, and I hope good things for all.
Robert
the.weavster
Posts: 220
Joined: Sat Mar 01, 2014 3:02 pm

Re: PHP output

Post by the.weavster »

RobertRioja wrote:Any tool to develop client / server software in one package would probably be more profitable than the current PureBasic and SpiderBasic combined.
The only tool I know that does that is Xojo web edition but it achieves it by sending every client event to the server :o :(

I like a SPA + JSON-RPC combo.
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: PHP output

Post by Peter »

@RobertRioja:

Maybe SpiderBite meets your needs.

(The documentation is in German, but it can be easily translated using DeepL.)
RobertRioja
Posts: 34
Joined: Tue Jul 16, 2019 2:07 am
Location: USA
Contact:

Re: PHP output

Post by RobertRioja »

Hello Peter,

I looked into SpiderBite but have not yet installed it. It looks very interesting and I will pursue it as soon as I have some time. I translated the README to English and I can share it with you but I don't see how to attach a file to this post. Most forums have a way of allowing attachments.

Thank you,
Robert
Post Reply