I tend to agree with Jon here. Fabien, can you explain why the need
for a YAML parser is a show-stopper for YAML being the default?
Even with all the positives around XML, I still tend to use YAML. Why?
Because it is easy to *read*. Perhaps this is because I use vim instead
of an IDE, but YAML is so quick and easy to read. In documentation it's
easy to spot what needs to be set. In my files its easy to see what is
going on. For a beginner, reading and understanding is just as, if not
more, important than how quickly they can write.
I also think the stigma (even if unfounded) against XML configuration
files will haunt Symfony2 if it is the default. Again, to Jon's point,
those of us on this list may not be afraid of XML, but there are a lot
of people that shy away from a framework before they even give it a
chance for reasons like this. I think sf2 can compete with the best
frameworks out there. But I can already see the blog posts saying
"Framework x doesn't use XML files, sf2 does".
In my opinion, defaults=marketing, developers can always change it to
their preference.
+1 YAML
Brandon
On 9/24/10 12:53 PM, Jonathan Wage wrote:
My feeling about this is the same as the issue with the
default template language to use. The default should not necessarily
be about what is the best, but what is the easiest and fastest to get
started with. YAML in my opinion should be the default. But for me
personally, I will likely use XML.
- Jon
On Fri, Sep 24, 2010 at 12:37 PM, Yuen-Chi Lian <[email protected]
<mailto:[email protected]>> wrote:
My vote has to go XML. What XSD can give you is more than just
validation but also auto-complete, tips, etc. in IDE.
Personally I love YAML for how clean it is, but it just can't meet
many things that XML can provide. PHP shall really be the choice
of those who know what they are doing.
Yuen-Chi Lian | www.yclian.com <http://www.yclian.com>
"I do not seek; I find." - Pablo Picasso
On Sat, Sep 25, 2010 at 1:15 AM, Pablo Godel
<[email protected] <mailto:[email protected]>> wrote:
I think as long we can build tools to generate the
configuration (a web installer or CLI commands) then it would
be fine to have XML or PHP as defaults.
I don't like XML much for being verbose but I do agree that
validation is a big plus. PHP would feel more native but is a
weird use to store and define configuration. It must be
because it is not a common use nowadays. I would probably
favor PHP over XML unless there are very good reasons against.
Pablo
On Fri, Sep 24, 2010 at 1:07 PM, Fabien Potencier
<[email protected]
<mailto:[email protected]>> wrote:
Hi all,
Symfony2 supports many different formats for its
configuration files. By default, we support XML, YAML,
INI, PHP, and Annotations. That's great as it demonstrates
the flexibility of the framework, but we need to choose
one "default" format (the recommend one in the
documentation and the one that bundles should use).
Right now, the recommended one is XML (but we show YAML by
default in the documentation because it is more concise).
But I'm wondering if we should switch to PHP instead.
Here is my reasoning:
* YAML: Even if this is the more readable and simple
format, it cannot be used for the default because it needs
a YAML parser and also because it is really difficult to
debug problems in a YAML file (missing :, tabs, wrong
indentation, ...).
* INI and Annotations: They cannot be used for the default
as they are not suitable for all configurations.
* XML: Great because you have validation, auto-completion,
and documentation (with XSD) but many people don't like to
use XML (verbose, feels like Java, ...).
* PHP: Great as there is nothing new to learn. The only
drawback I see is that PHP being dynamic by nature, people
can do weird thing in the configuration files (for
instance, changing a configuration setting based on the
current time; and that won't work because the
configuration is cached in a static form).
What do you think?
Fabien
--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com <http://sensiolabs.com> |
symfony-project.org <http://symfony-project.org> |
fabien.potencier.org <http://fabien.potencier.org>
Tél: +33 1 40 99 80 80
--
If you want to report a vulnerability issue on symfony,
please send it to security at symfony-project.com
<http://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]
<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]
<mailto:symfony-devs%[email protected]>
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
--
If you want to report a vulnerability issue on symfony, please
send it to security at symfony-project.com
<http://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]
<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]
<mailto:symfony-devs%[email protected]>
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
--
If you want to report a vulnerability issue on symfony, please
send it to security at symfony-project.com
<http://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]
<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]
<mailto:symfony-devs%[email protected]>
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 [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
--
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