Comment #60 on issue 62 by [email protected]: Lifecycle support
http://code.google.com/p/google-guice/issues/detail?id=62

<sigh>

I was afraid this was where Guice was going to go...

I wholeheartedly disagree that composite-service wtih a separate listing of dependency is the way to go. For me, a collaborator dependency graph IS the order in which B needs A, and usage-order/start-order implies construction order (as in, if B needs A to be started before it needs to be started, it surely needs A to exist before it needs to exist. Even if it doesnt' know about A, because it's transitive.

So I don't see it as an artificial dependency, but an absolutely natural one, implicit in the creation graph.

But even if it was artificial, with a CompositeService (which isn't really a "feature" of guice, as I can do this with a Multibinder today), you're basically specifying a separate, duplicate wiring which (as I said) overloads (to an extent) the creation graph. That's maintaining metadata twice, which (again, to me) is really hard to maintain.

I've long considered the lack of lifecycle a bug, not a feature, and a radically bad design choice, and what I've seen in terms of people adding work to constructors/providers as a "workaround" the missing feature (to me) justifies this view.

I'll dig back through the bug and conversations and see if I can't convince myself otherwise, but I"m afraid I wasn't convinced when I first read the arguments about "we're an injector not a container" and I suspect I won't find much new to convince me.

And I'm sorry if I'm a little snippy in this bug thread, but I had built up hopes and I'm actually really disappointed in this decision, because I really really really want to like Guice, and it's clean in so many other ways.

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" 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-dev?hl=en.

Reply via email to