QB64 Phoenix Edition
QBJS - General Question for Web Development - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: QBJS, BAM, and Other BASICs (https://qb64phoenix.com/forum/forumdisplay.php?fid=50)
+--- Thread: QBJS - General Question for Web Development (/showthread.php?tid=2095)



QBJS - General Question for Web Development - JamesAlexander - 10-14-2023

Hi there!

I'm actually a long time veteran with a new name (aren't we all?) Smile I have a general question concerning web development and QBJS.

Although it seems interesting enough with ElectronJS, I am primarily interested in embedding an HTML5 module for Chrome and Firefox to implement my web sites as standalone projects. About 10 or 15 years ago, QB64 was just a standalone compiler, but it has grown significantly over the past 10 years, and with the QBJS project, it's really starting to "PEEK" my interest.  Big Grin

Is there a compiler I can use to where I can generate QB64 code and save the output as a package, resource, or folder where I can just plug it on and go?

I will be using an old version of Dreamweaver for this, and basically link to my pages in an old-school fashion.

I'm relatively out of the do/loop for this, though.

Last time I generated a project in was 2012 and I was using NSBASIC. I've heard a few years ago that SpiderBasic can do this too, but haven't checked it out yet.

Is there a wiki for this or a simple framework in a cookbook fashion where I can just automatically write ny QB64 code, and instead of compiling it, I can automatically export it to Javascript as I would NSBASIC?

Thanks in advance!
James


RE: QBJS - General Question for Web Development - dbox - 10-15-2023

Hi James,

The easiest way to export your project to HTML/Javascript is through the QBJS IDE.  If you click the share/export button and select either auto or play mode you will see an Export button.  Clicking this will download a zip of the compiled JS and html.

Let me know if this gets you what you are looking for.


RE: QBJS - General Question for Web Development - JamesAlexander - 10-17-2023

Quote:Hi James,

The easiest way to export your project to HTML/Javascript is through the QBJS IDE.  If you click the share/export button and select either auto or play mode you will see an Export button.  Clicking this will download a zip of the compiled JS and html.

Let me know if this gets you what you are looking for.
Wow! I'm not easily impressed, but for the record: I'm impressed! Exclamation Heart

Very straight-forward, and this is exactly what I needed, I did not even need the Wiki because I can do QB64 and just make a framework around a page and do everything that is needed.

Although the other Basics may be of use for if you are programatically trying to enhance, style, or add features to a primary web page (which nsbasic/spderbasic/etc is good for), the reality is that it is only for cosmetic improvements, and 98% of everything you need is now contained by javascript for a web app. All you need to do is export the framework, add it as a link on your site, and go!

This is exactly what I wanted it to do, and it is all falling into place beautifully.

QB64 and QBJS combined is exactly what I was looking for -- and waiting for -- for 10+ years.

I just didn't realize how easy you've made everything until now!

Thank you Dbox, and everyone contributing to this! Smile


RE: QBJS - General Question for Web Development - dbox - 10-17-2023

Awesome, well let me know if you have any suggestions or feedback.  QBJS is definitely still a work in progress.  If you do need additional documentation the following links might be useful:

QBasic Language Support
An outline of the level of QB/QB64 compatibility as well as any differences.

Supported Keywords
A list of all of the QB45 and QB64 keywords that are currently supported by QBJS as well as a few extended libraries that are unique to QBJS.