Wednesday, July 26, 2023

Re: GWT RPC call recognized as a Java Method Injection by Fortiweb

Wrong thread. Sorry. Please ignore.

On Wed, 26 Jul 2023, 20:26 Vassilis Virvilis, <vasvir2@gmail.com> wrote:
Super sourcing is a hackish but very powerful tool.
I have used it to override some gwt widgets in order to expose or change some private methods.

Is this feature so difficult to be implemented? I mean at that point J2CL looked like a cool upgrade when Google was standing behind GWT. But since it took forever to be released as part of GWT one may wonder if it is really needed at this point.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/CAKbOjExhogkAdxekOyw8GajibTHy6PBzto3BhS8SYY03jd4_dQ%40mail.gmail.com.

Re: Partial super source? Possible?

I was specifically answering the J2CL part: you cannot use shadowing with J2CL, only with GWT.
More accurately, J2CL itself is rather low-level and will translate any file you give it; the "issue" here is rather the Closure Compiler (IIRC), that will error if it finds more than one file declaring the same Closure module (each Java class is translated to a Closure module).
You should however (IIRC and IIUC) be able to patch the Java Runtime Emulation (JRE) used by J2CL, similar to how you could patch it in GWT by using your own "fork" of the gwt-user.jar.

TL;DR: try hard to avoid using any class or method that's not part of the "built-in" emulation library. Refactor code to use an intermediate class (e.g. MyStringFormatter.format()) that you can then super-source. If compiling a third-party library, it might not be that bad of an idea to patch it (fork it) with that kind of refactoring.

I'll let Colin confirm though, as I've been away from J2CL for some time now.

On Wednesday, July 26, 2023 at 1:09:41 PM UTC+2 Bruno Salmon wrote:
Thanks Thomas. By "shadow" I was actually quoting you when you said: 

you cannot "augment" it, but you can "shadow" it by providing your own super-source version of java.lang.String

In my previous reply, I was saying that I'm happy with this solution for my GWT app (whatever you call this method "shadow" or something else).

But my concern is now with J2CL (as I plan to move my GWT app to J2CL in the future).
I would like to know if this solution will also work with J2CL.
i.e. will I be able to provide my own implementation of String.format() if not emulated by J2CL?

On Tuesday, 25 July 2023 at 15:20:19 UTC+1 Thomas Broyer wrote:
On Tuesday, July 25, 2023 at 2:26:14 PM UTC+2 Bruno Salmon wrote:
The shadow super-source should work in my case, thank you.

 If later I want to move from GWT to J2CL, will I have a similar feature (ex: providing my own implementation of String.format() if not emulated) ?

IIRC, no: each source file must only appear once, so you cannot use shadowing.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/a363da30-f10b-4c47-8b37-bb5761958e78n%40googlegroups.com.

Re: GWT RPC call recognized as a Java Method Injection by Fortiweb

Super sourcing is a hackish but very powerful tool.
I have used it to override some gwt widgets in order to expose or change some private methods.

Is this feature so difficult to be implemented? I mean at that point J2CL looked like a cool upgrade when Google was standing behind GWT. But since it took forever to be released as part of GWT one may wonder if it is really needed at this point.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/CAKbOjExXCB6kGyFB6%3D9-iTHiRwgT1azo9Zqg_kJEa3DVwD62dw%40mail.gmail.com.

Re: GWT RPC call recognized as a Java Method Injection by Fortiweb

As noted in the post - we didn't get around to trying Domino REST. By the time we discovered it, we'd already made the decision to stick with GWT-RPC and move on to other work. It's possible we'd revisit that, but we'd probably want to see some worked examples of how to transition from GWT-RPC to Domino REST. We already burnt quite a few cycles digging into the depths of alternates only to find they came up short. So it's hard to justify going back there to do more of that at this stage when GWT-RPC still works.

On Tuesday, 25 July 2023 at 15:43:06 UTC+1 Michael Conrad wrote:
Did y'all test DominoKit? It is actively maintained and has a REST module. I'm curious if you did test it what shortcomings you may have run into.

On Tuesday, July 25, 2023 at 9:23:53 AM UTC-4 RobW wrote:
We got to a similar point. Looked in depth at moving the GWT front end to a REST API - but found two big drawbacks: 
  1. none of the frameworks we could find had async callback handling similar to GWT-RPC, with common interface classes client server side AND support JAX-RS subresources. RestyGWT got close apart from those last two points - there is a model with common client/server interfaces, but it doesn't support subresources. We found at least 1 other GWT REST toolkit that had exactly the same issue  - so it's clearly not a trivial one to solve.
  2. somewhat more serious than the first issue was that none of the GWT REST API frameworks looked to be that actively maintained, at least tracking their GitHub commits anyhow
So ultimately, although REST API an attractive route, GWT-RPC remains more practical for us in the near term.

Note - one we didn't explore in depth but may come back too was Domino Kit, which has a REST API component. That did look more actively maintained and perhaps is a way forward.

On Monday, 24 July 2023 at 18:50:38 UTC+1 Ralph Fiergolla wrote:
That is, as long as I stay within GWT there is no need to change (and loose type checking and convenience). I will happily stay with GWT RPC then!

