FR - Deploy "Web Apps" html5

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

sumpm1
Posts: 19
Joined: Tue May 21, 2013 2:35 am

FR - Deploy "Web Apps" html5

Post by sumpm1 » Thu May 23, 2013 7:05 pm

It would be nice to be able to export to html5. I can create an executable for Windows, Mac, or Linux. But if I want to make just one app, and it could just run in a web site, I'd rather just have a web app.

Klaus
Posts: 11009
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: FR - Deploy "Web Apps" html5

Post by Klaus » Thu May 23, 2013 7:27 pm

Hi sumpm1,

well, HTML5 export is not (yet?) supported and might take while :-)

You could create a "generic" standalone that loads stacks from a server***, not the same, but anyway ;-)
*** A typical Livecode one-liner:
...
go stack "htp://your.server.com/subfolder/cool_stack666.rev"
...

Best

Klaus

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6674
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: FR - Deploy "Web Apps" html5

Post by FourthWorld » Thu May 23, 2013 7:31 pm

HTML5 governs layout. Interactivity is handled through JavaScript, and since JS is the only language built into browsers it saves us the time of trying to decide which language to use, since we have no choice in the matter. :)

That said, since HTML/CSS is all ultimately just plain text, there are a great many ways one can use LiveCode to assist in the development of web sites. From the LiveCode Server engine to static pages generated locally, I've found LiveCode very helpful for Web work.

What sort of "Web Apps" did you have in mind?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

sumpm1
Posts: 19
Joined: Tue May 21, 2013 2:35 am

Re: FR - Deploy "Web Apps" html5

Post by sumpm1 » Thu May 23, 2013 8:35 pm

I am a teacher. I have a love for software, and have never been able to write my own =(. I have always looked for software that I could use to manage my class. Timers, student selectors, soundboards, seating chart software, gradebook software, student reward software, goal tracking software, things of this nature.

So mostly lightweight software that mostly deals with text and data, not so much graphics.

Now that I have found LiveCode, I have been able to write one of these programs, and I have tested it on Windows and Android (I don't have a Mac.)

But to have people download my tiny functional app and run it in a windowed environment... It seems like overkill for something so simple.

If I could just give them a url, and they get to use my app right there in the linked site, right in the browser... It would seem more direct, more impressive, more likely to get used, more likely to be shared, more likely to get popular, more likely to gather interest...






But I am a total noob to LiveCode. If there is some way to run a stack in a browser, I will take a look at that.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6674
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: FR - Deploy "Web Apps" html5

Post by FourthWorld » Thu May 23, 2013 8:53 pm

sumpm1 wrote:But I am a total noob to LiveCode. If there is some way to run a stack in a browser, I will take a look at that.
The only way to get a browser to run a LiveCode stack file would be to put the engine into the browser. RunRev started down that road a couple years ago, making a browser plugin, but it wasn't long before inconsistencies among the various browser plugin interfaces and the general movement away from plugins killed the project off.

That said, I would encourage you to read Klaus' post above a second time. He's onto something very valuable there.

Whether as a browser plugin or a standalone, either way requires the user to do a one-time install of the LiveCode engine.

But it's only a one-time install. Once on the user's machine, it can download stacks over the wire with the one-liner Klaus posted. You can update your app at any time, and with a little care in how it's set up you can do it easily for every platform (except iOS, since Apple's policies prohibit downloading executable code).

There's an interesting project called ReactorLab which does this for college students learning about chemical reactions. The author, Richard Herz, wrote an article about it for LiveCode Journal:
http://livecodejournal.com/features/reactorlab.html

I've built solutions like this myself, and have one in daily use at a school, as does Dan Friedman and others.

You could think of your standalone as a sort of custom browser, but far easier to build for and far more powerful: with a standalone you're no longer restrained by the design of a browser (what exactly happens when the user clicks the Back button?), you can have your own keyboard shortcuts, and if you need an offline mode you can do that, and if you need security you can use the engine's secureMode property to make it locked up tighter than any browser.

So many options await you with a standalone downloading stacks over the 'net....
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

sumpm1
Posts: 19
Joined: Tue May 21, 2013 2:35 am

Re: FR - Deploy "Web Apps" html5

Post by sumpm1 » Wed May 29, 2013 12:23 am

So many options await you with a standalone downloading stacks over the 'net....
Hey FourthWorld and Klaus. I am not at a point where I can do this yet, but accessing stacks from a server seems really interesting. It seems like it would have the following benefits; tell me if I am incorrect on any of them:

1. The program could be updated by the user without having to download or run external executables.
2. The program could update itself as soon as it finds an internet connection.
3. Bandwidth. Livecode stacks seem to be very small in size. So accessing a stack on the internet seems to be an efficient use of internet bandwidth. Is this correct?
4. Maintenance. As the developer, you could just host your stacks for the program. If you make changes to the program, you just replace a stack on the server. No need to host and make links to "the latest version" of your built .exe's or .apk's...

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6674
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: FR - Deploy "Web Apps" html5

Post by FourthWorld » Wed May 29, 2013 3:39 am

The answer to all our questions is more or less "yes".

If it helps, in the LiveCode IDE check out Development->Plugins->GoRevNet.

The version of RevNet that's up now (it's being overhauled soon) isn't much, but it does provide an example of stacks downloaded over the wire.

