On Fri, 14 Jun 2019 at 15:46, Arie van Wingerden <xapwing@gmail.com> wrote:
Hi,
for a project I need this kind of program:
1. client side only 2. must be able to programmatically show a web browser in a window (Morphic??); only local content will be shown 3. must also be able to show other windows, containing simple games
Now, I guess that 1 and 3 are possible straight away, but I am unsure about option 2.
I found out that there are a few ways to do it:
- using C#, which has: - standard web browser control out-of-the-box - third-party open source chromium web browser component - using Java, which (afaict) is a coding effort, but possible anyway
That said, since I'd very much like to start using Pharo for more tasks (just starting) I wonder if Pharo has something to offer in this case.
The easier path is probably to connect to Chrome externally... http://forum.world.st/Chrome-DevTools-Protocol-and-Pharo-td4947589.html http://forum.world.st/Pharo-Chrome-was-Soup-bug-fix-td5020666.html http://forum.world.st/Web-scrapping-with-Pharo-Chrome-td5066882.html A heavier path is integrating Chromium via FFI. This is probably the most feasible path to a fully functioning browser. Many web browsers are a wrappers around Chromium, letting it do all the heavy lifting. https://en.wikipedia.org/wiki/Chromium_(web_browser)#Browsers_based_on_Chrom... Pharo could do the same thing. Even Microsoft is doing this... https://www.theverge.com/2018/12/6/18128648/microsoft-edge-chrome-chromium-b... I've previously linked a small sub-part of Chromium with Pharo. https://blog.openinworld.com/2017/11/pharo-pdf-part-1/
In C# I can do this literally in a few hours, given the fact that ready made components exist.
Depends on how you can balance your particular goals and time constraints, wrt the effort of getting a connection versus the effort of processing the data you get out of it. https://imgs.xkcd.com/comics/is_it_worth_the_time.png cheers -ben