Hi,

After thinking a bit about it. I think it is not such a good idea for
Symfony in the long term.

One of the great things about PHP and Symfony is that the scope it can
handle is so wide. It can handle very small and quick applications, but it
can also be used to build robust, powerful, maintainable web applications. I
think by default the framework should cater to the new developers and keep
the bar as low as possible. If we mandate too much on by default then the
bar is raised quite high to get started with Symfony.

I think the voting statistics are skewed here because the people who want to
see this on by default, are the more seasoned developers that are building
much larger web applications and are more likely to be involved with the
community and development mailing lists.

We have a large demographic of developers and we should not forgot about
that. Also, it is so easy to turn on twig yourself that it does not make
sense to make it on by default.

Just my 2c.

- Jon

On Tue, Sep 21, 2010 at 4:04 PM, Jordi Boggiano <j.boggi...@seld.be> wrote:

> Heya,
>
> I would like to start a discussion on whether we should adopt Twig as
> the *default* Renderer for Symfony2 instead of PHP templates.
>
> My view of it is this:
>
> - PHP templates are a great default since PHP is obviously always there,
> but Twig seems to have become a first class citizen already, so it
> wouldn't be too problematic, and it can always be removed if someone
> doesn't like it.
>
> - In my experience PHP templates encourage not-so-MVC-conscious
> developers to put too much logic in their views, because it's very easy
> to do so. Twig provides a context switch that help people make a
> distinction, and also makes it harder/impossible to code complex logic
> in templates.
>
> - Twig with the custom tokens provides much more fluent and clean
> interfaces to the template helpers, not to mention shorter. e.g.:
>
> > {% route 'blog_post' with ['id': post.id] %}
> >
> > <?php echo $view['router']->generate('blog_post', array('id' =>
> $post->id)) ?>
>
> - The Twig syntax with dots to access properties and all looks and feels
> like javascript, which imo is great for frontend developers to be sort
> of in the same environment no matter if they work in templates or in js
> code.
>
> - On the downside, I guess Twig has a bit of a learning curve, but then
> again people must learn the symfony "keywords" anyways, like
> $view['router'], that aren't especially obvious to a non-sf developer.
> So it's not like PHP templates are completely straightforward, and Twig
> syntax is quite simple and well documented.
>
> Thoughts?
>
> 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<symfony-devs%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
>



-- 
Jonathan H. Wage
http://www.twitter.com/jwage

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