On Apr 6, 9:06 pm, Michael Burton <m...@niskala.org> wrote: > Hi ko5tik, > > Good idea, I agree that injection is not as simple as it should be for > objects instantiated manually. I've added your suggestion > here:http://code.google.com/p/roboguice/issues/detail?id=34 > > When you say you're not happy with inheritance, could you be more specific? > Do you mean how Activities need to inherit from GuiceActivity instead of > Activity?
Composition is usually more flexible as inheritance (as there is no multiple inheritance in java) - but for rigigng up interface it should be less problematic. as there is not much of reuse of activities between projects. It would be interesting to put some business code under DI - injecting textviews to them , so they can update values (maybe not real text views, but proxy wrapped one, to overcome problems with interface thread. ) My actual playground: I have highscore service which sits behind the scenes and pulls highscore updates over http ( asynch) - it could receive HTTP-Connector as DI, could be configured via DI with some propeties out of manifest and and reference to some interface obect to push highscores there - with as few knowledge of android whereabouts as possible. regards, -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.