On 22.09.2010 04:15, Yuen-Chi Lian wrote:
> I suppose Twig is not bundled with SF2 - therefore it's a thirdparty
> from SF's point of view.

Actually for the time being Twig is bundled with Sf2, and all you have
to do to use it is add :twig to your render calls like:

$this->render('ExampleBundle:Default:index:twig', $data);

> From beginner's point of view, it can be a blow to them to learn another
> thing extra - especially if they're at the struggling stage of setting
> up SF2, the extra care on how Twig shall be setup properly.. if we can
> avoid them such problem, we shall do it.

There is a tiny bit of syntax to be learned, but it basically boils down
to {% function.call() %} or {{ var.printing }}, then a few specifics
like route generation that would have to be learned anyway, no matter if
it's php or twig templates.

On 22.09.2010 07:52, Lukas Kahwe Smith wrote:
> to the list of pro's that Jordi listed I would also like to add that twig can 
> do escaping a lot more efficient (and also via plugins can do a better job at 
> choosing the right escaping based on context) than the "old" decorator 
> approach (which we all have to admit also causes beginners quite a few wtf's 
> in the beginning).

Thanks for mentioning it, I forgot that point yesterday, but yeah the
auto-escaping as done in php template is really an awful hack and
performance hit imo, but it's the only decent way of doing it since you
don't have a preprocessing/compilation phase.

Cheers

-- 
Jordi Boggiano
@seldaek :: http://seld.be/

-- 
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 symfony-devs@googlegroups.com
To unsubscribe from this group, send email to
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to