Login  Register

Re: value of Iliad

Posted by Shaping1 on May 10, 2020; 11:31pm
URL: https://forum.world.st/value-of-Iliad-tp5116254p5116410.html



On Saturday, May 9, 2020 at 5:37:20 AM UTC-5, Siemen Baader wrote:


On Sat, May 9, 2020 at 5:19 AM Shaping <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="KxFpgS7gBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;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.

What are the inherent limitations of an applet?  What deficiencies cannot be changed?  I prefer an SPA or AJAX-based architecture. 


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.

Are you saying that the JS is emitting events back to the SmalltalkJS VM/image at a rate it cannot keep up with?


Also, many Pharo classes are transpiled to equivalent classes in JS

Is this what is happening in the video linked below?


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.

Right I was thinking of running STON from Smalltalk only.

 
You can use JS libs but obviously you cannot use them on the Pharo side and use the Pharo debugger.

Can we use Smalltalk to include the needed scripts in the HTML and receive registered callbacks from the running JS?


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),


As long as JS is needed we will need to transpile.  We will need to do this also with a Wasm target. 


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.

I'm okay with that to in the short term. 


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.

HTH
Siemen

1: <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&amp;sa=D&amp;sntz=1&amp;usg=AFQjCNFp8ehDPzcO5nynFESoQZA8GZfRGw" target="_blank" rel="nofollow" onmousedown="this.href=&#39;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&#39;;return true;" onclick="this.href=&#39;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&#39;;return true;">http://forum.world.st/New-type-of-web-application-using-HTML-CSS-and-Smalltalk-td5116051.html)


I don't understand why the PharoJS architecuture is being pursued by anyone if Smalltalk-level debugging is not possible.  Erik Stel, the author, in the link above mentions debugging in Smalltalk.  How would this be done?


Shaping

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/iliad/407aed53-d5c7-4360-8677-3a8fcf50cb42%40googlegroups.com.