GWT and Jersey Integration

I created an application that uses ExtJS, which connects through Ajax requests to the RESTful Jersey service. Everything works well in this application, but now I want to put it in ExtGWT.

Since ExtGWT already has RPC servlets for handling client-server communications, where does Jersey fit in this scenario? Should I no longer use it and instead connect from the GWT servlets directly to the maintenance methods?

In case I would like to use Jersey, is there a way to have the same support for serialization / deserialization as with GWT RPC? “I assume that I will no longer use the GWT RPC in this scenario.”

I would prefer Jersey because it has a REST implementation, while GWT RPC does not, I think. In the future, I also plan to access RESTful Jersey services from Android / iOS applications, and the GWT RPC will not fit well into this scenario.

Thank!

+3
source share
4 answers

You are correct that you cannot use GWT RPC with REST. AFAIK, ExtGWT (GXT) does not have built-in support for receiving REST data; I could be wrong, although I have not used GXT for more than a year.

GWT RPC, , . ( JSON); DTO . GWT RPC: GWT RPC.

, REST GWT RPC. GWT RPC GWT- Jersey/REST .

+1

, RestyGWT. JAXRS JSON , GWT-RPC. , , , DTO .

+2

( ), GWT/GXT JAX-RS () :

https://source.sakaiproject.org/contrib/gradebook2/trunk/

GWT-RPC, REST/JSON. PROS/CONS. : code.google.com/webtoolkit/doc/latest/tutorial/clientserver.html

+1

You can seamlessly combine Jersey (serveride) with RestyGWT (clients). See http://blog.javaforge.net/post/30469901979/gwt-rest for more details .

+1
source

Source: https://habr.com/ru/post/1785901/


All Articles