Over a million developers have joined DZone.

What is Symfony2?

· Web Dev Zone
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
  ->files()
  ->name('*.php')
  ->depth(0)
  ->size('>= 1K')
  ->in(__DIR__);
 
foreach ($iterator as $file) {
    print $file->getRealpath()."\n";
}


Check out the full article here.

Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}