BBC BASIC for Windows
« Online program »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:46pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1 2  Notify Send Topic Print
 locked  Author  Topic: Online program  (Read 2353 times)
bartmunting
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 4
xx Online program
« Thread started on: Sep 22nd, 2013, 10:01am »

Can I make a program in BB4W that can be put on a website and there it will run and people can work with it?
If it can be done would some one have an example (simple!)

Bart Munting
« Last Edit: Sep 22nd, 2013, 10:15am by bartmunting » User IP Logged

JGHarston
Junior Member
ImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 52
xx Re: Online program
« Reply #1 on: Sep 22nd, 2013, 1:39pm »

on Sep 22nd, 2013, 10:01am, bartmunting wrote:
Can I make a program in BB4W that can be put on a website and there it will run and people can work with it?
If it can be done would some one have an example (simple!)
Yes. Just compile it and upload the executable.
For example: http://mdfs.net/temp/hello.exe will run, IF the user has configured their browser to execute downloaded binaries AND they answer 'yes' to any download checks AND it isn't terminated as a suspicious process AND the users chooses to run it instead of saving it.
« Last Edit: Sep 22nd, 2013, 1:39pm by JGHarston » User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Online program
« Reply #2 on: Sep 22nd, 2013, 2:20pm »

on Sep 22nd, 2013, 10:01am, bartmunting wrote:
Can I make a program in BB4W that can be put on a website and there it will run and people can work with it?

Yes, but bear in mind that the program will end up running on the user's computer so it will only work if he is using a Windows PC, not a Mac, or a tablet, or a smartphone etc. Depending on your application that could be a significant limitation.

Quote:
If it can be done would some one have an example (simple!)

Basically all you need to do is compile your program to a standalone EXE, upload it to your web space, and put a link to it on your web site.

However in these security-conscious days you need to ensure that your program will be considered 'safe to run' and not blocked by the browser/PC. I would strongly advise you to purchase a code-signing certificate and sign your EXEs; I appreciate that the expense involved is significant (although there are some good deals to be had if you shop around) but really it's the only way to ensure that your program won't be flagged as dangerous (and even then the user will probably be warned that it is 'infrequently downloaded' and should be treated with caution).

Before embarking on this endeavour I would suggest you try running some of the EXEs on my site (which are mostly signed) and some of those on the BB4Wgames site (which are mostly unsigned) just to get a feel for how your particular browser/PC reacts:

http://www.rtrussell.co.uk/bbcwin/examples/
http://www.bb4wgames.com/

Richard.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Online program
« Reply #3 on: Sep 22nd, 2013, 2:58pm »

Oh dear, just as I encourage people to use this forum instead of the Yahoo group we acquire a troll (the first ever, I think)!

Needless to say, this is a group where I expect BB4W enthusiasts to hang out, not people who do not appreciate its virtues. That's not to say that criticism is unwelcome (I have many criticisms of BBC BASIC myself) but please make it constructive and appropriate.

Richard.
User IP Logged

Troll
Guest
xx Re: Online program
« Reply #4 on: Sep 22nd, 2013, 3:19pm »

Yeh right, "criticism is welcome", you simply delete the posts and the user.
Great going Mr Russell very adult of you.

Kind regards
The resident troll.
« Last Edit: Sep 22nd, 2013, 3:23pm by Troll » User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Online program
« Reply #5 on: Sep 22nd, 2013, 3:38pm »

Sigh. I suppose we should be grateful that the BB4W forums have generally been amazingly free from this kind of hassle; I know others haven't been so lucky.

It's noteworthy that in the twelve years (almost to the day) of BBC BASIC for Windows existing I have never banned anybody from the BB4W Yahoo group, and only one person has ever been banned from here - apart from advertising robots.

I reiterate that I welcome criticism of BB4W, so long as it is accurate and constructive. Plenty of it can be found in the archives of this forum and the group.

Richard.
User IP Logged

bartmunting
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 4
xx Re: Online program
« Reply #6 on: Sep 23rd, 2013, 11:09am »

I think i have made not the good question.
I was meaning to make a web based program. There is no need for download but think of a booking program is a website. Normally they are made with a language like PHP.
Is that possible with a BB4W program?
I have made a program which uses SQLite, where can i upload this to get comments?

Bart
User IP Logged

JGHarston
Junior Member
ImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 52
xx Re: Online program
« Reply #7 on: Sep 24th, 2013, 10:08pm »

on Sep 23rd, 2013, 11:09am, bartmunting wrote:
I was meaning to make a web based program.
...
Is that possible with a BB4W program?
I have made a program which uses SQLite, where can i upload this to get comments?

Ahhh! You mean run a BBC BASIC program on your server that responds to requests from a web client and supplies data back.

I recall Jon Ripley did some experiments with configuring Apache to include BB4W binaries as CGI programs (Common Gateway Interface - a method of a web server asking another program to do a task for it).

The code needs to attach the input and output to certain streams and be careful about flushing them on completion. There may be something in the Yahoo messages conversations archive from (IIRC) about five years ago.
« Last Edit: Sep 24th, 2013, 10:09pm by JGHarston » User IP Logged

