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

Symfony, the PHP framework for Open-Source, Start-Ups & Enterprise

Hugo Hamon
March 20, 2015

Symfony, the PHP framework for Open-Source, Start-Ups & Enterprise

This talk introduces the Symfony framework project and Open-Source ecosystem. It also showcases some Open-Source projects, start-ups and enterprises success stories.

Hugo Hamon

March 20, 2015
Tweet

More Decks by Hugo Hamon

Other Decks in Technology

Transcript

  1. Symfony, the PHP framework
    for Open-Source & Enterprise
    Friday March 20th 2015 – Cluj – Romania

    View full-size slide

  2. Hugo HAMON
    Head of training at SensioLabs
    Book author
    Speaker at Conferences
    Symfony contributor
    @hhamon

    View full-size slide

  3. What is
    Symfony?

    View full-size slide

  4. Framework
    Philosophy
    Community
    Professional Toolkit

    View full-size slide

  5. Symfony2 is a set of reusable,
    standalone, decoupled, and
    cohesive PHP components that
    solve common web development
    problems.

    View full-size slide

  6. Dependency Injection
    BrowserKit
    ClassLoader
    Config
    Console CssSelector Debug
    DomCrawler
    EventDispatcher
    ExpressionLanguage Filesystem
    Finder Form
    HttpFoundation
    HttpKernel
    Locale Intl Icu
    OptionsResolver
    Process
    PropertyAccess
    Routing Security
    Serializer Stopwatch Templating Translation
    Validator
    Yaml

    View full-size slide

  7. Symfony is also an HTTP
    full-stack web framework
    made of bundles and third
    party libraries.

    View full-size slide

  8. app/ is the application folder
    src/ is the libraries folder
    web/ is the general public folder
    contains the configuration, templates and
    generated files
    contains the PHP code of your application
    contains front controllers and web assets
    (images, Javascripts, stylesheets, ...)
    .
    ├─ app/
    │ ├─ AppCache.php
    │ ├─ AppKernel.php
    │ ├─ cache/
    │ ├─ config/
    │ ├─ console
    │ ├─ logs/
    │ ├─ autoload.php
    │ ├─ check.php
    │ ├─ phpunit.xml.dist
    │ └─ Resources/
    │ └─ views/
    │ └─ admin/
    ├─ src/
    │ └─ AppBundle/
    ├─ vendor/
    └─ web/
    ├─ config.php
    ├─ app.php
    └─ app_dev.php
    vendor/ hosts third party code
    contains libraries and resources installed with
    Composer utility tool.

    View full-size slide

  9. A « Bundle » is a directory
    containing a set of files that
    implement a single feature and
    can be shared with the
    Community.

    View full-size slide

  10. src/AppBundle/
    ├── AppBundle.php
    ├── Controller/
    │ └── BlogController.php
    ├── DataFixtures/
    │ └── ORM/
    │ └── LoadBlogPostData.php
    ├── Entity/
    │ ├── BlogPost.php
    │ ├── Comment.php
    │ └── Repository/
    │ └── BlogPostRepository.php
    └── Form/
    └── BlogPostType.php

    View full-size slide

  11. Symfony is an HTTP framework
    that converts a Request object
    into a Response object.

    View full-size slide

  12. # web/app.php
    use Symfony\Component\HttpFoundation\Request;
    $kernel = new AppKernel('prod', false);
    $kernel->loadClassCache();
    $request = Request::createFromGlobals();
    $response = $kernel->handle($request);
    $response->send();
    $kernel->terminate($request, $response);

    View full-size slide

  13. # web/app.php
    use Symfony\Component\HttpFoundation\Request;
    $kernel = new AppKernel('prod', false);
    $kernel->loadClassCache();
    $request = Request::createFromGlobals();
    $response = $kernel->handle($request);
    $response->send();
    $kernel->terminate($request, $response);

    View full-size slide

  14. Symfony also takes inspiration
    on leading professional Open-
    Source projects from other
    communities.

    View full-size slide

  15. What makes
    Symfony popular?

    View full-size slide

  16. +5,000,000 Installs with Composer

    View full-size slide

  17. +1,250 code contributors

    View full-size slide

  18. Official Documentation

    View full-size slide

  19. +900 documentation contributors

    View full-size slide

  20. +2 500 Community Bundles

    View full-size slide

  21. Promoting PHP Standards

    View full-size slide

  22. Modern Development Features

    View full-size slide

  23. Easy Runtime Debugging

    View full-size slide

  24. Symfony for
    Open-Source
    projects

    View full-size slide

  25. Symfony for
    Start-Ups

    View full-size slide

  26. RAD & Prototyping
    https://www.flickr.com/photos/collylogic

    View full-size slide

  27. § Code Generators
    § Admin Generators
    § ORM Layers
    § Automation
    § Annotations

    View full-size slide

  28. Simple & Versatile
    https://www.flickr.com/photos/58621196@N05/6338435691/sizes/l

    View full-size slide

  29. https://farm8.staticflickr.com/7243/7079126699_d8f34a8425_b.jpg
    Open

    View full-size slide

  30. https://www.flickr.com/photos/usnavy/5711222106/sizes/l
    Easy to ship & deploy

    View full-size slide

  31. https://www.flickr.com/photos/sensiolabsuk/7999168719/sizes/l
    Community Involvment

    View full-size slide

  32. Success Stories

    View full-size slide

  33. Symfony for
    Enterprise

    View full-size slide

  34. Maturity & Stability

    View full-size slide

  35. Highly Configurable
    imports:
    - { resource: parameters.yml }
    - { resource: security.yml }
    - { resource: services.yml }
    framework:
    #esi: ~
    #translator: { fallbacks: ["%locale%"] }
    secret: "%secret%"
    router:
    resource: "%kernel.root_dir%/config/routing.yml"
    strict_requirements: ~
    form: ~
    csrf_protection: ~
    validation: { enable_annotations: true }
    # ...

    View full-size slide

  36. End of 2015
    Symfony 3.0
    Clear Roadmap

    View full-size slide

  37. Symfony major versions are
    backward compatible to ensure
    smooth upgrades when new
    versions are published.
    http://symfony.com/bc

    View full-size slide

  38. Cloud Deployment

    View full-size slide

  39. Interoperability

    View full-size slide

  40. Professional Services & Support

    View full-size slide

  41. Success Stories

    View full-size slide

  42. Over 100 millions hits per day!

    View full-size slide

  43. Symfony is made
    for everyone!

    View full-size slide

  44. Questions?
    h"p://www.flickr.com/photos/mkrigsman/  

    View full-size slide