On 22.03.2010, at 10:35, Fabien Potencier wrote: > On 3/22/10 10:24 AM, alberto wrote: >> What I was proposing is injecting a proxy object instead of the >> service itself, and only instantiate the real object (e.g. the >> MailService) when a method is called on it (e.g send(mail)). I am not >> sure why you say it needs to be created right away. > > But the mailer is already a proxy in the sense that the connection to the > SMTP server is only done when you send an email. >
right .. and i assume making a mailer instance even if its not needed is actually cheap, so for that i would assume that doing proxy magic is probably not worth the hassle. but there could be other dependencies that have a lot of other dependencies where even if each of these dependencies is cheap on its own, they might add up to a lot of overhead. however again .. proxy magic would require that the proxy class has access to the service container and then you might as well give the action class itself access to the service container .. which is what we have right now .. which i think isnt ideal. regards, Lukas Kahwe Smith [email protected] PS: is anyone going to work out a summary of this thread? or is it up to Fabien to make the final decision on his own anyways, meaning its up to him to decide how to keep an overview of the arguments. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" 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/symfony-devs?hl=en To unsubscribe from this group, send email to symfony-devs+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
