ambassador at fourthworld.com
Wed May 6 12:50:31 EDT 2020
Erik Beugelaar wrote:
> It would be great if a lesson comes available how to create streaming
> apps with LC.
Thank you for your interest. I'll do that, but it'll have to wait until
I finish some client projects first.
In the meantime, the beauty of this approach is its simplicity. Like
anything else it can be made complicated, but it boils down to:
1. Make a slim standalone that contains just a splash screen and
only enough code to download a stack file from your server
(or report a network error if it can't). "Load URL" is a good
choice for larger stacks because it lets you display a progress
indicator asynchronously, but for smaller stack files simply
"go stack <url>" will work just fine.
2. Put a stack file with the guts of your app on a server.
3. Run your standalone.
It gets even better when you use LC's built-in gZip compression to
reduce download times.
And better still, you can also cache what you download to support
offline modes where practical. Using a small text file on the server
containing the build number of the stack file there makes it quick and
easy to check if a fresh copy of the stack file needs to be downloaded,
otherwise it opens the cached copy.
The beauty of this is that it's neither new nor exotic. We've been
doing it since MetaCard first made a one-liner out of HTTP GET with
libURL back in the '90s.
For a fairly simple example, see LiveNet (in the IDE, Development ->
Plugins -> GoLiveNet). That small plugin downloads a stack file that
includes fields and other containers that are then populated with data
it pulls from multiple sources, exemplifying both the ease of
downloading stack files and (hopefully) serving as an inspiration for
Fourth World Systems
Mark Wieder wrote:
On 5/5/20 4:47 PM, Trevor DeVore via use-livecode wrote:
>> I don't use HTML deployment myself, but thought I would mention
there has been some emscripten activity in GitHub lately. Looks like >>
WebAssembly (WASM) support is being added.
> Yeah, I saw the github posts come flying by, and that's a promising >
feature, but it doesn't address the limitations and broken features of >
the current html implementation.
In my own mind I phrase that differently. Whether it's gentler or more
stark is up to the reader, but for me it's more:
...it can't address the fundamental differences between desktop
and web architectures, and the limitations inherent in Emscripten.
Emscripten is good for what it was designed to do. But look deeply at LC,
consider what Emscripten is, and the more time you spend pondering it the
clearer it becomes how difficult it is to put a desktop app's square peg
into a browser hole.
"Difficult" is maybe unfairly optimistic. And "impossible" never applies to
software. Perhaps "prohibitively expensive" is fair.
> Also, it remains to be seen how much bloat this adds to deployed web
Putting an entire scripting engine and object model into a browser
application that already has its own scripting engine and object model
cannot achieve size, performance, and integration features as well as a
If you truly need a browser as your only deployment option, it's kinda
hard to argue against going with the grain of the browser.
But most apps that might make good candidates for LC's HTML export have
characteristics that lend themselves very well to not doing HTML at all,
instead using a one-time download of an LC standalone which then
downloads and runs stack files (a practice that, in the absence of a
more common label, I like to call "streaming apps").
Fits most of the same uses cases, but provides a more focused user
experience that integrates with the OS as only a native app can.
Extra bonus points that they're cheap and easy to build in LC, fast
cheaper to deliver sophisticated works than even web-native implementations.
For the sorts of vertical audiences where LC's HTML would seem
interesting, I believe simply streaming stacks in a standalone is the
most underappreciated and underutilized opportunity in our community.
MetaCard promoted the idea heavily with some nice example downloads, but
in all these years only a few of us make streaming apps regularly.
If you're waiting for LC's HTML to get good, let's discuss streaming
apps for those where they might be a great solution. We really don't
need to wait for anything to have the benefits of net-distributed apps.
You can have it all today, with the LC you know and love already.
Fourth World Systems
More information about the use-livecode