On 24 Sep., 19:41, Jonathan Wage <jonw...@gmail.com> wrote:
> 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 no matter what the default is you need to learn some "template
markup". So I think with appropriate docs it's no problem to introduce
Twig. Also for the better separation of concerns and the sandboxing I
am +1 for Twig as default template system.

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

Symfony2 is already much simpler to learn for beginners than symfony
1. When Twig is the default there will also be many bundles and some
complete projects providing Twig templates and this will make it easy
to learn Twig. And again, with good docs (possibly another xy-eet
tutorial) I don't see a big problem. I think the advantages of Twig
over PHP are worth making it the default.

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

I think this argument does not make much sense because with Twig being
the default it's the same simple step to "turn on PHP".
Of course I think we nevertheless need to keep the possibility to use
PHP.

regards,
Matthias

> 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. Wagehttp://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