On 6/21/07, Anil Gangolli <[EMAIL PROTECTED]> wrote:
When I read the fine print on the proposal it basically sounds like we aren't really much real adoption of DI at all, and we are just introducing the use of Guice to wire the manager layer up.
Right, the proposal and code prove the concept and introduce DI. I think that there are many places where we can use DI in Roller, post 4.0, but now I'm primarily interested in 1) getting it into Roller and 2) using it now to make the back-end easier to extend.
I still think the choice of Guice over Spring is misguided in our context. Annotation/code-based injection makes sense for the manager/persistence wire-up and other component bindings where non-committing developers are less likely to want to change things post-distribution, exactly where it's being used in this limited proposal.
Personally, I don't see any advantage of Spring's DI over Guice in any context. I believe we can get the extensibility we need across the board and more via Guice.
As it stands it's a small step in the DI direction and a more significant step towards adopting Guice rather than Spring for our DI basis, kind of the opposite of what I would have liked to see personally. If this is a way to get us comfortable with going further with DI, I'm all for it, because I want to see us go much further along that track. I'm more interested in the cleanliness, "pluggability" and "replaceability" we will get by adopting the DI model more fundamentally throughout Roller.
Yes, I think there are many places we'll be using DI moving forward, both in refactoring and adding more features.
+1 but with hesitation and another plea to consider Spring.
I've considered Spring multiple times before for DI and other things. I've bought and read multiple books on Spring (Raible's Spring Live and Tate's Spring Dev. Notebook) and it never hooked me. In fact, I found it confusing and overarching. The reason I starting working with Guice is because I found it so much easier to work with than Spring. It hooked me from the start. - Dave
