Hello
I've a problem with an application, the application works fine but the
new 'firewall' system drops the RPC calls.
So I'm thinking about rewriting GWT-RPC calls to GWT-JSON
I've a lot of simple POJO objects that are used into the app, the
classes are written and can't change very much ( as they are used
acrros the server, including database DAO)
¿ which are your preferred / less painfull (less boilerplate
code) methods to convert from JSON to POJO in GWT ?
- Autobeans
- JSON Overlay types
- Use simple HTTP with String parse
- Other ( explain please...)
There is another great library available (guess not many people know
of it) - RestyGWT
check it out:
http://restygwt.fusesource.org/
Best,
Raphael
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/sqSYKUYr-9sJ.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-tool...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
--
blog: http://ars-machina.raphaelbauer.com
web: http://raphaelbauer.com
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/S1KstHk_EWUJ.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
how can you automate writing proxies?
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/vYz6LWzDelEJ.
static interface MyAutoBeanFactory extends AutoBeanFactory {
AutoBean<MyPojo> login();
}
// In non-GWT code, use AutoBeanFactoryMagic.create(MyFactory.class);
static final MyAutoBeanFactory FACTORY = GWT.create(MyAutoBeanFactory.class);
public MyPojo getMyPojo(String json) {
AutoBean<MyPojo> bean = AutoBeanCodex.decode(FACTORY, MyPojo.class, json);
return bean.as();
}
public String getJson(MyPojo myPojo) {
AutoBean<MyPojo> bean = AutoBeanUtils.getAutoBean(myPojo);
return AutoBeanCodex.encode(bean).getPayload();
}
### JSON Overlay types work on client side only (look at the native javascript code /*-{ }-*/):
public final native T getPojo(String json) /*-{
return eval(json); // eval('(' + json + ')');
}-*/;
public String getJson(T pojo) {
return new JSONObject(pojo).toString();
}
### RequestFactory is great above persistence layers like JPA (and uses AutoBeans under the hood!) but has a lot of boilerplate code.
### Btw: I generate the RequestFactory + JPA stuff with Xtext + Xpand (using a domain specific language (dsl) for my domain model).
- Daniel
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Lqd-Ks2atkUJ.