What is Symfony2?
Join the DZone community and get the full member experience.
Join For FreeWhat 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:
Opinions expressed by DZone contributors are their own.
Comments