Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

What is Symfony2?

DZone's Guide to

What is Symfony2?

· Web Dev Zone
Free Resource

Get deep insight into Node.js applications with real-time metrics, CPU profiling, and heap snapshots with N|Solid from NodeSource. Learn more.

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.

Node.js application metrics sent directly to any statsd-compliant system. Get N|Solid

Topics:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}