First of all, good project idea! I think there are a thousend people beside you and me using stripes and guice - at least I hope so :-) . Sorry for my short style, I was @work so I couldn't spend much time on things like beeing kind and so one .-)
> * Why don't you use the servletContext to store the injector set? > Because I want to make the injector statically accessible if someone needs > to access it in a location where the servletContext is not available. This > is similar to the StripesFilter.getConfiguration() method in stripes. It's > about convenience. What do you think about how convenient it will be to write unit test für a java bean using this static method? ;-) And of course this breaks the LoD > * Why do you iterate the set of injectors in public static > Injector getInjector() ? > Because it is a Set and that's how I get the first item from the Set. Why use a Set<Injector>? are you planning to use multiple Injectors? > * Why do let guice create the actionBeans and additionally > call injectMembers within the interceptor (twice(!))? > Because I'm a kuncklehead. I just removed it and will be committing the > change. Your code doens't look like i came from a knucklehead ;-) > Feel free to ask more questions. More questions: - I'm wondering if somebody is extending the AnnotatedClassActionResolver. If so, this one will be stucked. I can only think of providing 2 base classes as solution - which seems a little bit ugly from my point of view. - I really do like the constructor based injection more than the setter based, but can it happen, that stripes autobinding overrides a property of your actionBean? Of course we are all security freaks und we all use strict binding but what about a less security aware programmer or some who doesn't use final? I don't trust myself, thats why I use the Interceptor/Setter based solution. Maybe a configuration param should enable/disable constructor based injection. - What do you think about defining a Module[] factory as config param for the Lister, so the modules compatible to your framework are not limited to the default parameter less constructor? - How are you using the ActionBeanContext in your applications? I made the experience that i don't need more than the build in functions when using guice as DI framework. - Are you planing to implement some logging? Thanks for this nice conversation, Richard > Brandon Goodin > Silver Mind Software > http://www.silvermindsoftware.com > [email protected] > 615-306-3652 > http://www.linkedin.com/in/bgoodin > > Hello Brandon, >> >> i have a few questions: >> - Why don't you use the servletContext to store the injector set? >> - Why do you iterate the set of injectors in public static Injector >> getInjector() ? >> - Why do let guice create the actionBeans and additionally call >> injectMembers within the interceptor (twice(!))? >> >> 2009/3/17 Brandon Goodin <[email protected]>: >> > Hey All, >> > I decided i'd roll my own Stripes-Guice integration extension >> > (http://www.silvermindsoftware.com/stripesguice/) and make it available >> > to >> > everyone. I chose to write my own because I surveyed the current >> > solutions >> > and found them unable to meet my needs. Stripes-Guice is available for >> > use >> > if you don't mind using SNAPSHOT software ;-). Features are being added >> > and >> > you are more than welcome to ask for features that aren't already >> > defined in >> > the Planned Features. I plan to complete the planned features against >> > Stripes 1.5.x before Stripes 1.6 is released. Additionally, I plan to >> > have >> > a 1.6 compatible version ready by the time 1.6 is released, if not >> > earlier. >> > One of the most notable features is that Guice is initialized in a >> > ServletContextListener rather than in the Stripes Life-cycle. This opens >> > up >> > greater possibilities for Injecting various Stripes components. >> > Additionally, it allows for you to provide your own means of creating >> > the >> > Guice Injector. I welcome your feedback on how to make this more useful. >> > ******************************* >> > FROM THE HOMEPAGE >> > ******************************* >> > == Features == >> > * Initialization of Guice Modules via a ServletContextListener named >> > GuiceContextListener. >> > * Inject ActionBeans (including constructor) using the standard Guice >> > annotation. >> > * Inject ActionBeanContext members (no constructor injection... yet) >> > using >> > the standard Guice annotation. >> > * Ability to provide custom means of retrieving Guice Injector through a >> > custom GuiceInjectorFactory. >> > ==Planned Features== >> > * Constructor Injection on all reasonable components. >> > * Interceptor Injection >> > * ConfigurableComponent Injection >> > * Support for Stripes 1.6 >> > http://www.silvermindsoftware.com/stripesguice/ >> > >> > Thanks, >> > Brandon Goodin >> > Silver Mind Software >> > http://www.silvermindsoftware.com >> > [email protected] >> > 615-306-3652 >> > http://www.linkedin.com/in/bgoodin >> > >> > >> > ------------------------------------------------------------------------------ >> > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are >> > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and >> > easily build your RIAs with Flex Builder, the Eclipse(TM)based >> > development >> > software that enables intelligent coding and step-through debugging. >> > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com >> > _______________________________________________ >> > Stripes-users mailing list >> > [email protected] >> > https://lists.sourceforge.net/lists/listinfo/stripes-users >> > >> > >> >> >> ------------------------------------------------------------------------------ >> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are >> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and >> easily build your RIAs with Flex Builder, the Eclipse(TM)based development >> software that enables intelligent coding and step-through debugging. >> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com >> _______________________________________________ >> Stripes-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/stripes-users > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Stripes-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-users > > ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
