Archives


Master Symfony2 fundamentals

Be trained by SensioLabs experts (2 to 6 day sessions -- French or English).
trainings.sensiolabs.com

Symfony hosting done right

ServerGrove, outstanding support at the right price for your Symfony hosting needs.
servergrove.com

Discover the SensioLabs Support

Access to the SensioLabs Competency Center for an exclusive and tailor-made support on Symfony
sensiolabs.com

Fabien Potencier
Introducing Symfony Components
by Fabien Potencier – March 30, 2009 – 11 comments

A long time ago, we introduced the "Symfony platform", a set of cohesive but decoupled classes that of course powers the Symfony MVC framework. The most interesting fact about the Symfony platform is that you can use any of its libraries by itself in a non-Symfony project.

It means for instance that you can use the YAML or the routing classes without the rest of the MVC framework. But until now, I have not seen many people actually taking advantage of those classes as standalone libraries. I mention these two libraries specifically because they have a lot of potential. As a matter of fact, Pookey wrote an interesting post on using the routing classes in a standalone project last week, and the YAML classes are actually used by two other major PHP projects: Doctrine and PHPUnit.

As we think some of the Symfony libraries deserve more visibility than they have today, we have decided to go one step further and publish some of them as standalone components, under the Symfony Components name.

The Symfony Components won't start duplicating the work done by the Zend Framework or the ezComponents teams. Everybody knows that the Symfony core team don't like to reinvent the wheel. As such, we will only publish components that we need for the Symfony MVC framework and for which there is not yet an alternative and viable option.

The Symfony Components are hosted on the main Symfony Subversion repository: http://svn.symfony-project.com/components/.

The first component to be released is the YAML library. sfYAML is the only pure PHP library that can parse and dump YAML files reliably. It does not implement the whole YAML 1.1 specifications but it supports most of the features you need to manage configuration files, and some more.

The next component to be released later this week is a "Dependency Injection Container", which will power Symfony 2. I have started writing about Dependency Injection on my personal blog last week. It is good read if you want to learn more about dependency injection in general, or about the Symfony 2 container in particular.

In the coming weeks, more components will be released, starting with the new templating framework that will power Symfony 2, and the Symfony 2 core kernel (aka the sfRequestHandler class). That will be a great opportunity to have a sneak peek at the future of Symfony.

Stay tuned!

Comments RSS

  • gravatar
    #1 Peter said on the 2009/03/30 at 19:12
    Great news! I'm not clear where Components is stopping - will the form library be made available in the Components repository? It certainly demands wide use outside of Symfony!
  • gravatar
    #2 fabien said on the 2009/03/30 at 20:09
    @Peter: The form framework will definitely be part of the components at some point.
  • gravatar
    #3 denderello said on the 2009/03/30 at 20:21
    Wonderfull idea and definitely a proof of your qoute that "there is no such thing as a PHP framework war"! The symfony compoments can be a great way to build bridges instead of walls between the frameworks and libraries.
  • gravatar
    #4 Ian P. Christian (pookey) said on the 2009/03/30 at 22:13
    Thanks for the link Fabien!
    I just posted a new post showing a very basic use of sfYaml - http://pookey.co.uk/blog/archives/80-YAML-in-PHP-fun-with-sfYaml.html
  • gravatar
    #5 Matthias said on the 2009/03/30 at 23:09
    @Fabien: The form framework has a dependency to sfCallable that should probably be removed when making it a sf component. Probably you did it accidently? I just wanted to tell it. ;-)
  • gravatar
    #6 Sebastian said on the 2009/03/31 at 09:06
    Probably there should be some kind of a basic "core" component where all other components can depend on.
  • gravatar
    #7 John said on the 2009/03/31 at 10:58
    @Sebastian: That sounds like a Symfony Components Framework ;-)

    Awesome Fabien, another great addition.
  • gravatar
    #8 Keri Henare said on the 2009/03/31 at 22:40
    Templating Framework? Could we have more info on this?
    I'm not a big fan of smarty or any other templating system that relies on me writing anything other than PHP.
  • gravatar
    #9 Fabien said on the 2009/03/31 at 22:51
    @Keri Henare: be reassured. This is a templating framework, not a templating engine. It only ships with a PHP engine but makes it dead easy to plug any other templating engine, like Smarty, PHPTal, or a user defined one.
  • gravatar
    #10 Ldath said on the 2009/04/01 at 00:26
    Hmm I sometimes need to rewrite most of Symfony for special projects. I see that in future I have less work and maybe even will be possible to give some code to community. Thanks!
  • gravatar
    #11 Ludwig said on the 2009/05/17 at 14:31
    Impressive presentation you did there! Who is your designer?

    Good luck!