3 Replies - 740 Views - Last Post: 15 March 2016 - 05:18 AM

#1 Glorfindal   User is offline

  • Java Enthusiast
  • member icon

Reputation: 37
  • View blog
  • Posts: 606
  • Joined: 31-December 08

The feasibility of writing a website with FastCGI and FreeBasic

Posted 14 March 2016 - 05:51 AM

The other day I had an odd idea pop into my head. I was wondering is it actually feasible to write a website that utilizes FreeBasic and FastCGI. To create a site that uses HTML5 and Bootstrap with a modern front-end, but a back-end based on an older language.

I was trying to think of problems with this, but I actually could not come up with any. There appears to be mysql and sqlite libraries already for FreeBasic, its compiler works on both Linux and Windows and since it runs as native code (even if the compiler is not completely efficient, which I don't know the state of the compiler) it should be at least be a little faster than PHP (interpreted) correct?

So I don't think I will actually take on this project, but I was wondering are there actually any issues with creating a website in this way. It amuses me to think about and I think it would pretty funny if there was a forum software based around this premise. So what are you all's reactions to this concept?

This post has been edited by Glorfindal: 14 March 2016 - 07:31 AM


Is This A Good Question/Topic? 0
  • +

Replies To: The feasibility of writing a website with FastCGI and FreeBasic

#2 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2031
  • View blog
  • Posts: 6,202
  • Joined: 15-January 14

Re: The feasibility of writing a website with FastCGI and FreeBasic

Posted 14 March 2016 - 10:18 AM

The major issue that immediately comes to mind is that there is not native support for handling HTTP requests. That means that you are responsible for writing all of the code that would, for example, parse an HTTP request and extract the header data, uploaded file data, post data, querystring data, cookie data, etc. Things like PHP and .NET do all of that request processing for you. That's a lot of boring boilerplate stuff that you would need to write yourself instead of using something that already does it which would let you immediately focus on the logic for handling the request.
Was This Post Helpful? 0
  • +
  • -

#3 Glorfindal   User is offline

  • Java Enthusiast
  • member icon

Reputation: 37
  • View blog
  • Posts: 606
  • Joined: 31-December 08

Re: The feasibility of writing a website with FastCGI and FreeBasic

Posted 14 March 2016 - 08:07 PM

Well if you use CGI and simply make the entire site a CGI script some of the information would be given to you in environment variables like HTTP_COOKIE and QUERYSTRING, but I understand what you are saying.

I might just try my hand at writing a simple library to handle just that eventually, maybe then someone would make a website with it. To me it was just an interesting idea to pondor even if I probably won't do it. I am still pretty content with PHP right now. :P
Was This Post Helpful? 0
  • +
  • -

#4 baavgai   User is offline

  • Dreaming Coder
  • member icon


Reputation: 7181
  • View blog
  • Posts: 14,969
  • Joined: 16-October 07

Re: The feasibility of writing a website with FastCGI and FreeBasic

Posted 15 March 2016 - 05:18 AM

Ultimately, if you have a language that can print out html and parse a string, you can use it as your CGI engine.

I've done basic sites with bash, awk, C, whatever. Perl, or course, was CGI king.

I can't imagine wanting to resurrect use freebasic, but to each their own. No reason it shouldn't work.

Edit: my mistake, looks like this version of basic is still going strong: http://www.freebasic.net/

This post has been edited by baavgai: 15 March 2016 - 05:20 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1