SWEdeAndy wrote: Tue Jan 24, 2023 12:07 pm
aetaylorBUSBnWt wrote: Tue Jan 24, 2023 4:47 am
Any chance this stack you have works in 9.6.8?
Nope, no chance, I'm afraid. The html5 output of LC9 is a dead end.
You'll need LC10 to produce a useful html5 standalone (it uses Web Assembly (WASM), unlike whatever older tech LC9 uses).
LC9 transpiles its engine to JavaScript, which is certainly mature. But given its role as the most-used scripting engine on the planet, with the most powerful tech companies pouring millions into enhancing it daily, I'd hesitate to call it "old".
Moreover, while WASM enhancement is promising in some areas, I would caution against perceiving it as a universal panacea.
In this case of responding to window resizing, given that responsive design has been the norm among web devs throughout the decade LC has been working on their web export, this would seem more of a messaging issue than the isolated performance enhancement the WASM transpilation aims for.
That messaging enhancement does seem to be a focus for the team's v10 efforts, so yes, v10 will eventually bring LC web apps on par with web-native apps for responsive layouts, in ways the more limited messaging in v9 doesn't support.
I bring up the limited role of WASM here because from time to time we see posts where it's presented as a solution broader than it provides, and it's in everyone's interest to refine expectations to be meetable.
The perceived scope of WASM as a general overarching solution is understandable, as we've seen what compiled languages can do on the desktop.
But in all fairness, much of the feature richness of compiled apps is a function of their libraries and other tooling, where compilation really brings just performance.
With WASM, we can expect much of what LC needs to do as a rich-media platform to remain in JavaScript. The WASM spec prioritizes portability over browser-specific integration, so for example it offers no direct way to manipulate page elements like layout and UI controls, requiring JS as the intermediary for that.
And even where performance can be factored to isolation suitable for handling with WASM, observable gains depend on many factors beyond just script interpretation.
Even in desktop LC, performance is more often bound to the rendering/compositing requirements of the engine, in ways not even true machine-code execution of script interpretation can address. At best, in the subset of cases where WASM can help, as a portable tokenization it's always at least one step removed from true machine-code performance.
The Wikipedia page on WASM is a good intro, richly sourced with high quality links worth following:
https://en.m.wikipedia.org/wiki/WebAssembly
Among those links is this tale somewhat similar to LC's usage, outlining the challenges encountered when expecting the benefits of WASM to be more pervasive than discovered in practice:
https://zaplib.com/docs/blog_post_mortem.html
In short:
As long as LC's web export remains bound to using Emscripten to transpile the engine for emulating native controls and behaviors within the HTML canvas object, the move to adopt WASM to enhance some of that is a good one.
Just keep in mind that the "older technology" of JavaScript is likely to continue to play a strong role. And since JS is the most-used scripting engine, and that it's well maintained by well-funded teams, that's also a good thing.
As for the task at hand which started this thread:
If this is a form-based UI that needs to integrate with an e-commerce backend, as much fun as LC is, we see things like that across the web using a wide range of alternatives, some requiring no code at all.
With some flexibility in the design of the layout, you may find that the WordPress ecosystem offers a good set of NoCode building blocks for that, as LiveCode Ltd uses to drive their e-commerce solutions. My personal favorite these days is Drupal, which I'm using to rebuild LiveCodeJournal.com, arguably offering more fine-grained tooling, at the cost of a higher initial learning curve.
But if there's no business need which would benefit from immediate implementation, LC is always a good time and v10 may be worth waiting for on this.