Page 1 of 1

Entire App In HTML

Posted: Tue Jun 20, 2017 7:09 pm
by the_wesley_watkins
So I have been working on a learning app for the past 6 months...

I initially was using a lot of the smart basic programming language but there were some things I couldn't get to work exactly the way I needed them to (fields, etc.). So, instead I decided to create the entire app in HTML, CSS, and Javascript and the only thing I am using sB for is to display the browser.

Is this a good idea? Could anything go wrong with this? I'm almost done with the app and it seems to be working just fine. But I was just wondering if there was anything that could possibly go wrong with me writing the whole thing in HTML and only using sB as a browser to display the HTML files.

Also, should I include a SLOWDOWN in the loop for my app? I mean, the code on the sB side of things is actually very simple. I just load up the browser and then I enter any empty loop. Kinda like this:

Code: Select all

SET ORIENTATION PORTRAIT
SET TOOLBAR OFF
GET SCREEN SIZE maxx, maxy

BROWSER 0 AT 0,0 SIZE maxx,maxy
BROWSER 0 URL start.html

loop:

goto loop


Re: Entire App In HTML

Posted: Tue Jun 20, 2017 7:12 pm
by Mr. Kibernetik
Yes, it is a good idea to SLOWDOWN this empty loop.

Also it could be a good idea to use javascript/html to make just a web apps.

Re: Entire App In HTML

Posted: Sun Aug 13, 2017 11:04 am
by GeorgeMcGinn
You can also check the forum post on running JavaScript inside a SmartBASIC program.

viewtopic.php?f=20&t=1619&hilit=P5

This extensive post shows how to run P5.JS from a SmartBASIC program.

Hope this helps.