Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pros and cons using Gin in GWT

Tags:

gwt

gwt-gin

What are the pros and cons using Gin in GWT in comparison with using a ClientFactory?

like image 423
per_jansson Avatar asked Mar 11 '11 10:03

per_jansson


1 Answers

Pros:

Gives you a good wait to replace implementations as you grow. For instance, if you want mixed-mode support, it is easier to do runtime-level changes with a Provider<> than ClientFactory. For example, if you want to have an "Online" version of an Async service and an "Offline" version and hot-swap them in the client.

Constructor DI means you can more easily stub out units without having to use GWTTestSuite.

No XML configuration.

If you use Guice on the server side, you have a consistent pattern for app wiring.

Cons:

It is another library. :/

There are some limits to what you can do with Gin vs "Real" Guice, which might cause some problems.

Gin might add a very small amount of code to your project vs ClientFactory.

like image 113
kebernet Avatar answered Oct 13 '22 16:10

kebernet