Symfony 2 and HipHop for PHP

Posted: July 28th, 2011 | Author: | Filed under: HipHop Compatibility, symfony 2 | Comments Off

Symfony 2 has finally launched: http://symfony.com/blog/symfony-2-0

With all the architectural changes under the hood, will it work with HipHop for PHP from FaceBook? And does it make a difference?

Here are the significant changes:

Symfony2 embraces standards: First, Symfony2 is willingly centered around the HTTP specification (just have a look at the built-in HTTP reverse proxy). Then, we are embracing the PHP standards: PHPUnit, namespaces, PSR-0 autoloader, … That makes Symfony2 easily interoperable with many other great PHP libraries.

Symfony2 is decoupled: Beside being a full-stack framework, Symfony2 is also a set of decoupled and cohesive components; Symfony2 is made of 21 components that can be used as standalone libraries: they have their own Git repositories, and they are all available as PEAR packages.

Symfony2 has many innovations that are unique in the PHP world:

  • Symfony2 uses the Dependency Injection pattern extensively and it comes with a built-in Dependency Injection Container. It makes Symfony2 very flexible and easily customizable.
  • Symfony2 is packaged as Distributions: A distribution is a pre-configured Symfony2 project with a selection of bundles and sensible defaults. The Symfony Standard Edition also comes with a Web configurator. That makes the installation and configuration of a new Symfony2 project fast and insanely easy.
  • Everything is a Bundle in Symfony2: A bundle is a directory containing a set of files (PHP files, stylesheets, JavaScripts, images, …) that implement a single feature (a blog, a forum, etc). That changes everything. Share your bundles between your projects or publish them in the wild.
  • Symfony2 is Fast: the raw performance of the framework is great, but there is more. By embracing the HTTP standard, and thanks to the ESI standard, you can make your application fly very easily. Make your application as dynamic as you need it to be, and still benefit from HTTP caching. And if you can afford the installation of a reverse proxy like Varnish, the performance of your application will just be incredible.
  • Symfony2 eases the debugging of your application thanks to the Web Debug Toolbar and the Profiler: symfony1 was the very first major framework to come with a web debug toolbar. Symfony2 pushes the limits even further with a brand new debug toolbar and the introduction of a gorgeous profiler. The profiler gives you all the information you need to understand what’s going on behind the scene in case of a problem.
  • Symfony2 simplifies your life as much as possible: we have worked hard to give you the best experience possible. After installing a distribution, the interactive generators will help you generate code easily by guiding you through some simple questions. And when an error occurs, Symfony2 goes beyond displaying the error message: it displays the whole stack trace, the linked exceptions, and all the files are one-click away from your IDE. We have also tweaked the error messages to make them as comprehensible as possible.
  • Symfony takes Security very seriously. The Security component gives you all the tools you need to secure your applications: from the simple form logins to the more advanced X.509 certificates and ACLs, everything is as easy as adding a few settings in a configuration file. We have gone as far as implementing time-based attacks protection. Speaking of security, and thanks to the community again, the whole code base has been audited recently by SektionEins and all their remarks have been taken into account.