views:

752

answers:

3

i know gin is client side of guice . so in order to use gin. it must be used together with guice? i wonder, can it be used with spring?

+1  A: 

SpringIntegration?

As I understand it this makes use of the GWT Java-to-JavaScript compiler, so the next question is does Spring work with GWT. If it does I think you would be better off using Spring directly rather than jumping through this additional hoop.

mlk
Why is this question tagged as non-programming-related?
mlk
A: 

From the gwt-gin Faq:

GIN uses Guice at compile-time via a GWT Generator. The generator creates an implementation of your Ginjector interfaces.

Thus guice is built-in and no substitution is possible. Besides adding necessary jars to your GWT module you not need to know about guice at all when using gin. Of course, using gin is very similar to using guice...

grigory
A: 

Thus guice is built-in and no substitution is possible. Besides adding necessary jars to your GWT module you not need to know about guice at all when using gin. Of course, using gin is very similar to using guice...

Just a little clarification (source: GIN homepage):

GIN is built on top of Guice and uses (a subset of) Guice's binding language.

Thus, think of GIN as a way to use Guice in your GWT projects - most of the tutorials, videos, etc concerning Guice will work with Gin. Note that the GIN site doesn't have any tutorials on actual DI in the wiki part - that's because everything from the Guice wiki applies here - with some exceptions (mostly advanced stuff). If you want to know the differences, check Guice Compatibility.

Igor Klimer