Hi everybody, Nice to see this little chat! At knpLabs we have been working on a few projects with Symfony2... and Twig. I was a little bit sceptical at the beginning - learning a new way to code templates, code coloration in IDEs/editors, no more PHP superpowers.
But now I should say that I'm really pro Twig. Templates are reaally more readables, custom filters and tags are not very difficult to create, and macros can be very useful shortcuts. Code coloration in Textmate (and probably other IDEs) is OK because of the similiarities with django. You're somehow forced to create nice filters and tags instead of dirty PHP. That's a good thing... except when debugging. And debugging twig templates is not always easy as lots of things fail silently. Some things are a little weird/unintuitive/heavy at the moment (passing the _view explicitely to included templates if we want them to generate routes, etc. for example). But at the end I feel that Twig is really improving the code quality : less code, easier to understand, and it definitely promotes best practices (reusability...). And I can't see an Admin Generator without Twig... So +1 for this great lib, and thanks Fabien for the great work. Matthieu [Oh and if people are interested (and if Textmate2 is not released before 2015 :-), I'd be glad to work on a nice Textmate bundle for Twig] On 22 sep, 14:24, Fabien Potencier <fabien.potenc...@symfony- project.com> wrote: > On 9/22/10 1:13 PM, Jordi Boggiano wrote: > > > On 22.09.2010 12:51, Stefan Koopmanschap wrote: > >> But again, the option to switch to plain PHP (or another template > >> engine, for those that want/need another template engine) should still > >> exist for the more advanced users. > > > A decent option maybe for maximized performance, would be to have a > > Twig-only view layer replacing the current Templating component, and > > then keep the Templating component in the sources so it can be just > > enabled via config value, and that one would still default to php > > templates or allow any renderer to be used.. > > > But that could mean you would lose the ability to use most of the > > Bundles that come with templates. > > Why? If you want to use PHP as your templating engine, you will need to > use a *different* templating service; you won't *replace* the Twig one. > So, all bundles will still work as expected. The only thing is that if > you have a *global* layout for all bundles (in your app/ directory), you > will need to have two versions of it: one for Twig and one for PHP. > That's the only downside I can see. > > Fabien > > > It's clear looking at the past that > > > > > the default engine is what will drive 99% of the opensource code, shared > > plugins etc. So it becomes very difficult to avoid it, much like it's > > tricky to use non-PHP templates in sf1 (afaik). > > > Cheers -- 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