Once you start playing with downloaded stacks I suspect you'll have a very good time.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Richard K. Herz
Posts: 20
Joined: Sun Apr 14, 2013 6:38 pm
Contact:

Re: FR - Deploy "Web Apps" html5

Post by Richard K. Herz » Wed Aug 21, 2013 9:21 pm

Richard Gaskin, thanks for the mention of reactorlab. I noticed your comment about secureMode and gave it a try. Dictionary says it should still allow getting http urls with URL commands, e.g., load url. But I find it NOT allowing load url for http url's. Are you able to load url with http url's with secure mode true? Or with other url command? Thanks. Rich Herz
Rich Herz
LiveCode work at ReactorLab.net

edgore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

Re: FR - Deploy "Web Apps" html5

Post by edgore » Thu Aug 22, 2013 5:51 pm

I would also encourage you to look into the server engine as well - you can do some amazing things using the livecode engine on the backend, processing livecode scripts, and outputting HTML to the browser. This could work especially well if you are mostly working with text, as opposed to graphics. It would require learning some HTML for your front end browser stuff though - but it's amazing what you can figure out pretty quickly and use to create some very powerful applications.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6674
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: FR - Deploy "Web Apps" html5

Post by FourthWorld » Thu Aug 22, 2013 7:45 pm

Richard K. Herz wrote:Richard Gaskin, thanks for the mention of reactorlab. I noticed your comment about secureMode and gave it a try. Dictionary says it should still allow getting http urls with URL commands, e.g., load url. But I find it NOT allowing load url for http url's. Are you able to load url with http url's with secure mode true? Or with other url command? Thanks. Rich Herz
Verified - this fails with secureMode, with nothing in "the result":

Code: Select all

load url "http://www.fourthworld.com" with message "GotIt"
answer "Result="& the result
Interestingly, this works with secureMode:

Code: Select all

put url "http://www.fourthworld.com" into fld 1
In my case the two are equivalent, since my GotIt handler was just displaying the data in the same field. In fact, I rarely use "load" at all; "put url..." does what I need.

Just the same, I think this is a bug and perhaps I'll report it. Can anyone here think of a reason it might be a design decision to disallow "load" when secureMode is true but still allow "put url..."? Like Mr. Herz, I would have expected both to work.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Richard K. Herz
Posts: 20
Joined: Sun Apr 14, 2013 6:38 pm
Contact:

Re: FR - Deploy "Web Apps" html5

Post by Richard K. Herz » Fri Aug 23, 2013 12:21 am

Richard,

I filed bug 11114 for secureMode having trouble getting web data and it was confirmed by RunRev. Please comment on that bug with your observations.

However, things are stranger than I thought when filing bug. Latest tests shows that (1) "load url" fails the first time after setting secureMode to true, (2) "put url" into a field, msg, or variable works the first time after setting secureMode to true but not second or later attempts.

I am interested in using secureMode to download and open 3rd party stacks while retaining ability to send/receive over Internet but not be able to access client disk. Sort of like an uncurated RevNet.

Rich
Rich Herz
LiveCode work at ReactorLab.net

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6674
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: FR - Deploy "Web Apps" html5

Post by FourthWorld » Fri Aug 23, 2013 12:33 am

Looks like a re-think is needed on how libURL interacts with secureMode. Thanks for the input.

