Private C (w/o exposing String.class ) does work in the way I would want it to thanks.
Component C has interface IC implemented by COne that has dependencies on String and IA ( from component A). It picks the String from C's module and IA from A's module and A's String collaborator is also the one that was declared in A's module not C's module this is nice. banks On Mar 1, 11:54 pm, Stuart McCulloch <[email protected]> wrote: > 2009/3/1 bank kus <[email protected]> > > > > > Would it be totally unjustified to say this is working around the > > problem not solving it. Consider I m using Components A and B to build > > up Component C. Except that component A and B are layered compnents > > build using 50 other components. > > note that your module structure does not have to mimic your application > structure, > you could have a nested application model that is configured with a flat > sequence > of modules (personally I'd avoid nesting modules unless absolutely > necessary) > > but if I did want to use a nested module setup where component C built on > A+B > then perhaps something like this might help (I have not tried this in > practice!!) > > C -- PrivateC > / \ > / \ > / \ > A B > | | > | | > PrivateA PrivateB > > ie. I'd use a private module in C to bind types that might also be bound > later on > inside A or B, and only expose what I wanted to make public from component C > > then when C pulls together A, B, and PrivateC there shouldn't be any > conflict > > Now what this would mean is in Component C if I need a Logger I can no > > > > > longer setup a binding inside a module since chances are its used by > > one of the lower components with a different binding so I only ever > > have to use Providers. Perhaps I am missing something colossal in > > which feel free to point that out and I ll go back and reread Guice > > docs /watch the videos (which are excellent btw) and play with the > > examples/tests in the source package :) > > > banks > > > On Feb 28, 2:24 pm, Bob Lee <[email protected]> wrote: > > > On Sat, Feb 28, 2009 at 2:12 PM, bank kus <[email protected]> > > wrote: > > > > Though we still need to solve this problem where a top level component > > > > requires an extremely low level component while some of the components > > > > it uses also use this low level component with different bindings. > > > > You can also use provider methods (for example to construct the fireplace > > > manually and make sure you throw in the right piece of wood). > > > > Bob > > -- > Cheers, Stuart --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-guice?hl=en -~----------~----~----~----~------~----~------~--~---
