nmorel / gwt-jackson

gwt-jackson is a JSON parser for GWT. It uses Jackson 2.x annotations to customize the serialization/deserialization process.
Apache License 2.0
111 stars 54 forks source link

GWT 3.0 APT generation #63

Open seamusmac opened 8 years ago

seamusmac commented 8 years ago

What the thoughts on creating a branch for GWT 3.0, that uses APT instead of the gwt generators to do the code generation?

Someone asked if RestyGWT would be supporting GWT 3.0, maybe a good idea to combine efforts? https://groups.google.com/forum/#!topic/restygwt/qYiL0v7aJRQ%5B1-25%5D

nmorel commented 8 years ago

That's something I would like to do but I'm not sure I will have the time for it. There is a lot of work but it should be possible. Some of the code can be reused (client package and tests) but most of the rebind package must be rewritten though, probably from scratch because of the extensive use of the oracle. And I think some of the functionalities will be hard to keep.

The REST part should be easier though. I already wrote a small rest client using APT for the generation (but gwt-jackson for the json serialization). It's more a test than a full featured client : gwt-jackson-rest.

gwtp is using this library and I guess they will want to support GWT 3 too.

nmorel commented 8 years ago

A json parser using annotation processor : https://github.com/Instagram/ig-json-parser Maybe we can reuse some of the stuff there.

afdia commented 8 years ago

https://github.com/bluelinelabs/LoganSquare is another apt based JSON mapper which may be useful when implementing this feature

christiangoudreau commented 8 years ago

Support for GWT 3.0 is on it's way. Everything is now using annotation processors on our end. Next step will be to make sure that the libraries we use will support it :D

Still no time to do it @nmorel ?

nmorel commented 8 years ago

And GWT 3.0 is ? Any ETA ? From the outside, I don't see much movement. The google group contributor has no real news for a while and the 2.8 is still in beta 1.

All your current codebase on master branch is using annotation processor ? You were using gin heavily. They are also supporting GWT 3 or you are moving to dagger ?

I'm a noob in annotation processor but I can find some time to init a branch with a basic support (no inheritance and just the basic jackson annotation like JsonIgnore and JsonProperty). I'm not using GWT anymore at my job so finding time (and motivation) is a bit harder.

I still find annotation processor limited for this library. You are going to put an annotation on a top class (either a mapper or the POJO you wanna (de)serialize) but not on dependent classes. If you change a dependent class, the processor is not called by the IDE. You have to rebuild everything. It misses something like the watch in javascript tooling. And the API is awful ^^

christiangoudreau commented 8 years ago

From the outside, it may seems like it, but it is mostly because they're putting all efforts on the new compiler.

We're moving to Dagger indeed with GWTP 2.0.

We've made a lot great things with APT in GWTP, Christopher will soon release a blog article about it if you're interested :D

vegegoku commented 6 years ago

@nmorel i am working on an APT based version of gwt-jackson, but my version is minimal one, so instead of changing the original lib i am going to implement my own, but i need to use classes from this library, do you have any objections for using these classes? knowing that i am going to change the packages, but i will keep the Author in the class header java docs.

nmorel commented 6 years ago

@vegegoku No objections :) Go ahead

vegegoku commented 6 years ago

Thank you so much so this is the new Library for those who are interested, it is still a work in progress but its already usable for limited use cases, features will be added gradually. https://github.com/vegegoku/gwt-jackson-apt

nmorel commented 6 years ago

Nice! I'm sure people will be interested in it. If you have any question concerning the source code of gwt-jackson, don't hesitate to ask.

vegegoku commented 6 years ago

A working snapshot of gwt-jackson-apt is now available https://github.com/vegegoku/gwt-jackson-apt