On Sat, May 9, 2020 at 5:19 AM Shaping <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="KxFpgS7gBQAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">sha...@...> wrote:Can we change/augment Iliad to use Smalltalk in the browser, as the recent PharoJS video shows?
No, Iliad is for AJAX applications, while PharoJS and Amber are for single page applications (SPAs) and Caffeine and video of a minimal Pharo image running via SquakJS in a browser that you posted earlier [1] are running comparable to a Java or Flash applet - they download a Smalltalk image an run that. Three different architectures with different properties.Can you break that down? What are the problems? The demo in the video I posted recently seemed very interesting if one’s aim is to code and debug the entire web app in Smalltalk.
Indeed. Try Caffeine, I think it is the most advanced & stable system for this. Then you will be doing applets, not SPAs.
PharoJS (for SPAs) is unstable in that it the bridge that it uses to connect Pharo and the JS runtime breaks when too many JS events are fired, so you have to use the JS console to interact with your code in the browser instead. This rules out (reliable) TDD and coding in the Pharo debugger.
Also, many Pharo classes are transpiled to equivalent classes in JS
which behave differently or miss methods, so you get different behavior in JS. Eg Dictionary can only handle strings as keys. This means you cannot use Pharo libraries in JS, eg STON.
You can use JS libs but obviously you cannot use them on the Pharo side and use the Pharo debugger.
I have found ways to work with this using mocks in Pharo for DOM and other browser objects and transpile code to JS (this part is reliable),
and by using the Firefox Scratchpad (now removed from Firefox, but you can still use the console in multiline mode) to interact with the transpiled js code directly. I am OK with seeing and occasionally debugging the JS code as long as I can maintain my code base in Pharo.
But in the end there are many bugs and many incomplete parts which are not really fixed for years before new features are introduced. Iliad and Amber are stable, and Caffeine seems stable.HTHSiemen1: <a href="http://www.google.com/url?q=http%3A%2F%2Fforum.world.st%2FNew-type-of-web-application-using-HTML-CSS-and-Smalltalk-td5116051.html&sa=D&sntz=1&usg=AFQjCNFp8ehDPzcO5nynFESoQZA8GZfRGw" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fforum.world.st%2FNew-type-of-web-application-using-HTML-CSS-and-Smalltalk-td5116051.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFp8ehDPzcO5nynFESoQZA8GZfRGw';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fforum.world.st%2FNew-type-of-web-application-using-HTML-CSS-and-Smalltalk-td5116051.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFp8ehDPzcO5nynFESoQZA8GZfRGw';return true;">http://forum.world.st/New-type-of-web-application-using- HTML-CSS-and-Smalltalk- td5116051.html)
Free forum by Nabble | Edit this page |