What is Symfony2?

DZone 's Guide to

What is Symfony2?

· Web Dev Zone ·
Free Resource
What is Symfony2? Fabien Potencier summarizes:

First, Symfony2 is a reusable set of standalone, decoupled, and cohesive PHP components that solve common web development problems.

Then, based on these components, Symfony2 is also a full-stack web framework.

The dominant theme of Potencier's post (which summarizes a well-received talk he gave last week at the Symfony Day conference in Cologne) is his insistence that:

  • while Symfony2 can be called an MVC framework (although it is really model-indifferent), nevertheless, Symfony2 is fundamentally a Request/Response framework
  • this is a very good thing, because Response/Request is really how the web works

But the meat of the article is a quick and clear presentation, with simple code examples, of how some Symfony2 components make common tasks a whole lot easier.

For example, here's Potencier's sample use of Symfony2's Finder:

use Symfony\Component\Finder\Finder;
$finder = new Finder();
$iterator = $finder
  ->size('>= 1K')
foreach ($iterator as $file) {
    print $file->getRealpath()."\n";

Check out the full article here.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}