On Mon Jake Mannix <jake.man...@gmail.com> wrote: > I'm down with IoC, it's a great way to program to interfaces and > abstract away your deep coupling, but open-source libraries I think > aren't the best place for it.
+1 I agree with your assessment of DI containers: Spring is very powerful and can simplify wiring large applications together, especially with the right tools - despite the pain of reading xml files. However I do not think we should tie Mahout users to a specific DI framework. I think, it should be easy to customise the wiring of Mahout if you are already using DI. But choice should be up to the user. Mahout should run w/o out of the box. I am wondering whether providing convenience constructors that set up the default wiring beside those that get dependencies injected might help our case? This is no proposal to heavily refactor all existing code, just an idea one might want to keep in mind when touching code anyway, when reviewing code etc. > p.s. two other open source projects I work on - bobo-browse > for faceted search, and zoie for realtime search, both > *optionally* couple to Spring, in the sense that they both > have their "example" apps that live with their source tree > use them, but it's just for *apps* built on top of the libraries, > not for the wiring of anything done inside. Sounds like a nice approach to me: Using spring (or Guice or whatever your favourite may be) in some of the examples or demo applications makes perfect sense. Isabel