R

Jens <jens.ne...@gmail.com> schrieb am Mo. 24. Juli 2023 um 18:24:

I think I asked the question before: as a long-term GWT-RPC user, what would be the benefit of moving to some other RPC protocol/mechanism?

Depends on your situation of course. If you want to use your existing backend with other clients written in other languages then GWT-RPC is a bad fit. While the wire format of GWT-RPC is documented, you still need to write the client code to generate it. Also GWT-RPC supports inheritance which other languages you want to use might not support. Other JS based RPC solutions as well as general purpose solutions like gRPC typically do not support inheritance.

GWT-RPC will already be annoying if you decide to have some portions of your app being written in a different framework since it is easier to find developers for that framework, e.g. angular, svelte, react, whatever. You would then need to define a JS api that calls into GWT code so these frameworks can talk to your GWT-RPC backend (or you need to provide new endpoints in your backend that do not talk GWT-RPC).

-- J.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/692de019-081b-4612-ba19-a9dd3783ac5dn%40googlegroups.com.

Re: Partial super source? Possible?

Thanks Thomas. By "shadow" I was actually quoting you when you said: 

you cannot "augment" it, but you can "shadow" it by providing your own super-source version of java.lang.String

In my previous reply, I was saying that I'm happy with this solution for my GWT app (whatever you call this method "shadow" or something else).

But my concern is now with J2CL (as I plan to move my GWT app to J2CL in the future).
I would like to know if this solution will also work with J2CL.
i.e. will I be able to provide my own implementation of String.format() if not emulated by J2CL?

On Tuesday, 25 July 2023 at 15:20:19 UTC+1 Thomas Broyer wrote:
On Tuesday, July 25, 2023 at 2:26:14 PM UTC+2 Bruno Salmon wrote:
The shadow super-source should work in my case, thank you.

 If later I want to move from GWT to J2CL, will I have a similar feature (ex: providing my own implementation of String.format() if not emulated) ?

IIRC, no: each source file must only appear once, so you cannot use shadowing.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/cd1e2396-afe8-47b6-8b37-5a5ca4459eb6n%40googlegroups.com.

Tuesday, July 25, 2023

Re: GWT RPC call recognized as a Java Method Injection by Fortiweb

Did y'all test DominoKit? It is actively maintained and has a REST module. I'm curious if you did test it what shortcomings you may have run into.

On Tuesday, July 25, 2023 at 9:23:53 AM UTC-4 RobW wrote:
We got to a similar point. Looked in depth at moving the GWT front end to a REST API - but found two big drawbacks: 
  1. none of the frameworks we could find had async callback handling similar to GWT-RPC, with common interface classes client server side AND support JAX-RS subresources. RestyGWT got close apart from those last two points - there is a model with common client/server interfaces, but it doesn't support subresources. We found at least 1 other GWT REST toolkit that had exactly the same issue  - so it's clearly not a trivial one to solve.
  2. somewhat more serious than the first issue was that none of the GWT REST API frameworks looked to be that actively maintained, at least tracking their GitHub commits anyhow
So ultimately, although REST API an attractive route, GWT-RPC remains more practical for us in the near term.

Note - one we didn't explore in depth but may come back too was Domino Kit, which has a REST API component. That did look more actively maintained and perhaps is a way forward.

On Monday, 24 July 2023 at 18:50:38 UTC+1 Ralph Fiergolla wrote:
That is, as long as I stay within GWT there is no need to change (and loose type checking and convenience). I will happily stay with GWT RPC then!

R

Jens <jens.ne...@gmail.com> schrieb am Mo. 24. Juli 2023 um 18:24:

I think I asked the question before: as a long-term GWT-RPC user, what would be the benefit of moving to some other RPC protocol/mechanism?

Depends on your situation of course. If you want to use your existing backend with other clients written in other languages then GWT-RPC is a bad fit. While the wire format of GWT-RPC is documented, you still need to write the client code to generate it. Also GWT-RPC supports inheritance which other languages you want to use might not support. Other JS based RPC solutions as well as general purpose solutions like gRPC typically do not support inheritance.

GWT-RPC will already be annoying if you decide to have some portions of your app being written in a different framework since it is easier to find developers for that framework, e.g. angular, svelte, react, whatever. You would then need to define a JS api that calls into GWT code so these frameworks can talk to your GWT-RPC backend (or you need to provide new endpoints in your backend that do not talk GWT-RPC).

-- J.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/16623367-e3d6-46ad-9c0f-7cd02e7a496fn%40googlegroups.com.

Re: Partial super source? Possible?



On Tuesday, July 25, 2023 at 2:26:14 PM UTC+2 Bruno Salmon wrote:
The shadow super-source should work in my case, thank you.

 If later I want to move from GWT to J2CL, will I have a similar feature (ex: providing my own implementation of String.format() if not emulated) ?

IIRC, no: each source file must only appear once, so you cannot use shadowing.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/78192c92-2ac3-4602-beea-1010591573d6n%40googlegroups.com.