On 28.10.2010, at 15:42, Fabien Potencier wrote:

>> Any Bundle that outputs direct HTML needs to be able to just return
>> JSON. This imho includes 90% of all Bundles that will ever get
>> written. With the various approaches I have mentioned it is possible
>> to support this without requiring any additional code in the
>> controller.
> 
> Then, you also need to support XML.


Sure, that shouldnt be too hard if we get JSON working :)

Thought about this some more and maybe I just misunderstood you all this time, 
but couldnt I simply change the 'templating' service to something other than 
Symfony\Bundle\FrameworkBundle\Templating\Engine? Aka something that allows me 
to hook in some additional logic.

Doing something similar to handle the redirects by extending the 'response' 
service would also be possible borrowing from what I did in the 
MultiplexController [1].

Of course this means these custom 'templating' and 'response' services need to 
be applied to the entire project, since the default approach is to just inject 
the entire container when extending the Controller class, instead of injecting 
the dependencies explicitly (like I am also doing in the MultiplexController 
and which imho is waaaaaaaaaay cleaner).

So right now I am still not happy. It feels we are taking too many shortcuts to 
make beginners happy that mean that whatever these beginners produce is 
essentially useless for more advanced use cases. Plus I do not really see that 
these shortcuts make things really easier. They just make things better for 
screencasts and talk slides. But they hide what is actually happening and 
therefore in the end will just lead to confusions. But I digress.

regards,
Lukas Kahwe Smith
[email protected]

[1] http://github.com/liip/MultiplexBundle

-- 
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

Reply via email to