Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Things you should know about Symfony

Things you should know about Symfony

This is a collection of things about Symfony (sometimes very loosely related) that everyone should know. The audio will be posted soon.

5048618030da9845ed2710e0dc4da654?s=128

Jacob Mather

June 18, 2013
Tweet

Transcript

  1. Things You Should Know About Symfony Jacob Mather Software Engineer,

    Mashery Tuesday, June 18, 13
  2. Who am I? • Software Engineer at Mashery (now Intel)

    • Symfony developer since 2007 • Community Evangelist Jacob Mather @thejmather Tuesday, June 18, 13
  3. My style • Little bits of info about lots of

    things • Exposure makes things less scary • Mental references for solving roadblocks Jacob Mather @thejmather Tuesday, June 18, 13
  4. Composer • Resolves and manages dependency trees in your library

    code • NOT JUST FOR SYMFONY • Seriously. Use it everywhere. • Worried about 3rd parties? Use Satis Jacob Mather @thejmather Tuesday, June 18, 13
  5. Design Patterns • Read up on these, as they play

    a major part in understanding and working with Symfony • SOLID object oriented design • Dependency Injection • Proxy Jacob Mather @thejmather Tuesday, June 18, 13
  6. Ramp up easier with Silex • Same great components •

    No enterprisey after-taste • Micro-framework based on Pimple Jacob Mather @thejmather Tuesday, June 18, 13
  7. Twig is REALLY COOL • Object oriented templates • Based

    on Jinja and Django templates • Templates literally compile to classes • Twig.js lets you use them in JavaScript too Jacob Mather @thejmather Tuesday, June 18, 13
  8. Stop fighting with local dev • Vagrant is your friend

    • Puppet (or Chef) make Vagrant awesome • Get started right away: https://github.com/jmather/vagrant-lamp-centos63 Jacob Mather @thejmather Tuesday, June 18, 13
  9. Admin Generator • SonataAdminBundle - Defacto Standard • Get started

    quickly: https://github.com/jmather/symfony-sonata-distribution Jacob Mather @thejmather Tuesday, June 18, 13
  10. Testing is easy • Symfony encourages building testable code •

    Unit test all the things • Test all your non-javascript code headlessly • Without even making a request! Jacob Mather @thejmather Tuesday, June 18, 13
  11. ICBaseTestBundle • Helps speed up your functional tests by retaining

    copies of your sqlite based testing databases. • Provides helpful tools for managing fixture loading. Jacob Mather @thejmather Tuesday, June 18, 13
  12. JMSSerializerBundle • Useful once you have an API • Lets

    you version your data objects with your API to keep from breaking older implementations Jacob Mather @thejmather Tuesday, June 18, 13
  13. Capifony • Built on top of Capistrano • Specifically made

    for Symfony 1 and 2 • STOP DOING THIS MANUALLY Jacob Mather @thejmather Tuesday, June 18, 13
  14. Community • If you need help, you can often find

    it online • Google Groups • Mailing Lists • IRC (#symfony on Freenode, MY FAV!) Jacob Mather @thejmather Tuesday, June 18, 13
  15. Code Organization • You will likely feel like you need

    to shuffle deck chairs around • There are conventions, take some time and study other bundles and examples • It’s ok, nobody puts everything in the right place the first time. Or the 10th. 50th? Jacob Mather @thejmather Tuesday, June 18, 13
  16. The Components • Console - Great for building CLI helpers

    • HttpKernel - Build your own framework • EventDispatcher - Build evented systems • DependencyInjector - Awesome DIC Jacob Mather @thejmather Tuesday, June 18, 13
  17. Configuration Component • Config system isn’t merely for moving config

    from a file to code • Configuration Component allows you to define the structure of your config, alerting you of potentially invalid entries Jacob Mather @thejmather Tuesday, June 18, 13
  18. Security Component • Often said to be “overly complicated” •

    Is actually just solving a really complicated set of problems • Security is actually two things: • Authentication - who you are • Authorization - what you can do Jacob Mather @thejmather Tuesday, June 18, 13
  19. Form Component • Manages to solve a complex problem in

    an abstract way which strives to not break layer isolation between model, view, and controller Jacob Mather @thejmather Tuesday, June 18, 13
  20. Ecosystem • Sculpin - Static site generator • Sylius or

    Vespolina - Shopping carts • Guzzle - Headless web browser • Behat - Functional testing framework • Drupal 8 - Using many pieces of Symfony Jacob Mather @thejmather Tuesday, June 18, 13
  21. <?php exit(0); Jacob Mather @thejmather Software Engineer, Mashery For a

    video, or slides, go to: http://jmather.com/talks/2013-06-18 Tuesday, June 18, 13