Saturday, January 13, 2024

Re: Is moving away from RPC a good idea?

gwt-rpc is one of the parts I like the most about GWT and why we chose GWT to start with. Same DTOs on client and server and you don't have to care (too much) about de/serialization. Why do I care about JSON, or binary or whatever serialized format, as long as it is secure, performant and serialization is able to handle my object relation structures?

Some mention "some annoying downsides" or "is imperfect in a lot of ways" regarding gwt-rpc. What are does? The only argument I understood so far, is that it may require you to have gwt-rpc and REST/RequestFactory client-server channels in parallel. We had that since the very beginning, because of OAuth, captcha, file download links etc.. I never saw any practical issues with that set up. For example with spring-security we can easily map both channels to the same user/roles/rights concept.

On Wednesday, January 10, 2024 at 5:26:04 PM UTC+1 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-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/392768b6-58aa-4c71-b54f-cdb0d3aacf53n%40googlegroups.com.

No comments:

Post a Comment