Also, you may want to have a look at https://github.com/chirino/resty-gwt. It automates JSON<-->POJO mapping to REST-style services using a GWT generator.
AutoBeans could certainly be used for JSON<-->POJO mapping, as RequestFactory uses both AutoBeans and JSON under the covers. However, the RequestFactory wire protocol is its own thing built on top of JSON, so it's not quite a direct POJO->JSON conversion in the sense you're thinking about. Better to pick RequestFactory or REST rather than try to marry them, I think, as REST and RPC of any kind are fundamentally different ways of thinking about remote services. Editors are orthogonal to RequestFactory. Have a look at the SimpleBeanEditorDriver in 2.1 for use with your POJOs. /dmc On Sat, Jan 15, 2011 at 3:37 PM, Y2i <yur...@gmail.com> wrote: > > > On Saturday, December 11, 2010 2:01:28 PM UTC-8, zixzigma wrote: >> >> is it possible to use 2.1.1 RequestFactory/AutoBean to convert POJO to >> JSON and viceversa >> when interacting with a RESTful Web Service ? >> >> the common practice with GWT client-server communication is >> to have packages: >> client, shared, server, configuring web.xml >> >> however, in-order to be truly loosely coupled, >> I am thinking of developing the Server side of my app, >> as a REST WebService. completely separate from the client. >> sending JSON encoded data to the Server, and reading JSON. >> >> only using a common .jar file on both containing Entity POJOs. >> >> the problem on GWT client side is a clean way of Converting JSON to >> POJO back and forth. >> >> I was wondering if the new AutoBean/RequestFactory/EntityProxy can >> help in the situation I described ? >> > > Clean conversion of JSON is achieved > with com.google.gwt.jsonp.client.JsonpRequestBuilder > Request factory is not necessary. > > These guidelines describe the basics of working with JSON and overlay types > (JavaScript objects wrapped with Java facade) > http://code.google.com/webtoolkit/doc/latest/tutorial/JSON.html > > com.google.gwt.jsonp.client.JsonpRequestBuilder simplifies things even more > because there is no need to do any JSNI and eval(). > And it also allows for cross-site communication variant called JSON with > padding, which is described in detail here: > http://code.google.com/webtoolkit/doc/latest/tutorial/Xsite.html > > >> Can i still use "Editor" if I opt for JSON/REST solution above ? >> What do you think of this approach ? do you think it may result in >> performance problems ? >> >> > Since overlay types look like POJOs, I think they should work with Editor > framework, but I haven't tried that. > > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to google-web-toolkit@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- David Chandler Developer Programs Engineer, Google Web Toolkit w: http://code.google.com/ b: http://googlewebtoolkit.blogspot.com/ t: @googledevtools -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.