I gave a deeper thought to what I suggested and now think that XML may just not be the best choice.
Similar with the Twig discussion, the areas/crowds that we shall look into are: - Beginners - Plugin standards - Us If we make the assumption that most beginners are using IDE then XML works. However, I have met many who use plain text editors (be it notepad, gedit or vi) to build their sites. For the latter case, XML is way too verbose. If we are going for YAML, providing well documented YAML comments/samples servces the purpose of guiding them. The decision that we are making here can be significant and long-lasting to the plugin development - and I have a bad feeling that down the road many plugin developers do not know or want to maintain an XSD. Take Apache Maven for example, I am only aware that the assembly plugin is the rare one with an XSD defined for its XML config. (At the same time Maven doesn't impose an XSD-based validation) When Ubuntu was using HAL, customizing some hardware settings pissed me off a little due to how verbose and unnecessary XML is. It doesn't look "smart" at all and makes me feel stupid. So it really comes to what environment you use to configure your Sf2 and on what aspects you are configuring. If you ask me again, I think both YAML and XML shall co-exist and supported at runtime. For example, I would love to configure the container using XML because it's more than just a 'config' file, other time, YAML is better. We need to define some ground rules so that if similar questions (Twig, XML, etc.) are raised again, we know where is our direction. Yuen-Chi Lian | www.yclian.com "I do not seek; I find." - Pablo Picasso On Sat, Sep 25, 2010 at 1:37 AM, Yuen-Chi Lian <[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 > "I do not seek; I find." - Pablo Picasso > > > On Sat, Sep 25, 2010 at 1:15 AM, Pablo Godel <[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]> 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 | symfony-project.org | 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 >>> >>> 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]<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 >> >> 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]<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 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
