GIN Bindings
Last updated
Was this helpful?
Last updated
Was this helpful?
GWTP uses dependency injection as a foundation of its architecture. It allows to have a maintainable application and loosely coupled components.
GIN is the library used for dependency injection in GWT.
GWTP needs a boostrapping process to link a Presenter class to its View and View implementation classes. The way of doing this is by creating a GIN module and put the bindings in there.
Here's an example of a basic module:
Things to notice in this example:
A module can install other modules
A module needs to be installed (by another installed module) to have its code executed. (See GIN module registration)
A GWTP module should extend AbstractPresenterModule
to inherit convenience methods for binding a different Presenter types. (See for more information.)