On 20-Apr-09, at 19:39 , Thiago H. de Paula Figueiredo wrote:
I think he means value objects or domain models. You can't
usefully have the container create an instance of Movie because
movie is a data-carrying node. It's a bit like having the IoC
container create any random Map you might need. If it's a named
Map that is a central store for something, then sure, but if I'm
creating a Map of values to be used elsewhere that has limited life-
span and/or will be populated from the database then re-generated
in another user session - these are examples of things you wouldn't
put into the container.
Now I get it. Thanks Christian!
All you said, to me, is one more reason to not inject services in
domain objects . . . :)
Yeah - that's such an anti-pattern. If you're injecting things into
value objects, you've probably not separated concerns well.
Christian.
Christian Edward Gruber
e-mail: christianedwardgru...@gmail.com
weblog: http://www.geekinasuit.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org