Re: Is moving away from RPC a good idea?

2024-01-12 Thread Ed
+1 nats.io

On Fri, Jan 12, 2024 at 10:33 AM Jens  wrote:

> If you do not have special needs I think GWT-RPC is still fine especially
> with a jakarta version now available. But while it is easy to use it also
> has some annoying downsides you have to live with.
>
> However there are quite some options:
> - JsInterop based DTOs + JSON.parse/stringify. However you loose
> inheritance or have to write some helper code to workaround it as needed
> - Use a json based library that solves the polymorphism problem for you
> - Use gRPC for the web (grpc-web) which requires a proxy in front of your
> server gRPC endpoint to transparently convert binary to json
> - Use websocket in either plain text mode or binary mode. If in binary
> mode you could use protobuf or similar to build the payload
>
> Personally I always wanted to explore using nats.io, which is a message
> broker that also supports a request-reply pattern out of the box. That
> means a message channel/topic acts like a service. Nats has a
> nats-websocket library which connects browsers to the message broker and
> you can use protobuf or similar to define/generate your binary messages.
> Because you now have a message broker between clients and servers it should
> be relatively easy to scale and you get things like broadcast a message to
> all clients (push) with little effort. Nats also has a distributed KV store
> integrated if needed.
>
> -- J.
>
> Christian Hebert schrieb am Mittwoch, 10. Januar 2024 um 17:26:04 UTC+1:
>
>> Hi guys, I've seen the changes in the new release regarding jakarta
>> servlets, which is great, it's a step toward jakarta but to this day,  GWT
>> is still based on the Servlet API 3.1.
>>
>> Prior of seeing that change, I tried to move away from RPC calls and use
>> http requests instead. I found a nice library called RestyGWT (
>> https://resty-gwt.github.io/) who can really simplify the process of
>> handling json data from/to a Rest API.
>>
>> So I converted my GWT remote servlets to a Rest API, made a few minor
>> changes in my client code and voilà, I was able to deploy it on a Jakarta
>> Application server since there is no GWT involved on the server side
>> anymore.
>>
>> The last version of RestyGWT has been release in 2020 so I'm not sure how
>> active this project is but from what I've seen it's enough for me.
>>
>> So, I would like to get your thoughts on that.  Would you go on that
>> road? stick to RPC calls and wait for a version of GWT based on Jakarta?
>> build your "own" GWT with the changes introduced in the vew version?
>>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-web-toolkit/5aaec5f2-3d64-45fc-a3d6-63b0d310684fn%40googlegroups.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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/CAMgbRPtHjaDCDGztqRuwyAzH5kcfRZtY_U%3Dvx53ktXqkEiR%3DOg%40mail.gmail.com.


Re: Is moving away from RPC a good idea?

2024-01-12 Thread Jens
If you do not have special needs I think GWT-RPC is still fine especially 
with a jakarta version now available. But while it is easy to use it also 
has some annoying downsides you have to live with.

However there are quite some options:
- JsInterop based DTOs + JSON.parse/stringify. However you loose 
inheritance or have to write some helper code to workaround it as needed
- Use a json based library that solves the polymorphism problem for you
- Use gRPC for the web (grpc-web) which requires a proxy in front of your 
server gRPC endpoint to transparently convert binary to json
- Use websocket in either plain text mode or binary mode. If in binary mode 
you could use protobuf or similar to build the payload

Personally I always wanted to explore using nats.io, which is a message 
broker that also supports a request-reply pattern out of the box. That 
means a message channel/topic acts like a service. Nats has a 
nats-websocket library which connects browsers to the message broker and 
you can use protobuf or similar to define/generate your binary messages. 
Because you now have a message broker between clients and servers it should 
be relatively easy to scale and you get things like broadcast a message to 
all clients (push) with little effort. Nats also has a distributed KV store 
integrated if needed.

-- J.

Christian Hebert schrieb am Mittwoch, 10. Januar 2024 um 17:26:04 UTC+1:

> Hi guys, I've seen the changes in the new release regarding jakarta 
> servlets, which is great, it's a step toward jakarta but to this day,  GWT 
> is still based on the Servlet API 3.1. 
>
> Prior of seeing that change, I tried to move away from RPC calls and use 
> http requests instead. I found a nice library called RestyGWT (
> https://resty-gwt.github.io/) who can really simplify the process of 
> handling json data from/to a Rest API.
>
> So I converted my GWT remote servlets to a Rest API, made a few minor 
> changes in my client code and voilà, I was able to deploy it on a Jakarta 
> Application server since there is no GWT involved on the server side 
> anymore. 
>
> The last version of RestyGWT has been release in 2020 so I'm not sure how 
> active this project is but from what I've seen it's enough for me.
>
> So, I would like to get your thoughts on that.  Would you go on that road? 
> stick to RPC calls and wait for a version of GWT based on Jakarta? build 
> your "own" GWT with the changes introduced in the vew version?
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/5aaec5f2-3d64-45fc-a3d6-63b0d310684fn%40googlegroups.com.


Re: The GWT application hangs on the loading screen

2024-01-12 Thread Jeff Hill
There may have been some Chrome updates in the last few months; 
occasionally, I must hard refresh to get the latest code from nocache.js.  
(That did not happen in  years past)

Anyway, I always check in Developer Tools in Chrome to make sure there are 
no errors in the "Console" and all the necessary files are being loaded in 
the "Network" tab.
On Thursday, January 11, 2024 at 6:42:14 AM UTC-7 Frank Hossfeld wrote:

> Check if the nochache.js gets loaded at a applicaiton staert or if it got 
> a 404. In this case something with the URI is not ok.
>
> Antonio Capone schrieb am Donnerstag, 11. Januar 2024 um 10:56:55 UTC+1:
>
>> Hi all. I deployed an app using GWT on Cloud. It's deployed and working, 
>> but when you log in, the browser window just says "Loading" and seems to 
>> hang indefinitely. Works fine locally in Eclipse.
>> Has this ever happened to you? Is there anyone who can help me understand 
>> why this happens?
>> Many thanks
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/01273156-a2c3-4324-a38b-bce5410fa461n%40googlegroups.com.


Re: Is moving away from RPC a good idea?

2024-01-12 Thread Ralph Fiergolla
Fully agree - and very much like the example!

Leon Pennings  schrieb am Fr. 12. Jan. 2024 um
14:59:

> I think moving away from gwt-rpc is a bad idea.
> A big advantage of GWT is that I can code everything in java and do not
> have to serialize anything to and from text.
> That to me is one of the usp's of GWT.
> Going from java -> json -> java (or gwt java), is like trying to have a
> complex conversation between 2 Dutch guys, but with a German translator in
> between.
>
>
>
>
> Op donderdag 11 januari 2024 om 16:20:32 UTC+1 schreef Vassilis Virvilis:
>
>> Hi Vegegoku,
>>
>> Thanks for clearing that up.
>>
>> At some point I will definitely try the domino-rest/jackson.
>>
>> For now I dread the time I will eventually be forced to port my current
>> setup.
>>
>>
>> On Thu, Jan 11, 2024 at 5:13 PM Vegegoku  wrote:
>>
>>> The annotation on the POJO is not required at all, Domino-rest will auto
>>> generate the json-mapping classes if the jax-rs/jakarata resource
>>> consumes/produces a json even if the annotation is missing, so you can keep
>>> the POJO clean or only have Jackson compatible annotations. ;-)
>>>
>>> On Thursday, January 11, 2024 at 11:35:05 AM UTC+3 Vassilis Virvilis
>>> wrote:
>>>
 First of all thanks for doing this work. It is hugely appreciated and
 required in order to avoid GWT and GWT projects look like zombies in a dead
 landscape.

 I am using RestyGWT and yes I also believe it uses Generators
 (GWT.create() ?). I am facing a problem there since RestyGWT is deadish
 itself.

 One of the reasons I abandoned GWT-RPC was Jsinterop. With Jsinterop
 you can include and link to js libraries in the client. Some of them
 require data from the backend e.g. datatables.net, d3 etc. GWT-RPC is
 not compatible with them so I would need to use RequestFactory, which I
 never liked or another framework. So why have two of them? Use one. Go to
 JSON. RestyGWT was the only viable choice at the time.

 With Resty-GWT I can have my POjOs *without annotations*, and I can
 share them between backend, frontend and other clients (non web). RestyGWT
 has 2 backends:
 - an older private jackson like (forked) implementation. That's the one
 I use.
 - a newer gwt-jackson based one. This one never worked for me.

 Furthermore I have invested in RestGWT and I have some custom patches
 so RestyGWT can transmit my generics.

 At this point domino-jackson and domino-rest looks like the way forward
 but from a quick look require annotations in the POJO and this is something
 that I would like to avoid.

 Just my 2 bits. Sorry if incoherent...




 On Wed, Jan 10, 2024 at 9:45 PM Michael Conrad 
 wrote:

> You should investigate the DominoKit project. They have a much more
> up-to-date JSON/Jackson-ish implementation.
>
> Ref: https://github.com/DominoKit/domino-rest
>
>
>
> On 1/10/24 11:26, Christian Hebert wrote:
>
> Hi guys, I've seen the changes in the new release regarding jakarta
> servlets, which is great, it's a step toward jakarta but to this day,  GWT
> is still based on the Servlet API 3.1.
>
> Prior of seeing that change, I tried to move away from RPC calls and
> use http requests instead. I found a nice library called RestyGWT (
> https://resty-gwt.github.io/) who can really simplify the process of
> handling json data from/to a Rest API.
>
> So I converted my GWT remote servlets to a Rest API, made a few minor
> changes in my client code and voilà, I was able to deploy it on a Jakarta
> Application server since there is no GWT involved on the server side
> anymore.
>
> The last version of RestyGWT has been release in 2020 so I'm not sure
> how active this project is but from what I've seen it's enough for me.
>
> So, I would like to get your thoughts on that.  Would you go on that
> road? stick to RPC calls and wait for a version of GWT based on Jakarta?
> build your "own" GWT with the changes introduced in the vew version?
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-web-toolkit/8fa7dc19-2a15-442d-93b2-adebb947046cn%40googlegroups.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-tool...@googlegroups.com.
>
 

Re: Is moving away from RPC a good idea?

2024-01-12 Thread Leon Pennings
I think moving away from gwt-rpc is a bad idea. 
A big advantage of GWT is that I can code everything in java and do not 
have to serialize anything to and from text.
That to me is one of the usp's of GWT.
Going from java -> json -> java (or gwt java), is like trying to have a 
complex conversation between 2 Dutch guys, but with a German translator in 
between. 




Op donderdag 11 januari 2024 om 16:20:32 UTC+1 schreef Vassilis Virvilis:

> Hi Vegegoku,
>
> Thanks for clearing that up.
>
> At some point I will definitely try the domino-rest/jackson.
>
> For now I dread the time I will eventually be forced to port my current 
> setup.
>
>
> On Thu, Jan 11, 2024 at 5:13 PM Vegegoku  wrote:
>
>> The annotation on the POJO is not required at all, Domino-rest will auto 
>> generate the json-mapping classes if the jax-rs/jakarata resource 
>> consumes/produces a json even if the annotation is missing, so you can keep 
>> the POJO clean or only have Jackson compatible annotations. ;-)
>>
>> On Thursday, January 11, 2024 at 11:35:05 AM UTC+3 Vassilis Virvilis 
>> wrote:
>>
>>> First of all thanks for doing this work. It is hugely appreciated and 
>>> required in order to avoid GWT and GWT projects look like zombies in a dead 
>>> landscape.
>>>
>>> I am using RestyGWT and yes I also believe it uses Generators 
>>> (GWT.create() ?). I am facing a problem there since RestyGWT is deadish 
>>> itself.
>>>
>>> One of the reasons I abandoned GWT-RPC was Jsinterop. With Jsinterop you 
>>> can include and link to js libraries in the client. Some of them require 
>>> data from the backend e.g. datatables.net, d3 etc. GWT-RPC is not 
>>> compatible with them so I would need to use RequestFactory, which I never 
>>> liked or another framework. So why have two of them? Use one. Go to JSON. 
>>> RestyGWT was the only viable choice at the time.
>>>
>>> With Resty-GWT I can have my POjOs *without annotations*, and I can 
>>> share them between backend, frontend and other clients (non web). RestyGWT 
>>> has 2 backends:
>>> - an older private jackson like (forked) implementation. That's the one 
>>> I use.
>>> - a newer gwt-jackson based one. This one never worked for me.
>>>
>>> Furthermore I have invested in RestGWT and I have some custom patches so 
>>> RestyGWT can transmit my generics.
>>>
>>> At this point domino-jackson and domino-rest looks like the way forward 
>>> but from a quick look require annotations in the POJO and this is something 
>>> that I would like to avoid.
>>>
>>> Just my 2 bits. Sorry if incoherent...
>>>
>>>
>>>
>>>
>>> On Wed, Jan 10, 2024 at 9:45 PM Michael Conrad  
>>> wrote:
>>>
 You should investigate the DominoKit project. They have a much more 
 up-to-date JSON/Jackson-ish implementation.

 Ref: https://github.com/DominoKit/domino-rest



 On 1/10/24 11:26, Christian Hebert wrote:

 Hi guys, I've seen the changes in the new release regarding jakarta 
 servlets, which is great, it's a step toward jakarta but to this day,  GWT 
 is still based on the Servlet API 3.1. 

 Prior of seeing that change, I tried to move away from RPC calls and 
 use http requests instead. I found a nice library called RestyGWT (
 https://resty-gwt.github.io/) who can really simplify the process of 
 handling json data from/to a Rest API.

 So I converted my GWT remote servlets to a Rest API, made a few minor 
 changes in my client code and voilà, I was able to deploy it on a Jakarta 
 Application server since there is no GWT involved on the server side 
 anymore. 

 The last version of RestyGWT has been release in 2020 so I'm not sure 
 how active this project is but from what I've seen it's enough for me.

 So, I would like to get your thoughts on that.  Would you go on that 
 road? stick to RPC calls and wait for a version of GWT based on Jakarta? 
 build your "own" GWT with the changes introduced in the vew version?
 -- 
 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.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/google-web-toolkit/8fa7dc19-2a15-442d-93b2-adebb947046cn%40googlegroups.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-tool...@googlegroups.com.

>>> To view this discussion on the web visit 
 https://groups.google.com/d/msgid/google-web-toolkit/156e77ff-25bd-4743-8798-0d0347d1866d%40newsrx.com