J2cl: Non-trivial example?

Created on 17 Apr 2019  ·  4Comments  ·  Source: google/j2cl

This looks pretty great (in theory). However, I fear that, like many google open-source projects, the tech is amazing but detailed explanations and non-trivial real-world examples are missing. Two years later the googlers responsible for maintaining the repo get assigned to other projects, lose interest, and it's left to die on the vine.

What's the long-term plan here?

Most helpful comment

How non-trivial are you looking for? From basically day one, the domino-ui and nalu projects have been compatible with j2cl - while we're still iterating on the exact way to use this, the dominodo project is about 700 lines of code. We're using this as a testbed for a proposed maven plugin and some ideas about how to consider project structure (as with bazel: "many, small modules").

All 4 comments

How non-trivial are you looking for? From basically day one, the domino-ui and nalu projects have been compatible with j2cl - while we're still iterating on the exact way to use this, the dominodo project is about 700 lines of code. We're using this as a testbed for a proposed maven plugin and some ideas about how to consider project structure (as with bazel: "many, small modules").

FWIW, I'm not seeing J2CL go away in the next 5 years from Google perspective however I think these open-source projects are useful only with a community built around it since as you pointed Googlers may eventually need to move around. Non-bazel build infra and GWT 3's transition to J2CL might help with building more community but we will see.

With respect to examples; over time there will be more examples in the repo. If you give cases where you need more detailed explanation or examples, we can prioritize those as well.

Thanks for responses. I'll go ahead and close this issue.

I was using a patched version of the early maven plugin by @niloc132 for a a TodoMVC app that used react.js, elemental2, j2cl, dagger and our own state management library arez (like mobx but for java). It stopped working as the various libraries got out of sync (i.e. elemental2 vs closure externs) and it trigger at least one bug in J2CL but overall the experience was nice and not so much different from GWT2.x except faster reload time. I also have a much larger example app that included interaction with a remote back

We plan to move our production apps to J2CL mid year if all goes to plan. In which case we should be able to revive this example and add a few more complete ones. However we will probably be moving to Bazel ... which may not be helpful if you are not moving in that direction. 🤷‍♂️ The main (only?) complexity of J2CL from a consumer point of view seems to be the integration of the build tools.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rluble picture rluble  ·  15Comments

axls picture axls  ·  4Comments

solomatov picture solomatov  ·  17Comments

swuecho picture swuecho  ·  11Comments

sarsonj picture sarsonj  ·  3Comments