Is there an easy way to use GWT Request Factory?

124 views
Skip to first unread message

hprc

unread,
May 19, 2022, 6:32:18 PM5/19/22
to GWT Users
I know that GWT Request Factor plays an important role in Java object persistence and communication between client and server.
However, on the server and client, even one object needs to generate related classes and interfaces, and then annotation settings etc. need to be set for each class and interface.
It is complicated and has a lot of trouble to create.

Originally, these things are like plugins, and it is desirable to select one object and generate a related class, but do you all know?

I have been using GWT for over 10 years, but I do not use "RequestFactory" and operate only with objects like Map by RPC communication.
This can simplify the entire system and greatly reduce the effort required to create it.

GWT RequestFactory

Thomas Broyer

unread,
May 20, 2022, 9:56:59 AM5/20/22
to GWT Users
Short answer: don't start using RequestFactory now, it's been practically unmaintained for years.

Long answer: there's not really a longer answer actually, it's OK to keep using RF in existing projects (if you can't afford moving to something else), but don't start anything with it now.
(I wouldn't start anything new with gwt-rpc either BTW, but YMMV)

Ralph Fiergolla

unread,
May 20, 2022, 10:14:58 AM5/20/22
to google-we...@googlegroups.com
why not use gwt-rpc? I am a lazy guy and am happily using it for more than 10 years now - I even use the generated serializers in combination with WebSockets. What can possibly go wrong here...?

--
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/66b91749-8cb7-4b84-964d-82c2996adca8n%40googlegroups.com.

hprc

unread,
May 20, 2022, 9:27:25 PM5/20/22
to GWT Users
to: t.br ..
thank you for the advice.
Right now I'm not using [RequestFactory] right now, so I'm not having any issues, but it's interesting to be able to use ORMs on clients and servers, isn't it?

I myself create a data sharing type object in there and exchange it.

2022年5月20日金曜日 23:14:58 UTC+9 ralph.f...@gmail.com:

hprc

unread,
May 20, 2022, 9:29:06 PM5/20/22
to GWT Users

to: ralph.f


thank you for the advice.
I'm using gwt-rpc now and I'm pretty happy with it.
2022年5月21日土曜日 10:27:25 UTC+9 hprc:

Thomas Broyer

unread,
May 21, 2022, 8:07:22 AM5/21/22
to GWT Users
Using ORMs on clients and servers, what are you talking about?

hprc

unread,
May 22, 2022, 9:45:43 PM5/22/22
to GWT Users
It's wise not to use Request Factory, right?
However, since it is also described in the official document, I think that there are people who are interested.
I have to fix these documents as well.
For example, deprecated ...

2022年5月21日土曜日 21:07:22 UTC+9 t.br...@gmail.com:

Rogelio Flores

unread,
May 23, 2022, 1:37:05 PM5/23/22
to GWT Users
The big disadvantage that I see with gwt-rpc is that it ties your client-side with your server-side code (if you change anything related to your models/rpc on the client side, you also have to update your serve-side code, otherwise, it will not work). To me that in itself is a big disadvantage. With something like REST APIs, your client and server side code remain decoupled, giving you more freedom.

hprc

unread,
May 23, 2022, 6:33:15 PM5/23/22
to GWT Users
I think it's a great design method.
Client side and server
Side communication should be loosely coupled.

However, although I understand this merit, maintenance is possible more intuitively because the Java object set in the shared package is used for communication between the two.
Normally, when using the RESET API etc., conversion work such as parsing is required.

2022年5月24日火曜日 2:37:05 UTC+9 Rogelio Flores:

Michael Conrad

unread,
May 23, 2022, 7:07:33 PM5/23/22
to google-we...@googlegroups.com
Take a look at domino-rest: https://github.com/DominoKit/domino-rest

You can use a shared POJOs project between the client and server projects with common POJOs annotated with Jackson JSON annotations to transfer data as JSON objects between client and server in a bidirectional fashion.

hprc

unread,
May 23, 2022, 8:15:12 PM5/23/22
to GWT Users
Re [domino-rest]
It's a great API, you can use POJO and REST respectively.
However, I don't know how to use ECLIPSE + GWT + MOVEN, so it's sad that I can't use it right away.

2022年5月24日火曜日 8:07:33 UTC+9 m.conr...@gmail.com:

Ralph Fiergolla

unread,
May 24, 2022, 2:26:42 AM5/24/22
to google-we...@googlegroups.com
I consider this as the biggest advantage: you keep type-safety across client/server calls. If you do some breaking changes, the compiler will tell you! I definitely prefer this above finding out at runtime…
You can always achieve higher levels of flexibility by adding abstraction layers between between hour client and server code - without loosing strict type checking. 

hprc

unread,
May 24, 2022, 3:21:51 AM5/24/22
to GWT Users
If you share "POJO", you can use the refactoring function of Eclipse to improve the maintenance performance of the entire system.

2022年5月24日火曜日 15:26:42 UTC+9 ralph.f...@gmail.com:

Frank Hossfeld

unread,
May 24, 2022, 9:16:47 AM5/24/22
to GWT Users

You can use domino-rest without using maven. But Maven will make things much easier.

There are several examples demontrating the use of the Domino-Stack (including domino-rest) Also, in most cases, it does not depend on Eclipse. F.e.: check: https://github.com/NaluKit/nalu-examples/tree/main/nalu-complex-app-example. This example demonstrate how to do things in Nalu. This example uses domino-rest for the communication. (I am pretty sure Ahmad & Rafat have similar examples using the domino stack). Just follow the instructions inside the readme.txt. All you need to do is to install Java and Maven and make it available from your terminal. 

hprc

unread,
May 24, 2022, 6:15:50 PM5/24/22
to GWT Users
thank you for the advice
I have a poor understanding of Maven, so I can only add functionality in the basic way.

I know myself
1 Build and run using Eclipse and GWT plugin
2 Add jar to build path
3 Add by adding <inherits> tag

If you prefer, it would be helpful if you could download the jars you need for domino-rest.

2022年5月24日火曜日 22:16:47 UTC+9 frank.h...@googlemail.com:

Craig Mitchell

unread,
May 24, 2022, 7:11:39 PM5/24/22
to GWT Users
I'm using GWT-RPC, and it works great!

I have a version number (that is used by the client and server) that I update when I make a breaking RPC change.  If the client detects it has a different version number to the server, it shows the user a message that they need to refresh their browser, as a new version has been released.

Probably not the optimum solution, but it works fine for my needs.

hprc

unread,
May 24, 2022, 8:29:07 PM5/24/22
to GWT Users
cool!
Simple things are good.
The main purpose is to be easy and quick to do, rather than complicate.
2022年5月25日水曜日 8:11:39 UTC+9 Craig Mitchell:
Reply all
Reply to author
Forward
0 new messages