JGHarston
Junior Member
ImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 52
xx Re: Online program
« Reply #8 on: Sep 27th, 2013, 01:41am »

on Sep 24th, 2013, 10:08pm, JGHarston wrote:
I recall Jon Ripley did some experiments with configuring Apache to include BB4W binaries as CGI programs ...

Ah, here we are.
« Last Edit: Sep 27th, 2013, 01:41am by JGHarston » User IP Logged

bartmunting
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 4
xx Re: Online program
« Reply #9 on: Sep 27th, 2013, 08:15am »

Thanks so much.
I read it and it totally beyond my knowledge!
I have now decided to make a program and store the data on the internet. The program then can be distributed to the people who are going to use it and the data they will get them from the internet.
I am now trying to figure out how to store the data.
Maybe any idea?

Bart
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Online program
« Reply #10 on: Sep 27th, 2013, 10:41am »

on Sep 27th, 2013, 08:15am, bartmunting wrote:
I read it and it totally beyond my knowledge!

Try this: http://www.jmarshall.com/easy/cgi/

I'm a little puzzled by Jon's comment in the Wiki article that STDOUT must be closed before quitting, because what he actually does is call SetEndOfFile rather than closing the file.

Richard.
User IP Logged

JGHarston
Junior Member
ImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 52
xx Re: Online program
« Reply #11 on: Sep 27th, 2013, 5:49pm »

I think the biggest problem you are going to find is getting your server to run a Windows .exe file.
Almost all ISP servers run on a Unix platform, so you'd need their Unix server to be able to run Wine (WINdows Environment) or equivalent. A bigger problem is that almost all ISP servers will not allow you to run an arbitary .exe file as it opens huge security holes.

So, practically, you would need to run your own server on your own physical Windows PC running Windows. Then you have control over potentially harmful .exes being run. You would need a Web Server running on your Windows PC, such as Apache. You would then configure it to run .exe files - to be safest, you'd register the specific .exe files that you want to run rather than any random .exe

So, unless you have your own Windows PC that you have a Web Server running on 24 hours a day you will need to investigate other options. It might be worth you fleshing out a bit more what you want to accomplish.
User IP Logged

MrX
Guest
xx Re: Online program
« Reply #12 on: Oct 1st, 2013, 09:39am »

JGHarston is correct and that is why we have CGI and server side scripting.

For the average person to expose an exe to the WWW is sheer lunacy.
Even scripts can sometimes have attack vectors if it does not "sanitize" potentially harmful characters such as \ and ~ let alone an exe compile by someone with no knowledge of online threats and vulnerabilities.

Simple concept, if it can't be done with a server side script, rethink your application.
« Last Edit: Oct 1st, 2013, 09:43am by MrX » User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Online program
« Reply #13 on: Oct 1st, 2013, 10:16am »

on Oct 1st, 2013, 09:39am, MrX wrote:
For the average person to expose an exe to the WWW is sheer lunacy.

I disagree. You only need to look at the various BB4W support sites, such as http://www.bbcbasic.co.uk/bbcwin/examples/ and http://www.bb4wgames.com/ to find many compiled BB4W EXEs which are available to be run directly from the web by a single-click. This is an extremely useful facility, and something that BB4W is well suited for.

There is fundamentally no difference between running such an EXE and running the installer for a piece of freeware. It is the responsibility of the end-user to be careful to run only EXEs which he is confident are safe. Ideally they should be digitally signed for added security, and BB4W has that capability.

Indeed the principal reason for Code Signing certificates existing is to support running EXEs which have been downloaded from the web! If you take the view that you should never put EXEs on a web site they would be largely unnecessary!

The whole basis of the World Wide Web is freedom; there are very few restrictions on what can be placed on a web site and that is how it should be. The responsibility lies with the user to use the web safely, and that means that he should use due caution when running an EXE. But it does not mean that such EXEs should not be made available.

There are many situations when a BB4W EXE is not an appropriate solution, not least if the application needs to run on a non-Windows client. In such cases a server side solution such as a CGI script (or even a BBC BASIC program serving HTML code) is obviously more appropriate.

Richard.
User IP Logged

MrX
Guest
xx Re: Online program
« Reply #14 on: Oct 1st, 2013, 10:31am »

Richard

I suspect you misunderstood me.
What I meant is that the exe runs on the server as opposed to a person clicking on it and it's run on the users machine.

The way I understood the OP when he wrote:
Quote:
Can I make a program in BB4W that can be put on a website and there it will run and people can work with it?

and
Quote:
I was meaning to make a web based program. There is no need for download but think of a booking program is a website. Normally they are made with a language like PHP.


Is that the exe is run server side and interacts with the user via a web browser as opposed to just hosting the exe which people can click on, it will be downloaded to their computer and run.

For the exact reasons I mentioned in my previous post, you will be very hard pressed to find a hosting provider that will allow you to run an exe server side even if the server is running Windows which 99% don't.


« Last Edit: Oct 1st, 2013, 10:52am by MrX » User IP Logged

Pages: 1 2  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls