Symfony2 - from the trenches

download Symfony2 - from the trenches

of 43

  • date post

  • Category


  • view

  • download


Embed Size (px)


This talk represents the combined experience from several web development teams who have been using Symfony2 since months already to create high profile production applications. The aim is to give the audience real world advice on how to best leverage Symfony2, the current rough spots and how to work around them. Aside from covering how to implement functionality in Symfony2, this talk will also cover topics such as how to best integrate 3rd party bundles and where to find them as well as how to deploy the code and integrate into the entire server setup.

Transcript of Symfony2 - from the trenches

  • 1.Symfony2 - From the Trenchesby Lukas Kahwe Smith,Kris Wallsmith,Thibault Duplessis,Jeremy Mikola, Jordi Boggiano,Jonathan H. Wage,Bulat Shakirzyanov

2. AgendaGetting Setup CachingCode Flow Performance TipsDependency InjectionAsset ManagementConfiguration Choices TestingController ChoicesDeploymentApplication Choices Third Party BundlesDoctrineResources 3. Getting setupPHP 5.3+ with ext/intl (compat lib is in the works)Read check.php for details (dev/prod php.inis from Liip)Using OSX? php53-intl from liangzhenjing or build-entropy-php from chregu Blog post on installing PHP 5.3 with intl from Justin HilemanInitial setupsymfony-sandboxsymfony-bootstrapSymfony2ProjectRead the Coding Style Guide (Code Sniffer Rules)Managing external dependenciesSubmodule: not everything is in git (svn, mercurial, etc.)Vendor install/update scripts: risk of getting out of syncMR (not cross platform) 4. Code Flow1. Frontend Controller (web/app[_dev].php)Loads autoloaderCreates/boots kernelCreates request (from globals) and passes to kernel2. KernelLoads app config (app/config/config_[prod|dev|test])Resolves URL path to a controller (go to 3)Outputs response returned by the controller3. ControllerLoads model and viewPotentially creates a sub-request (go to 2)Creates response and returns it 5. Execution Flow 6. BundleAvalancheSitemapBundleSitemap Describe Your Services 7.