How critical is secureMode for your app? I can see where it might be nice, but as spec'd its far more stringent than even a web browser, and since it's not based on any standard but is instead just a LiveCode thing, it's hard to imagine it would be a strong selling point with stakeholders - that is, anyone who trust you enough to say that you're using secureMode would probably trust a standalone you've made that doesn't use secureMode but still limits its access to the local machine.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Richard K. Herz
Posts: 20
Joined: Sun Apr 14, 2013 6:38 pm
Contact:

Re: FR - Deploy "Web Apps" html5

Post by Richard K. Herz » Fri Aug 23, 2013 4:57 am

My interest relates to thinking about open-source LiveCode vs. HTML5/Javascript for delivering interactive simulations for education. Seems like LC's distinguishing feature is that it would give nonprogrammer types - teachers and students - some hope to develop their own simulations. I'm thinking in terms of something like RevNet as a standalone but purposed toward a certain educational area. Like ReactorLab but allowing submission of stacks by others.The current version of RevNet allows submission of links to stacks and instant availability. I had thought it was curated by you - scanned for problems - but a check tonight shows otherwise.

What is your philosophy on this? What if someone (some middle school student might be so inclined) posts a malicious stack without being scanned or running in a sandbox or secureMode? I guess the app supplier hopes the user blames the link supplier and not the app supplier...?

I was taking a look at secureMode because it seemed a lot easier than setting sandbox options when building LC apps on multiple platforms.

Thanks for your thoughts on this.
Rich Herz
LiveCode work at ReactorLab.net

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6674
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: FR - Deploy "Web Apps" html5

Post by FourthWorld » Fri Aug 23, 2013 5:53 am

Richard K. Herz wrote:My interest relates to thinking about open-source LiveCode vs. HTML5/Javascript for delivering interactive simulations for education. Seems like LC's distinguishing feature is that it would give nonprogrammer types - teachers and students - some hope to develop their own simulations. I'm thinking in terms of something like RevNet as a standalone but purposed toward a certain educational area. Like ReactorLab but allowing submission of stacks by others.The current version of RevNet allows submission of links to stacks and instant availability. I had thought it was curated by you - scanned for problems - but a check tonight shows otherwise.
Thanks for the reminder. As you can see from the new look of the GoRevNet plugin, there's a new RevNet coming soon to my servers, which won't allow new file listings. I'd disabled that some time ago but apparently I missed that new file when I migrated the server to a new machine a while back. If you quit LC and log in again you should see the latest RevNet stack there, which has new file notifications disabled.

This is a deep subject, and I don't believe there's a right answer. Back when we first put RevNet together, we discussed this on the list and decided that all RevNet does is act as a sort of custom browser, pointing to files elsewhere on the Web. In this regard, folks should exercise the same caution there as they would anything else they download over the Web - if it's from a trusted source you should feel safer than from someone you don't know.

But since then RevOnline has pretty much taken over for stack distribution anyway, so we haven't seen anyone bother to add files to RevNet in a long time, not since RevOnline premiered. In fact, most of the stuff in RevNet's "Stacks" section is pretty old- all that will be replaced with new stuff in the new RevNet version, but more on that later.

To address your question, in this modern era where the range of criminal exploits keep expanding daily, we all think about security differently than we used to a decade ago.

While I have plans for expanded services in RevNet, and other similar tools, going forward it'll be a curated set of tools only from people I know.

For a setup like yours, you may have options to limit it to downloading only from specific domains, or even limiting it to specific URLs.

But even there it depends on how crazy you want to go with it. More secure would be to have some sort of package signing with a private/public key combo like the app stores use, but we have no mechanism for that in LC and personally it seems like a lot of work for files that may also be available on the Web anyway.

The trick is to find the best balance for the task at hand. As we saw last week, even Apple's app store can review and approve an app with dangerous permissions. How far should we go with such pursuits?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Richard K. Herz
Posts: 20
Joined: Sun Apr 14, 2013 6:38 pm
Contact:

Re: FR - Deploy "Web Apps" html5

Post by Richard K. Herz » Fri Aug 23, 2013 2:49 pm

Richard, Thanks for your thoughts on this. By the way, RevNet opens OK on LC 6.1.1-rc-2 but briefly opens then closes (not visible nor in the stacks) right after opening on LC Community 6.1.1-rc-2 (Mac). Do you see this too?
Rich Herz
LiveCode work at ReactorLab.net

Post Reply

Return to “Feature Requests”