16.3. GIN—how DI differs in a GWT application
Guice relies heavily on the runtime reflection ability of Java. This is great for server-side GWT code because reflection is available there. But runtime reflection isn’t available on the client side of GWT (because it comes at the cost of, for example, compiler optimizations). With no runtime reflection, standard Guice just won’t work for client-side GWT injection.
Luckily, step forward the GWT Injection (GIN) library, which performs the necessary injections at GWT compile time, where reflection is supported (for the compiler).
To get a bit more specific, Guice uses tricks such as implementing a custom class loader to inject the necessary classes, whereas GIN injects the necessary intermediate ...
Get GWT in Action, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.