Skip to content

Instantly share code, notes, and snippets.

@lsmith77
Created January 16, 2011 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lsmith77/781662 to your computer and use it in GitHub Desktop.
Save lsmith77/781662 to your computer and use it in GitHub Desktop.
this is just some notes in preparation for the slides

Topics

Setup

Resources

Dependency Injection

  • http://fabien.potencier.org/article/11/what-is-dependency-injection
  • container injection
    • pros: quick to setup, full lazy loading (request, response)
    • cons: dependencies not easily visible, dependencies cannot be customized on a per service basis, unit testing ugly
  • constructor injection
    • pros: clear dependencies both in the code and DI config
    • cons: no way to handle optional dependencies, boilerplate code
  • setter injection
    • pros: allow's to handle optional dependencies to some degree
    • cons: more boilerplate code, dependency definition cluttered
  • interface injection
    • pros: less chance for typos
    • cons: more boilerplate code, dependencies cannot be customized on a per service basis

Symfony2 code flow

  • config recommendations
  • controllers as service
  • base Controller vs. POPO
  • request vs. sub-requests (parameter propagation)
  • single vs. multiple separate front controllers
    • separation frontend vs. admin not necessary anymore
    • however for large apps it pays to separate code during development
      • step by step updates possible
      • multiple teams working
    • main/MainKernel.php vs. app/main/MainKernel.php

Caching

  • structuring controllers for ESI
    • forward() is no longer your performance enemy
    • break up controller actions based on cache settings
  • varnish

Deployment

3rd party Bundles

  • FOS\UserBundle
  • FOS\AsseticBundle
  • FOS\FacebookBundle
  • Liip\ViewBundle
  • Liip\FunctionalTestBundle
    • functional testing
  • Sonata\BaseApplicationBundle
  • Sonata\EasyExtendBundle?
  • ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment