Open GoogleCodeExporter opened 8 years ago
It would be really helpful to be able to inject scoped EventBus in huge app
instead of having one app-wide bus.
Original comment by behag...@gmail.com
on 15 Sep 2010 at 2:00
Hi behaghel, probably you could inject different EventBus using @Name or custom
annotations.
Original comment by luisma...@gmail.com
on 16 Sep 2010 at 12:22
Hi luis,
It sounds fair but in my case, the GWT app is composed of thousands of screens
which are like miniapp with many transitions between them. This would imply
thousands of @Name. Because a sub component may need the bus, every component
should have a ref on it. With scope, I would simply create a scope for each
screen, attach an instance of bus into it and use injection in components that
require it.
Original comment by behag...@gmail.com
on 16 Sep 2010 at 5:38
Scopes are definitely an area where Gin could use improvement, the current
support is very rudimentary. We'll look into this eventually although for now
there is a number of other changes that are being worked on first.
Original comment by aragos
on 21 Jan 2011 at 9:26
That's a real pity :'(
Original comment by luisma...@gmail.com
on 23 Jan 2011 at 10:22
Strange that this does not get higher priority. GIN as it is is quite limited
to simplistic applications that just want to avoid some globals.
I need to be able to define scopes per widget instance or per request (spanning
multiple async calls) or per "render" loop in my widget that uses an
incremental rendering technique (or per message queue, but now I am getting to
detailed about my application needs).
It would already be nice if GIN would support the Scoping APIs of Guice, but it
does not need to provide extra scopes besides no_scope and singleton. That is
something I could implement in my application code.
Any ideas ?
Original comment by david.nouls
on 4 Jan 2012 at 8:32
Original issue reported on code.google.com by
luisma...@gmail.com
on 29 Jul 2010 at 12:21