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

Cataloging Symfony

Cataloging Symfony

Symfony has grown a lot since its inception. Between 2.0 and the current 5.3 release over 25 components were added. In our talk we want to take a look at these components, group them into layers and then discuss common principles for components in these layers. At the heart of this discussion are package design principles.

This knowledge will not only help you better understand how Symfony is built and how to use these components standalone (or possibly not), it will also help you design better applications and libraries yourself.

Denis Brumann

June 17, 2021
Tweet

More Decks by Denis Brumann

Other Decks in Programming

Transcript

  1. Cartographing Symfony
    Making sense of the Symfony Components
    when used standalone or in full-stack

    View Slide

  2. Christian Flothmann
    @xabbuh
    Denis Brumann
    @dbrumann

    View Slide

  3. Symfony 2.0
    Full List of Components
    BrowserKit

    ClassLoader

    Config

    Console

    CssSelector

    DependencyInjection

    DomCrawler

    EventDispatcher

    Filesystem

    Finder

    Form

    HttpFoundation

    HttpKernel

    Locale

    Process

    Routing

    Security

    Serializer

    Templating

    Translation

    Validator

    Yaml

    View Slide

  4. Symfony 2.0
    Full List of Components
    BrowserKit

    ClassLoader

    Config

    Console

    CssSelector

    DependencyInjection

    DomCrawler

    EventDispatcher

    Filesystem

    Finder

    Form

    HttpFoundation

    HttpKernel

    Locale

    Process

    Routing

    Security

    Serializer

    Templating

    Translation

    Validator

    Yaml
    22 components

    View Slide

  5. Symfony 5.3
    Full List of Components
    Asset

    BrowserKit

    Cache

    Config

    Console

    CssSelector

    DependencyInjection

    DomCrawler

    Dotenv

    ErrorHandler

    EventDispatcher

    ExpressionLanguage

    Filesystem

    Finder

    Form

    HttpClient

    HttpFoundation

    HttpKernel

    Inflector

    Intl

    Ldap

    Lock

    Mailer

    Messenger

    Mime

    Notifier

    OptionsResolver

    PasswordHasher

    Process

    PropertyAccess

    PropertyInfo

    RateLimiter

    Routing

    Runtime

    Security

    Semaphore

    Serializer

    Stopwatch

    String

    Templating

    Translation

    Uid

    Validator

    VarDumper

    VarExporter

    WebLink

    Workflow

    Yaml

    View Slide

  6. Symfony 5.3
    Full List of Components
    Asset

    BrowserKit

    Cache

    Config

    Console

    CssSelector

    DependencyInjection

    DomCrawler

    Dotenv

    ErrorHandler

    EventDispatcher

    ExpressionLanguage

    Filesystem

    Finder

    Form

    HttpClient

    HttpFoundation

    HttpKernel

    Inflector

    Intl

    Ldap

    Lock

    Mailer

    Messenger

    Mime

    Notifier

    OptionsResolver

    PasswordHasher

    Process

    PropertyAccess

    PropertyInfo

    RateLimiter

    Routing

    Runtime

    Security

    Semaphore

    Serializer

    Stopwatch

    String

    Templating

    Translation

    Uid

    Validator

    VarDumper

    VarExporter

    WebLink

    Workflow

    Yaml

    28 NEW components

    *compared to Symfony 2.0

    View Slide

  7. application features framework features
    utility features
    core features

    View Slide

  8. application features framework features
    utility features
    thin wrapper for PHP features

    self contained

    improve usability/DX/interop

    View Slide

  9. Core Features
    Asset
    BrowserKit
    Cache
    Config
    CssSelector
    DependencyInjection
    DomCrawler
    Console
    ErrorHandler
    EventDispatcher
    ExpressionLanguage
    Filesystem
    DotEnv
    Form
    HttpClient
    HttpFoundation
    Inflector
    Intl
    Ldap
    HttpKernel
    Mailer
    Messenger
    Mime
    Notifier
    Lock
    Finder
    Process
    PropertyAccess
    PropertyInfo
    Routing
    Security
    Semaphore
    RateLimiter
    Stopwatch
    String
    Templating
    Translation
    Serializer
    OptionsResolver
    VarExporter
    Weblink
    Workflow
    VarDumper
    Uid
    Validator
    Yaml
    Runtime
    PasswordHasher

    View Slide

  10. core features
    application features framework features
    utility features

    View Slide

  11. core features
    application features framework features
    provides basic features

    few dependencies

    shared functionality

    View Slide

  12. Utility Features
    Asset
    BrowserKit
    Cache
    Config
    CssSelector
    DependencyInjection
    DomCrawler
    Console
    ErrorHandler
    EventDispatcher
    ExpressionLanguage
    Filesystem
    DotEnv
    Form
    HttpClient
    HttpFoundation
    Inflector
    Intl
    Ldap
    HttpKernel
    Mailer
    Messenger
    Mime
    Notifier
    Lock
    Finder
    Process
    PropertyAccess
    PropertyInfo
    Routing
    Security
    Semaphore
    RateLimiter
    Stopwatch
    String
    Templating
    Translation
    Serializer
    OptionsResolver
    VarExporter
    Weblink
    Workflow
    VarDumper
    Uid
    Validator
    Yaml
    Runtime
    PasswordHasher

    View Slide

  13. core features utility features
    framework features
    application features

    View Slide

  14. core features utility features
    framework features
    high level functionality

    extendable

    help building app-features

    View Slide

  15. Application Features
    Asset
    BrowserKit
    Cache
    Config
    CssSelector
    DependencyInjection
    DomCrawler
    Console
    ErrorHandler
    EventDispatcher
    ExpressionLanguage
    Filesystem
    DotEnv
    Form
    HttpClient
    HttpFoundation
    Inflector
    Intl
    Ldap
    HttpKernel
    Mailer
    Messenger
    Mime
    Notifier
    Lock
    Finder
    Process
    PropertyAccess
    PropertyInfo
    Routing
    Security
    Semaphore
    RateLimiter
    Stopwatch
    String
    Templating
    Translation
    Serializer
    OptionsResolver
    VarExporter
    Weblink
    Workflow
    VarDumper
    Uid
    Validator
    Yaml
    Runtime
    PasswordHasher

    View Slide

  16. core features utility features
    application features framework features

    View Slide

  17. core features utility features
    application features
    provide configurability

    customizable

    help run the application

    View Slide

  18. Framework Features
    Asset
    BrowserKit
    Cache
    Config
    CssSelector
    DependencyInjection
    DomCrawler
    Console
    ErrorHandler
    EventDispatcher
    ExpressionLanguage
    Filesystem
    DotEnv
    Form
    HttpClient
    HttpFoundation
    Inflector
    Intl
    Ldap
    HttpKernel
    Mailer
    Messenger
    Mime
    Notifier
    Lock
    Finder
    Process
    PropertyAccess
    PropertyInfo
    Routing
    Security
    Semaphore
    RateLimiter
    Stopwatch
    String
    Templating
    Translation
    Serializer
    OptionsResolver
    VarExporter
    Weblink
    Workflow
    VarDumper
    Uid
    Validator
    Yaml
    Runtime
    PasswordHasher

    View Slide

  19. provide configurability

    customizable

    help run the application
    high level functionality

    extendable

    help building app-features
    provides basic features

    few dependencies

    shared functionality
    thin wrapper for PHP features

    self contained

    improve usability/DX/interop

    View Slide

  20. 12.534 37.103
    9.720 15.659

    View Slide

  21. 12.534 37.103
    9.720 15.659
    75.016

    View Slide

  22. core

    features
    utility

    features
    application

    features
    framework

    features

    View Slide

  23. core

    features
    utility

    features
    application

    features
    framework

    features
    less

    coupled
    more

    coupled

    View Slide

  24. core

    features
    utility

    features
    application

    features
    framework

    features
    easier

    to set up
    harder
    to set up

    View Slide

  25. core

    features
    utility

    features
    application

    features
    framework

    features
    easier

    to set up
    harder
    to set up

    View Slide

  26. core

    features
    utility

    features
    application

    features
    framework

    features
    easier

    to set up
    harder
    to set up

    View Slide

  27. core

    features
    utility

    features
    application

    features
    framework

    features
    easier

    to set up
    harder
    to set up

    View Slide

  28. core

    features
    utility

    features
    application

    features
    framework

    features
    easier to use

    standalone
    harder to use

    standalone

    View Slide

  29. core

    features
    utility

    features
    application

    features
    framework

    features
    easier to use

    standalone
    harder to use

    standalone

    View Slide

  30. View Slide

  31. View Slide

  32. View Slide

  33. Symfony 2.8
    Assets

    ExpressionLanguage

    Intl

    Ldap

    OptionsResolver

    PropertyInfo

    View Slide

  34. Symfony 3.4
    Cache

    DotEnv

    Inflector

    WebLink

    Workflow

    View Slide

  35. Symfony 4.4
    ErrorHandler

    HttpClient

    Mailer

    Messenger

    Mime

    Notifier

    VarExporter

    View Slide

  36. Symfony 5.3
    PasswordHasher

    RateLimiter

    Runtime

    Semaphore

    String

    Uid

    View Slide

  37. Decoupled?!
    Using Symfony Components standalone is really difficult!

    View Slide

  38. View Slide

  39. View Slide

  40. View Slide

  41. Where is
    Waldo?
    Why doesn’t Symfony have feature X, Y or Z?

    View Slide

  42. View Slide

  43. Extract components

    & reuse
    Evolve abstractions

    & solidify contracts
    Identify shared
    functionalities
    Start with everything

    in one place

    View Slide

  44. Thank You!

    View Slide