Em Mon, 20 Apr 2009 20:26:17 -0300, Christian Edward Gruber
<christianedwardgru...@gmail.com> escreveu:
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 . . . :)
But, you might put the thing that creates them into the container as a
service.
That's the bet advice to Manuel I can think of.
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org