开发者

Pros and cons using Gin in GWT

What are the pros and cons using Gin in开发者_StackOverflow GWT in comparison with using a ClientFactory?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