Entire App In HTML

Post Reply
the_wesley_watkins
Posts: 42
Joined: Wed Jul 29, 2015 3:53 pm
My devices: Ipad
Iphone

Entire App In HTML

Post 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


User avatar
Mr. Kibernetik
Site Admin
Posts: 4787
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Entire App In HTML

Post 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.

User avatar
GeorgeMcGinn
Posts: 435
Joined: Sat Sep 10, 2016 6:37 am
My devices: IPad Pro 10.5in
IMac
Linux i386
Windows 7 & 10
Location: Venice, FL
Flag: United States of America
Contact:

Re: Entire App In HTML

Post 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.
George McGinn
Computer Scientist/Cosmologist/Writer/Photographer
Member: IEEE, IEEE Computer Society
IEEE Sensors Council & IoT Technical Community
American Association for the Advancement of Science (AAAS)

Post Reply