Hi all.
I started experimentally porting my small Tapestry3.0 apps to 4.0), and
cannot get away from feel that dependency injection is a bit overkill for
web pages/components. (BTW, boot time in 4.0 is much, much larger. I assume
it is due to HiveMind bytecode enhancing many things in there ?)
Maybe it's because I always tend to unit test just business classes, not web
ones, so I don't see so much usefulness in DI there. I don't run into cases
when I want to inject different implementations of dependency in my web
page/component class. Are there some other benefits?
Burden is that when using service locator, if some dependency is needed on
many places (such as Visit) I can centralize fetching of this object in
superclass, and on the other hand, with DI, I have to define it in every
spec XML. I know that annotations will come to rescue, but untill then....
:-(
Similar case is page that requires many messages from .properties. In old
3.0 days it's not much work, just call getMessage(key) and that's it. Now, I
would have to inject every message by specifying it in XML. Too much typing
just for simple message fetch. Same for injecting pages..etc...
Suddenly, my page classes end up having really lot of ugly abstract methods,
and long spec XMLs...
Thoughts?
Cheers,
Vjeran
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]