HTMLRenderer vs CEFSharp

General APL language issues

Re: HTMLRenderer vs CEFSharp

Postby paulmansour on Fri May 21, 2021 4:25 pm

StefanoLanzavecchia wrote: But if this is the case, I guess you'd be better off sending the data along with the method invocation that causes the refresh of the GUI.


This is kind of what I'm doing right now - in the beginnings of what maybe a light-weight framework. In response to a fetch (POST) from the browser, triggered by an onClick on some element, say, I return a JSON array of one or more id and innerHTML pairs that is then set by the browser. I assume I could enhance this to have a particular update function called as well. I'm wondering how far one can get with such a simple framework.
paulmansour
 
Posts: 418
Joined: Fri Oct 03, 2008 4:14 pm

Re: HTMLRenderer vs CEFSharp

Postby paulmansour on Fri May 21, 2021 4:51 pm

StefanoLanzavecchia wrote: v18.0 introduces a shortcut....


Oh I totally missed the ExecuteJaveScript method - don't how, its right there in the user guide. This was something that I thought would still be on the to-do list. With this in hand, yes, I can do a lot!
paulmansour
 
Posts: 418
Joined: Fri Oct 03, 2008 4:14 pm

Re: HTMLRenderer vs CEFSharp

Postby StefanoLanzavecchia on Fri May 21, 2021 4:52 pm

PGilbert wrote:If the method ExecuteJavaScript could return the answer from JS a lot could be done, like getting/setting the properties of a DOM object.


Right. When I asked Dyalog to implement an ExecuteJavascript I was told that if I could content myself with it being "fire and forget" it would be relatively easy whereas fetching the result would be harder. So I contented myself with that and once I move my code to the HTMLRenderer (from IE exercised via COM) I'll keep on having the app sending me data through POST requests, as cumbersome as this might look. Fortunately enough, at the moment I don't need direct access to the DOM (Document.InnerHtml is basically all I need as far as getting at the DOM and that's covered by the HTML property of the HTMLRenderer object) and I don't need to peek at global Javascript objects from Dyalog. Just like Paul M., my app sends POST request to the Dyalog side with interesting data when it needs to.
This does not mean that if there was enough momentum and Dyalog decided to implement a way to get the result of an executed JS expression I would complain :-)
And it may also be that one day I could be a sponsor if it became harder to live without the feature.
User avatar
StefanoLanzavecchia
 
Posts: 109
Joined: Fri Oct 03, 2008 9:37 am

Re: HTMLRenderer vs CEFSharp

Postby paulmansour on Fri May 21, 2021 4:52 pm

Thank you Pierre and Stefano for all the excellent and useful comments.
paulmansour
 
Posts: 418
Joined: Fri Oct 03, 2008 4:14 pm

Re: HTMLRenderer vs CEFSharp

Postby StefanoLanzavecchia on Fri May 21, 2021 4:56 pm

paulmansour wrote:Thank you Pierre and Stefano for all the excellent and useful comments.


Actually, thank you Paul! Very often I prefer to hide in my bubble and don't remember how useful it is to compare approaches, talk about experiences and, in general, share knowledge.
Last edited by StefanoLanzavecchia on Fri May 21, 2021 5:09 pm, edited 1 time in total.
User avatar
StefanoLanzavecchia
 
Posts: 109
Joined: Fri Oct 03, 2008 9:37 am

Re: HTMLRenderer vs CEFSharp

Postby PGilbert on Fri May 21, 2021 5:06 pm

I will start some separate threads on the forum to share our code that will show what we do to exchange/parse a JSON variable between APL/JS and validate a numeric input.
User avatar
PGilbert
 
Posts: 436
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: HTMLRenderer vs CEFSharp

Postby PGilbert on Sun May 23, 2021 6:11 pm

Paul if you start CEFSharp using a dll and passing the form object to APL you should be able to access all the methods of the form and of CEFSharp. This is what we are doing but with another product.
User avatar
PGilbert
 
Posts: 436
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: HTMLRenderer vs CEFSharp

Postby paulmansour on Sat Jun 19, 2021 3:00 pm

Pierre,

Rereading this thread, I noted this that I had glossed over before:

DotNetBrowser worked well with Dyalog with the release we tried at the beginning, but they upgraded the way to interface with their dll's that is no more compatible with Dyalog and we need a companion dll now to start the application.


Can you expand on this? Where did you get the companion dll? Did you have to write it? How did you know what the problem actually was?

Paul
paulmansour
 
Posts: 418
Joined: Fri Oct 03, 2008 4:14 pm

Re: HTMLRenderer vs CEFSharp

Postby PGilbert on Mon Jun 21, 2021 2:11 am

Hello Paul, here is my comments:

Where did you get the companion dll?


We made it with VS but the C# code came from DotNetBrowser support since we are not good with C#.

How did you know what the problem actually was?


The problem to solve was to set an APL function as the handler of an Http interception. At the beginning, it was a simple quadOR of the Apl function but now we have to make a delegate in APL and pass it to the companion dll. The basic problem is that their C# is using new C# syntax not supported by the Dyalog .Net bridge.

Since then we became more accustomed to C#/VS and now the dll is starting DotNetBrowser and returning the form with the DotNetBrowser in it ready to go.
User avatar
PGilbert
 
Posts: 436
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: HTMLRenderer vs CEFSharp

Postby paulmansour on Mon Jun 21, 2021 11:58 am

So out of the box, the DotNetBrowser would not even work for me? Correct?
paulmansour
 
Posts: 418
Joined: Fri Oct 03, 2008 4:14 pm

PreviousNext

Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest